ΒΆllvm::Constant* ConstantFoldInstOperands(
llvm::Instruction* I,
ArrayRef<llvm::Constant*> Ops,
const llvm::DataLayout& DL,
const llvm::TargetLibraryInfo* TLI = nullptr)
llvm::Constant* ConstantFoldInstOperands(
llvm::Instruction* I,
ArrayRef<llvm::Constant*> Ops,
const llvm::DataLayout& DL,
const llvm::TargetLibraryInfo* TLI = nullptr)
Description
ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands. If successful, the constant result is returned, if not, null is returned. Note that this function can fail when attempting to fold instructions like loads and stores, which have no constant expression form.
Declared at: llvm/include/llvm/Analysis/ConstantFolding.h:61
Parameters
- llvm::Instruction* I
- ArrayRef<llvm::Constant*> Ops
- const llvm::DataLayout& DL
- const llvm::TargetLibraryInfo* TLI = nullptr