class UnaryOperator

Declaration

class UnaryOperator : public UnaryInstruction { /* full declaration omitted */ };

Description

LLVM Value Representation This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table. Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/IR/ValueHandle.h for details.

Declared at: llvm/include/llvm/IR/InstrTypes.h:101

Inherits from: UnaryInstruction

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • private void AssertOK()
  • public static llvm::UnaryOperator * Create(llvm::Instruction::UnaryOps Op, llvm::Value * S, const llvm::Twine & Name = llvm::Twine(), llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::UnaryOperator * Create(llvm::Instruction::UnaryOps Op, llvm::Value * S, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::UnaryOperator * CreateFNegFMF(llvm::Value * Op, llvm::Instruction * FMFSource, const llvm::Twine & Name = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::UnaryOperator * CreateWithCopiedFlags(llvm::Instruction::UnaryOps Opc, llvm::Value * V, llvm::Instruction * CopyO, const llvm::Twine & Name = "", llvm::Instruction * InsertBefore = nullptr)
  • protected UnaryOperator(llvm::Instruction::UnaryOps iType, llvm::Value * S, llvm::Type * Ty, const llvm::Twine & Name, llvm::Instruction * InsertBefore)
  • protected UnaryOperator(llvm::Instruction::UnaryOps iType, llvm::Value * S, llvm::Type * Ty, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
  • public static bool classof(const llvm::Instruction * I)
  • public static bool classof(const llvm::Value * V)
  • protected llvm::UnaryOperator * cloneImpl() const
  • public llvm::Instruction::UnaryOps getOpcode() const

Inherited from UnaryInstruction:

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

void AssertOK()

Declared at: llvm/include/llvm/IR/InstrTypes.h:102

static llvm::UnaryOperator* Create(
    llvm::Instruction::UnaryOps Op,
    llvm::Value* S,
    const llvm::Twine& Name = llvm::Twine(),
    llvm::Instruction* InsertBefore = nullptr)

Description

Construct a unary instruction, given the opcode and an operand. Optionally (if InstBefore is specified) insert the instruction into a BasicBlock right before the specified instruction. The specified Instruction is allowed to be a dereferenced end iterator.

Declared at: llvm/include/llvm/IR/InstrTypes.h:122

Parameters

llvm::Instruction::UnaryOps Op
llvm::Value* S
const llvm::Twine& Name = llvm::Twine()
llvm::Instruction* InsertBefore = nullptr

static llvm::UnaryOperator* Create(
    llvm::Instruction::UnaryOps Op,
    llvm::Value* S,
    const llvm::Twine& Name,
    llvm::BasicBlock* InsertAtEnd)

Description

Construct a unary instruction, given the opcode and an operand. Also automatically insert this instruction to the end of the BasicBlock specified.

Declared at: llvm/include/llvm/IR/InstrTypes.h:130

Parameters

llvm::Instruction::UnaryOps Op
llvm::Value* S
const llvm::Twine& Name
llvm::BasicBlock* InsertAtEnd

static llvm::UnaryOperator* CreateFNegFMF(
    llvm::Value* Op,
    llvm::Instruction* FMFSource,
    const llvm::Twine& Name = "",
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/InstrTypes.h:164

Parameters

llvm::Value* Op
llvm::Instruction* FMFSource
const llvm::Twine& Name = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::UnaryOperator* CreateWithCopiedFlags(
    llvm::Instruction::UnaryOps Opc,
    llvm::Value* V,
    llvm::Instruction* CopyO,
    const llvm::Twine& Name = "",
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/InstrTypes.h:156

Parameters

llvm::Instruction::UnaryOps Opc
llvm::Value* V
llvm::Instruction* CopyO
const llvm::Twine& Name = ""
llvm::Instruction* InsertBefore = nullptr

UnaryOperator(llvm::Instruction::UnaryOps iType,
              llvm::Value* S,
              llvm::Type* Ty,
              const llvm::Twine& Name,
              llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/InstrTypes.h:105

Parameters

llvm::Instruction::UnaryOps iType
llvm::Value* S
llvm::Type* Ty
const llvm::Twine& Name
llvm::Instruction* InsertBefore

UnaryOperator(llvm::Instruction::UnaryOps iType,
              llvm::Value* S,
              llvm::Type* Ty,
              const llvm::Twine& Name,
              llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/InstrTypes.h:107

Parameters

llvm::Instruction::UnaryOps iType
llvm::Value* S
llvm::Type* Ty
const llvm::Twine& Name
llvm::BasicBlock* InsertAtEnd

static bool classof(const llvm::Instruction* I)

Declared at: llvm/include/llvm/IR/InstrTypes.h:176

Parameters

const llvm::Instruction* I

static bool classof(const llvm::Value* V)

Declared at: llvm/include/llvm/IR/InstrTypes.h:179

Parameters

const llvm::Value* V

llvm::UnaryOperator* cloneImpl() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:113

llvm::Instruction::UnaryOps getOpcode() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:171