[PATCH] D16302: [opaque pointer types] [NFC] ConstantFoldInstOperands: add a form taking the Instruction or ConstantExpr for GEPs.
Eduard Burtescu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 16:29:35 PST 2016
eddyb added inline comments.
================
Comment at: include/llvm/Analysis/ConstantFolding.h:50-55
@@ -48,2 +49,8 @@
+ Constant *ConstantFoldInstOperands(const Value *InstOrCE,
+ unsigned Opcode, Type *DestTy,
+ ArrayRef<Constant *> Ops,
+ const DataLayout &DL,
+ const TargetLibraryInfo *TLI = nullptr);
+
/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
----------------
That's not really possible without introducing a special case at each call site.
Or maybe I can add a function to wrap `ConstantFoldInstOperands(I, I->getOpcode(), I->getType(), ...)` in the `Instruction*` case, that seems more plausible.
http://reviews.llvm.org/D16302
More information about the llvm-commits
mailing list