LLVM  14.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)
 
ValueFoldAdd (Value *LHS, Value *RHS, bool HasNUW=false, bool HasNSW=false) const override
 
ValueFoldAnd (Value *LHS, Value *RHS) const override
 
ValueFoldOr (Value *LHS, Value *RHS) const override
 
ValueFoldICmp (CmpInst::Predicate P, Value *LHS, Value *RHS) const override
 
ValueFoldGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, bool IsInBounds=false) const override
 
ValueFoldSelect (Value *C, Value *True, Value *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
 
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
 
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
 
ConstantCreateFCmp (CmpInst::Predicate P, Constant *LHS, Constant *RHS) 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.

References DL.

Member Function Documentation

◆ CreateAShr()

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

Implements llvm::IRBuilderFolder.

Definition at line 157 of file TargetFolder.h.

References llvm::ConstantExpr::getAShr(), LHS, and RHS.

◆ CreateBinOp()

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

Implements llvm::IRBuilderFolder.

Definition at line 165 of file TargetFolder.h.

References llvm::ConstantExpr::get(), LHS, and RHS.

◆ CreateBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 215 of file TargetFolder.h.

References CreateCast().

◆ CreateCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 193 of file TargetFolder.h.

References llvm::ConstantExpr::getCast().

Referenced by CreateBitCast(), CreateIntToPtr(), and CreatePtrToInt().

◆ CreateExtractElement()

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

Implements llvm::IRBuilderFolder.

Definition at line 260 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 274 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 112 of file TargetFolder.h.

References llvm::ConstantExpr::getFAdd(), LHS, and RHS.

◆ CreateFCmp()

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

Implements llvm::IRBuilderFolder.

Definition at line 251 of file TargetFolder.h.

References llvm::ConstantExpr::getCompare(), LHS, P, and RHS.

◆ CreateFDiv()

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

Implements llvm::IRBuilderFolder.

Definition at line 137 of file TargetFolder.h.

References llvm::ConstantExpr::getFDiv(), LHS, and RHS.

◆ CreateFMul()

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

Implements llvm::IRBuilderFolder.

Definition at line 126 of file TargetFolder.h.

References llvm::ConstantExpr::getFMul(), LHS, and RHS.

◆ CreateFNeg()

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

Implements llvm::IRBuilderFolder.

Definition at line 178 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 210 of file TargetFolder.h.

References llvm::ConstantExpr::getFPCast().

◆ CreateFRem()

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

Implements llvm::IRBuilderFolder.

Definition at line 146 of file TargetFolder.h.

References llvm::ConstantExpr::getFRem(), LHS, and RHS.

◆ CreateFSub()

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

Implements llvm::IRBuilderFolder.

Definition at line 119 of file TargetFolder.h.

References llvm::ConstantExpr::getFSub(), LHS, and RHS.

◆ CreateInsertElement()

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

Implements llvm::IRBuilderFolder.

Definition at line 264 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 279 of file TargetFolder.h.

References llvm::ConstantExpr::getInsertValue().

◆ CreateIntCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 199 of file TargetFolder.h.

References llvm::ConstantExpr::getIntegerCast().

◆ CreateIntToPtr()

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

Implements llvm::IRBuilderFolder.

Definition at line 218 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 153 of file TargetFolder.h.

References llvm::ConstantExpr::getLShr(), LHS, and RHS.

◆ CreateMul()

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

Implements llvm::IRBuilderFolder.

Definition at line 122 of file TargetFolder.h.

References llvm::ConstantExpr::getMul(), LHS, and RHS.

◆ CreateNeg()

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

Implements llvm::IRBuilderFolder.

Definition at line 174 of file TargetFolder.h.

References llvm::ConstantExpr::getNeg().

◆ CreateNot()

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

Implements llvm::IRBuilderFolder.

Definition at line 181 of file TargetFolder.h.

References llvm::ConstantExpr::getNot().

◆ CreatePointerBitCastOrAddrSpaceCast()

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

◆ CreatePointerCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 205 of file TargetFolder.h.

References llvm::ConstantExpr::getPointerCast().

◆ CreatePtrToInt()

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

Implements llvm::IRBuilderFolder.

Definition at line 221 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 133 of file TargetFolder.h.

References llvm::ConstantExpr::getSDiv(), LHS, and RHS.

◆ CreateSExtOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 229 of file TargetFolder.h.

References llvm::ConstantExpr::getSExtOrBitCast().

◆ CreateShl()

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

Implements llvm::IRBuilderFolder.

Definition at line 149 of file TargetFolder.h.

References llvm::ConstantExpr::getShl(), LHS, and RHS.

◆ CreateShuffleVector()

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

◆ CreateSRem()

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

Implements llvm::IRBuilderFolder.

Definition at line 143 of file TargetFolder.h.

References llvm::ConstantExpr::getSRem(), LHS, and RHS.

◆ CreateSub()

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

Implements llvm::IRBuilderFolder.

Definition at line 115 of file TargetFolder.h.

References llvm::ConstantExpr::getSub(), LHS, and RHS.

◆ CreateTruncOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 234 of file TargetFolder.h.

References llvm::ConstantExpr::getTruncOrBitCast().

◆ CreateUDiv()

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

Implements llvm::IRBuilderFolder.

Definition at line 129 of file TargetFolder.h.

References llvm::ConstantExpr::getUDiv(), LHS, and RHS.

◆ CreateUnOp()

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

Implements llvm::IRBuilderFolder.

Definition at line 185 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 140 of file TargetFolder.h.

References llvm::ConstantExpr::getURem(), LHS, and RHS.

◆ CreateXor()

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

Implements llvm::IRBuilderFolder.

Definition at line 161 of file TargetFolder.h.

References llvm::ConstantExpr::getXor(), LHS, and RHS.

◆ CreateZExtOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 224 of file TargetFolder.h.

References llvm::ConstantExpr::getZExtOrBitCast().

◆ FoldAdd()

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

Implements llvm::IRBuilderFolder.

Definition at line 51 of file TargetFolder.h.

References llvm::ConstantExpr::getAdd(), LHS, and RHS.

◆ FoldAnd()

Value* llvm::TargetFolder::FoldAnd ( Value LHS,
Value RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 60 of file TargetFolder.h.

References llvm::ConstantExpr::getAnd(), LHS, and RHS.

◆ FoldGEP()

Value* llvm::TargetFolder::FoldGEP ( Type Ty,
Value Ptr,
ArrayRef< Value * >  IdxList,
bool  IsInBounds = false 
) const
inlineoverridevirtual

◆ FoldICmp()

Value* llvm::TargetFolder::FoldICmp ( CmpInst::Predicate  P,
Value LHS,
Value RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 76 of file TargetFolder.h.

References llvm::ConstantExpr::getCompare(), LHS, P, and RHS.

◆ FoldOr()

Value* llvm::TargetFolder::FoldOr ( Value LHS,
Value RHS 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 68 of file TargetFolder.h.

References llvm::ConstantExpr::getOr(), LHS, and RHS.

◆ FoldSelect()

Value* llvm::TargetFolder::FoldSelect ( Value C,
Value True,
Value False 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 98 of file TargetFolder.h.

References R600_InstFlag::FC, and llvm::ConstantExpr::getSelect().


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