mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Move some constant folding logic for loads out of instcombine into
Analysis/ConstantFolding.cpp. This doesn't change the behavior of instcombine but makes other clients of ConstantFoldInstruction able to handle loads. This was partially extracted from Eli's patch in PR3152. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -62,6 +62,10 @@ Constant *ConstantFoldCompareInstOperands(unsigned Predicate,
|
||||
LLVMContext &Context,
|
||||
const TargetData *TD = 0);
|
||||
|
||||
/// ConstantFoldLoadFromConstPtr - Return the value that a load from C would
|
||||
/// produce if it is constant and determinable. If this is not determinable,
|
||||
/// return null.
|
||||
Constant *ConstantFoldLoadFromConstPtr(Constant *C, const TargetData *TD = 0);
|
||||
|
||||
/// ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a
|
||||
/// getelementptr constantexpr, return the constant value being addressed by the
|
||||
|
Reference in New Issue
Block a user