summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombine.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-04 07:53:58 +0000
committerChris Lattner <sabre@nondot.org>2010-01-04 07:53:58 +0000
commit80f43d339f0a5904c62ca6268939c14ab148b94f (patch)
treebcc899c22386a05cc89b89cbb3a749b76f04a2f9 /lib/Transforms/InstCombine/InstCombine.h
parent02446fc99abb06d3117d65c0b1f5fba4f906db2e (diff)
downloadllvm-80f43d339f0a5904c62ca6268939c14ab148b94f.tar.gz
llvm-80f43d339f0a5904c62ca6268939c14ab148b94f.tar.bz2
llvm-80f43d339f0a5904c62ca6268939c14ab148b94f.tar.xz
split 943 lines of instcombine out to a new InstCombineCasts.cpp
file. InstructionCombining.cpp is now down to a svelte 9300 lines :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombine.h')
-rw-r--r--lib/Transforms/InstCombine/InstCombine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h
index a1e9f2ffe3..7e20be41af 100644
--- a/lib/Transforms/InstCombine/InstCombine.h
+++ b/lib/Transforms/InstCombine/InstCombine.h
@@ -193,7 +193,17 @@ public:
Instruction *visitInstruction(Instruction &I) { return 0; }
private:
+ bool ShouldChangeType(const Type *From, const Type *To) const;
Value *dyn_castNegVal(Value *V) const;
+ const Type *FindElementAtOffset(const Type *Ty, int64_t Offset,
+ SmallVectorImpl<Value*> &NewIndices);
+ Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
+
+ /// ValueRequiresCast - Return true if the cast from "V to Ty" actually
+ /// results in any code being generated. It does not require codegen if V is
+ /// simple enough or if the cast can be folded into other casts.
+ bool ValueRequiresCast(Instruction::CastOps opcode,const Value *V,
+ const Type *Ty);
Instruction *visitCallSite(CallSite CS);
bool transformConstExprCastCall(CallSite CS);