LLVM  15.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)
 
ValueFoldBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS) const override
 
ValueFoldExactBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool IsExact) const override
 
ValueFoldNoWrapBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool HasNUW, bool HasNSW) const override
 
ValueFoldBinOpFMF (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, FastMathFlags FMF) const override
 
ValueFoldICmp (CmpInst::Predicate P, Value *LHS, Value *RHS) const override
 
ValueFoldUnOpFMF (Instruction::UnaryOps Opc, Value *V, FastMathFlags FMF) const override
 
ValueFoldGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, bool IsInBounds=false) const override
 
ValueFoldSelect (Value *C, Value *True, Value *False) const override
 
ValueFoldExtractValue (Value *Agg, ArrayRef< unsigned > IdxList) const override
 
ValueFoldInsertValue (Value *Agg, Value *Val, ArrayRef< unsigned > IdxList) const override
 
ValueFoldExtractElement (Value *Vec, Value *Idx) const override
 
ValueFoldInsertElement (Value *Vec, Value *NewElt, Value *Idx) const override
 
ValueFoldShuffleVector (Value *V1, Value *V2, ArrayRef< int > Mask) 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
 
- Public Member Functions inherited from llvm::IRBuilderFolder
virtual ~IRBuilderFolder ()
 

Detailed Description

TargetFolder - Create constants with target dependent folding.

Definition at line 34 of file TargetFolder.h.

Constructor & Destructor Documentation

◆ TargetFolder()

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

Definition at line 45 of file TargetFolder.h.

References DL.

Member Function Documentation

◆ CreateBitCast()

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

Implements llvm::IRBuilderFolder.

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

References llvm::ConstantExpr::getCast().

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

◆ CreateFCmp()

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

Implements llvm::IRBuilderFolder.

Definition at line 246 of file TargetFolder.h.

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

◆ CreateFPCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 205 of file TargetFolder.h.

References llvm::ConstantExpr::getFPCast().

◆ CreateIntCast()

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

Implements llvm::IRBuilderFolder.

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

References CreateCast().

◆ 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 200 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 216 of file TargetFolder.h.

References CreateCast().

◆ CreateSExtOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 224 of file TargetFolder.h.

References llvm::ConstantExpr::getSExtOrBitCast().

◆ CreateTruncOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 229 of file TargetFolder.h.

References llvm::ConstantExpr::getTruncOrBitCast().

◆ CreateZExtOrBitCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 219 of file TargetFolder.h.

References llvm::ConstantExpr::getZExtOrBitCast().

◆ FoldBinOp()

Value* llvm::TargetFolder::FoldBinOp ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS 
) const
inlineoverridevirtual

◆ FoldBinOpFMF()

Value* llvm::TargetFolder::FoldBinOpFMF ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
FastMathFlags  FMF 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 97 of file TargetFolder.h.

References FoldBinOp(), LHS, and RHS.

◆ FoldExactBinOp()

Value* llvm::TargetFolder::FoldExactBinOp ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
bool  IsExact 
) const
inlineoverridevirtual

◆ FoldExtractElement()

Value* llvm::TargetFolder::FoldExtractElement ( Value Vec,
Value Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 157 of file TargetFolder.h.

References llvm::ConstantExpr::getExtractElement().

◆ FoldExtractValue()

Value* llvm::TargetFolder::FoldExtractValue ( Value Agg,
ArrayRef< unsigned >  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 141 of file TargetFolder.h.

References llvm::ConstantFoldExtractValueInstruction().

◆ 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 102 of file TargetFolder.h.

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

◆ FoldInsertElement()

Value* llvm::TargetFolder::FoldInsertElement ( Value Vec,
Value NewElt,
Value Idx 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 165 of file TargetFolder.h.

References llvm::ConstantExpr::getInsertElement().

◆ FoldInsertValue()

Value* llvm::TargetFolder::FoldInsertValue ( Value Agg,
Value Val,
ArrayRef< unsigned >  IdxList 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 148 of file TargetFolder.h.

References llvm::ConstantFoldInsertValueInstruction().

◆ FoldNoWrapBinOp()

Value* llvm::TargetFolder::FoldNoWrapBinOp ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
bool  HasNUW,
bool  HasNSW 
) const
inlineoverridevirtual

◆ FoldSelect()

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

Implements llvm::IRBuilderFolder.

Definition at line 131 of file TargetFolder.h.

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

◆ FoldShuffleVector()

Value* llvm::TargetFolder::FoldShuffleVector ( Value V1,
Value V2,
ArrayRef< int Mask 
) const
inlineoverridevirtual

◆ FoldUnOpFMF()

Value* llvm::TargetFolder::FoldUnOpFMF ( Instruction::UnaryOps  Opc,
Value V,
FastMathFlags  FMF 
) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 110 of file TargetFolder.h.

References llvm::ConstantExpr::get().


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