LLVM 22.0.0git
llvm::InstSimplifyFolder Class Referencefinal

InstSimplifyFolder - Use InstructionSimplify to fold operations to existing values. More...

#include "llvm/Analysis/InstSimplifyFolder.h"

Inheritance diagram for llvm::InstSimplifyFolder:
[legend]

Public Member Functions

 InstSimplifyFolder (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
ValueFoldUnOpFMF (Instruction::UnaryOps Opc, Value *V, FastMathFlags FMF) const override
ValueFoldCmp (CmpInst::Predicate P, Value *LHS, Value *RHS) const override
ValueFoldGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, GEPNoWrapFlags NW) 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
ValueFoldCast (Instruction::CastOps Op, Value *V, Type *DestTy) const override
ValueFoldBinaryIntrinsic (Intrinsic::ID ID, Value *LHS, Value *RHS, Type *Ty, Instruction *FMFSource) const override
ValueCreatePointerCast (Constant *C, Type *DestTy) const override
ValueCreatePointerBitCastOrAddrSpaceCast (Constant *C, Type *DestTy) const override
Public Member Functions inherited from llvm::IRBuilderFolder
virtual ~IRBuilderFolder ()

Detailed Description

InstSimplifyFolder - Use InstructionSimplify to fold operations to existing values.

Also applies target-specific constant folding when not using InstructionSimplify.

Definition at line 36 of file InstSimplifyFolder.h.

Constructor & Destructor Documentation

◆ InstSimplifyFolder()

llvm::InstSimplifyFolder::InstSimplifyFolder ( const DataLayout & DL)
inlineexplicit

Definition at line 43 of file InstSimplifyFolder.h.

References DL.

Member Function Documentation

◆ CreatePointerBitCastOrAddrSpaceCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 138 of file InstSimplifyFolder.h.

References llvm::CallingConv::C.

◆ CreatePointerCast()

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

Implements llvm::IRBuilderFolder.

Definition at line 132 of file InstSimplifyFolder.h.

References llvm::CallingConv::C.

◆ FoldBinaryIntrinsic()

Value * llvm::InstSimplifyFolder::FoldBinaryIntrinsic ( Intrinsic::ID ID,
Value * LHS,
Value * RHS,
Type * Ty,
Instruction * FMFSource ) const
inlineoverridevirtual

◆ FoldBinOp()

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

Implements llvm::IRBuilderFolder.

Definition at line 52 of file InstSimplifyFolder.h.

References LHS, Opc, RHS, and simplifyBinOp().

◆ FoldBinOpFMF()

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

Implements llvm::IRBuilderFolder.

Definition at line 67 of file InstSimplifyFolder.h.

References LHS, Opc, RHS, and simplifyBinOp().

◆ FoldCast()

Value * llvm::InstSimplifyFolder::FoldCast ( Instruction::CastOps Op,
Value * V,
Type * DestTy ) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 117 of file InstSimplifyFolder.h.

References simplifyCastInst().

◆ FoldCmp()

Value * llvm::InstSimplifyFolder::FoldCmp ( CmpInst::Predicate P,
Value * LHS,
Value * RHS ) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 77 of file InstSimplifyFolder.h.

References LHS, P, RHS, and simplifyCmpInst().

◆ FoldExactBinOp()

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

Implements llvm::IRBuilderFolder.

Definition at line 57 of file InstSimplifyFolder.h.

References LHS, Opc, RHS, and simplifyBinOp().

◆ FoldExtractElement()

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

Implements llvm::IRBuilderFolder.

Definition at line 100 of file InstSimplifyFolder.h.

References simplifyExtractElementInst().

◆ FoldExtractValue()

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

Implements llvm::IRBuilderFolder.

Definition at line 90 of file InstSimplifyFolder.h.

References simplifyExtractValueInst().

◆ FoldGEP()

Value * llvm::InstSimplifyFolder::FoldGEP ( Type * Ty,
Value * Ptr,
ArrayRef< Value * > IdxList,
GEPNoWrapFlags NW ) const
inlineoverridevirtual

Implements llvm::IRBuilderFolder.

Definition at line 81 of file InstSimplifyFolder.h.

References Ptr, and simplifyGEPInst().

◆ FoldInsertElement()

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

Implements llvm::IRBuilderFolder.

Definition at line 104 of file InstSimplifyFolder.h.

References llvm::simplifyInsertElementInst().

◆ FoldInsertValue()

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

Implements llvm::IRBuilderFolder.

Definition at line 95 of file InstSimplifyFolder.h.

References simplifyInsertValueInst().

◆ FoldNoWrapBinOp()

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

Implements llvm::IRBuilderFolder.

Definition at line 62 of file InstSimplifyFolder.h.

References LHS, Opc, RHS, and simplifyBinOp().

◆ FoldSelect()

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

Implements llvm::IRBuilderFolder.

Definition at line 86 of file InstSimplifyFolder.h.

References llvm::CallingConv::C, and simplifySelectInst().

◆ FoldShuffleVector()

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

◆ FoldUnOpFMF()

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

Implements llvm::IRBuilderFolder.

Definition at line 72 of file InstSimplifyFolder.h.

References Opc, and simplifyUnOp().


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