LLVM  12.0.0git
Public Member Functions | List of all members
llvm::TargetFolder Class Referencefinal

TargetFolder - Create constants with target dependent folding. More...

#include "llvm/Analysis/TargetFolder.h"

Inheritance diagram for llvm::TargetFolder:
Inheritance graph
[legend]
Collaboration diagram for llvm::TargetFolder:
Collaboration graph
[legend]

Public Member Functions

 TargetFolder (const DataLayout &DL)
 
ConstantCreateAdd (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const override
 
ConstantCreateFAdd (Constant *LHS, Constant *RHS) const override
 
ConstantCreateSub (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const override
 
ConstantCreateFSub (Constant *LHS, Constant *RHS) const override
 
ConstantCreateMul (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const override
 
ConstantCreateFMul (Constant *LHS, Constant *RHS) const override
 
ConstantCreateUDiv (Constant *LHS, Constant *RHS, bool isExact=false) const override
 
ConstantCreateSDiv (Constant *LHS, Constant *RHS, bool isExact=false) const override
 
ConstantCreateFDiv (Constant *LHS, Constant *RHS) const override
 
ConstantCreateURem (Constant *LHS, Constant *RHS) const override
 
ConstantCreateSRem (Constant *LHS, Constant *RHS) const override
 
ConstantCreateFRem (Constant *LHS, Constant *RHS) const override
 
ConstantCreateShl (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const override
 
ConstantCreateLShr (Constant *LHS, Constant *RHS, bool isExact=false) const override
 
ConstantCreateAShr (Constant *LHS, Constant *RHS, bool isExact=false) const override
 
ConstantCreateAnd (Constant *LHS, Constant *RHS) const override
 
ConstantCreateOr (Constant *LHS, Constant *RHS) const override
 
ConstantCreateXor (Constant *LHS, Constant *RHS) const override
 
ConstantCreateBinOp (Instruction::BinaryOps Opc, Constant *LHS, Constant *RHS) const override
 
ConstantCreateNeg (Constant *C, bool HasNUW=false, bool HasNSW=false) const override
 
ConstantCreateFNeg (Constant *C) const override
 
ConstantCreateNot (Constant *C) const override
 
ConstantCreateUnOp (Instruction::UnaryOps Opc, Constant *C) const override
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, ArrayRef< Constant *> IdxList) const override
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, Constant *Idx) const override
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, ArrayRef< Value *> IdxList) const override
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, ArrayRef< Constant *> IdxList) const override
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, Constant *Idx) const override
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, ArrayRef< Value *> IdxList) const override
 
ConstantCreateCast (Instruction::CastOps Op, Constant *C, Type *DestTy) const override
 
ConstantCreateIntCast (Constant *C, Type *DestTy, bool isSigned) const override
 
ConstantCreatePointerCast (Constant *C, Type *DestTy) const override
 
ConstantCreateFPCast (Constant *C, Type *DestTy) const override
 
ConstantCreateBitCast (Constant *C, Type *DestTy) const override
 
ConstantCreateIntToPtr (Constant *C, Type *DestTy) const override
 
ConstantCreatePtrToInt (Constant *C, Type *DestTy) const override
 
ConstantCreateZExtOrBitCast (Constant *C, Type *DestTy) const override
 
ConstantCreateSExtOrBitCast (Constant *C, Type *DestTy) const override
 
ConstantCreateTruncOrBitCast (Constant *C, Type *DestTy) const override
 
ConstantCreatePointerBitCastOrAddrSpaceCast (Constant *C, Type *DestTy) const override
 
ConstantCreateICmp (CmpInst::Predicate P, Constant *LHS, Constant *RHS) const override
 
ConstantCreateFCmp (CmpInst::Predicate P, Constant *LHS, Constant *RHS) const override
 
ConstantCreateSelect (Constant *C, Constant *True, Constant *False) const override
 
ConstantCreateExtractElement (Constant *Vec, Constant *Idx) const override
 
ConstantCreateInsertElement (Constant *Vec, Constant *NewElt, Constant *Idx) const override
 
ConstantCreateShuffleVector (Constant *V1, Constant *V2, ArrayRef< int > Mask) const override
 
ConstantCreateExtractValue (Constant *Agg, ArrayRef< unsigned > IdxList) const override
 
ConstantCreateInsertValue (Constant *Agg, Constant *Val, ArrayRef< unsigned > IdxList) const override
 
- Public Member Functions inherited from llvm::IRBuilderFolder
virtual ~IRBuilderFolder ()
 

Detailed Description

TargetFolder - Create constants with target dependent folding.

Definition at line 32 of file TargetFolder.h.

Constructor & Destructor Documentation

◆ TargetFolder()

llvm::TargetFolder::TargetFolder ( const DataLayout DL)
inlineexplicit

Definition at line 43 of file TargetFolder.h.

Member Function Documentation

◆ CreateAdd()

Constant* llvm::TargetFolder::CreateAdd ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 49 of file TargetFolder.h.

References llvm::ConstantExpr::getAdd().

◆ CreateAnd()

Constant* llvm::TargetFolder::CreateAnd ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 102 of file TargetFolder.h.

References llvm::ConstantExpr::getAnd().

◆ CreateAShr()

Constant* llvm::TargetFolder::CreateAShr ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 98 of file TargetFolder.h.

References llvm::ConstantExpr::getAShr().

◆ CreateBinOp()

Constant* llvm::TargetFolder::CreateBinOp ( Instruction::BinaryOps  Opc,
Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 112 of file TargetFolder.h.

References llvm::ConstantExpr::get().

◆ CreateBitCast()

Constant* llvm::TargetFolder::CreateBitCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 198 of file TargetFolder.h.

References CreateCast().

◆ CreateCast()

Constant* llvm::TargetFolder::CreateCast ( Instruction::CastOps  Op,
Constant C,
Type DestTy 
) const
inlineoverridevirtual

◆ CreateExtractElement()

Constant* llvm::TargetFolder::CreateExtractElement ( Constant Vec,
Constant Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 252 of file TargetFolder.h.

References llvm::ConstantExpr::getExtractElement().

◆ CreateExtractValue()

Constant* llvm::TargetFolder::CreateExtractValue ( Constant Agg,
ArrayRef< unsigned IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 266 of file TargetFolder.h.

References llvm::ConstantExpr::getExtractValue().

◆ CreateFAdd()

Constant* llvm::TargetFolder::CreateFAdd ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 53 of file TargetFolder.h.

References llvm::ConstantExpr::getFAdd().

◆ CreateFCmp()

Constant* llvm::TargetFolder::CreateFCmp ( CmpInst::Predicate  P,
Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 238 of file TargetFolder.h.

References llvm::ConstantExpr::getCompare().

◆ CreateFDiv()

Constant* llvm::TargetFolder::CreateFDiv ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 78 of file TargetFolder.h.

References llvm::ConstantExpr::getFDiv().

◆ CreateFMul()

Constant* llvm::TargetFolder::CreateFMul ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 67 of file TargetFolder.h.

References llvm::ConstantExpr::getFMul().

◆ CreateFNeg()

Constant* llvm::TargetFolder::CreateFNeg ( Constant C) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 125 of file TargetFolder.h.

References llvm::ConstantExpr::getFNeg().

◆ CreateFPCast()

Constant* llvm::TargetFolder::CreateFPCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 193 of file TargetFolder.h.

References llvm::ConstantExpr::getFPCast(), and llvm::Value::getType().

◆ CreateFRem()

Constant* llvm::TargetFolder::CreateFRem ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 87 of file TargetFolder.h.

References llvm::ConstantExpr::getFRem().

◆ CreateFSub()

Constant* llvm::TargetFolder::CreateFSub ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 60 of file TargetFolder.h.

References llvm::ConstantExpr::getFSub().

◆ CreateGetElementPtr() [1/3]

Constant* llvm::TargetFolder::CreateGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Constant *>  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 140 of file TargetFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateGetElementPtr() [2/3]

Constant* llvm::TargetFolder::CreateGetElementPtr ( Type Ty,
Constant C,
Constant Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 144 of file TargetFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateGetElementPtr() [3/3]

Constant* llvm::TargetFolder::CreateGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Value *>  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 151 of file TargetFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateICmp()

Constant* llvm::TargetFolder::CreateICmp ( CmpInst::Predicate  P,
Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 234 of file TargetFolder.h.

References llvm::ConstantExpr::getCompare().

◆ CreateInBoundsGetElementPtr() [1/3]

Constant* llvm::TargetFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Constant *>  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 156 of file TargetFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInBoundsGetElementPtr() [2/3]

Constant* llvm::TargetFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
Constant Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 160 of file TargetFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInBoundsGetElementPtr() [3/3]

Constant* llvm::TargetFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Value *>  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 167 of file TargetFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInsertElement()

Constant* llvm::TargetFolder::CreateInsertElement ( Constant Vec,
Constant NewElt,
Constant Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 256 of file TargetFolder.h.

References llvm::ConstantExpr::getInsertElement().

◆ CreateInsertValue()

Constant* llvm::TargetFolder::CreateInsertValue ( Constant Agg,
Constant Val,
ArrayRef< unsigned IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 271 of file TargetFolder.h.

References llvm::ConstantExpr::getInsertValue().

◆ CreateIntCast()

Constant* llvm::TargetFolder::CreateIntCast ( Constant C,
Type DestTy,
bool  isSigned 
) const
inlineoverridevirtual

◆ CreateIntToPtr()

Constant* llvm::TargetFolder::CreateIntToPtr ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 201 of file TargetFolder.h.

References CreateCast().

◆ CreateLShr()

Constant* llvm::TargetFolder::CreateLShr ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 94 of file TargetFolder.h.

References llvm::ConstantExpr::getLShr().

◆ CreateMul()

Constant* llvm::TargetFolder::CreateMul ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 63 of file TargetFolder.h.

References llvm::ConstantExpr::getMul().

◆ CreateNeg()

Constant* llvm::TargetFolder::CreateNeg ( Constant C,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 121 of file TargetFolder.h.

References llvm::ConstantExpr::getNeg().

◆ CreateNot()

Constant* llvm::TargetFolder::CreateNot ( Constant C) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 128 of file TargetFolder.h.

References llvm::ConstantExpr::getNot().

◆ CreateOr()

Constant* llvm::TargetFolder::CreateOr ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 105 of file TargetFolder.h.

References llvm::ConstantExpr::getOr().

◆ CreatePointerBitCastOrAddrSpaceCast()

Constant* llvm::TargetFolder::CreatePointerBitCastOrAddrSpaceCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

◆ CreatePointerCast()

Constant* llvm::TargetFolder::CreatePointerCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

◆ CreatePtrToInt()

Constant* llvm::TargetFolder::CreatePtrToInt ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 204 of file TargetFolder.h.

References CreateCast().

◆ CreateSDiv()

Constant* llvm::TargetFolder::CreateSDiv ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 74 of file TargetFolder.h.

References llvm::ConstantExpr::getSDiv().

◆ CreateSelect()

Constant* llvm::TargetFolder::CreateSelect ( Constant C,
Constant True,
Constant False 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 247 of file TargetFolder.h.

References llvm::ConstantExpr::getSelect().

◆ CreateSExtOrBitCast()

Constant* llvm::TargetFolder::CreateSExtOrBitCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

◆ CreateShl()

Constant* llvm::TargetFolder::CreateShl ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 90 of file TargetFolder.h.

References llvm::ConstantExpr::getShl().

◆ CreateShuffleVector()

Constant* llvm::TargetFolder::CreateShuffleVector ( Constant V1,
Constant V2,
ArrayRef< int >  Mask 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 261 of file TargetFolder.h.

References llvm::ConstantExpr::getShuffleVector().

◆ CreateSRem()

Constant* llvm::TargetFolder::CreateSRem ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 84 of file TargetFolder.h.

References llvm::ConstantExpr::getSRem().

◆ CreateSub()

Constant* llvm::TargetFolder::CreateSub ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 56 of file TargetFolder.h.

References llvm::ConstantExpr::getSub().

◆ CreateTruncOrBitCast()

Constant* llvm::TargetFolder::CreateTruncOrBitCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

◆ CreateUDiv()

Constant* llvm::TargetFolder::CreateUDiv ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 70 of file TargetFolder.h.

References llvm::ConstantExpr::getUDiv().

◆ CreateUnOp()

Constant* llvm::TargetFolder::CreateUnOp ( Instruction::UnaryOps  Opc,
Constant C 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 132 of file TargetFolder.h.

References llvm::ConstantExpr::get().

◆ CreateURem()

Constant* llvm::TargetFolder::CreateURem ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 81 of file TargetFolder.h.

References llvm::ConstantExpr::getURem().

◆ CreateXor()

Constant* llvm::TargetFolder::CreateXor ( Constant LHS,
Constant RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 108 of file TargetFolder.h.

References llvm::ConstantExpr::getXor().

◆ CreateZExtOrBitCast()

Constant* llvm::TargetFolder::CreateZExtOrBitCast ( Constant C,
Type DestTy 
) const
inlineoverridevirtual

The documentation for this class was generated from the following files: