summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-14 18:22:19 +0000
committerChris Lattner <sabre@nondot.org>2002-08-14 18:22:19 +0000
commit9b2b80fd48b10396be85a71735ffda0c155e5f72 (patch)
tree6692bde60558ad98d3f28b131accfd66e8da2b91 /lib
parent9c16dba29f2b8d894683b398802d590685e6f7a1 (diff)
downloadexternal_llvm-9b2b80fd48b10396be85a71735ffda0c155e5f72.zip
external_llvm-9b2b80fd48b10396be85a71735ffda0c155e5f72.tar.gz
external_llvm-9b2b80fd48b10396be85a71735ffda0c155e5f72.tar.bz2
Fix bug introduced in last checkin due to CastInst not being visible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp3
-rw-r--r--lib/Transforms/Scalar/LICM.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index a99a502..2f1be3b 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -253,7 +253,8 @@ void GCSE::CommonSubExpressionFound(Instruction *I, Instruction *Other) {
//
//===----------------------------------------------------------------------===//
-bool GCSE::visitCastInst(CastInst &I) {
+bool GCSE::visitCastInst(CastInst &CI) {
+ Instruction &I = (Instruction&)CI;
Value *Op = I.getOperand(0);
Function *F = I.getParent()->getParent();
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 8bcb227..1cb899b 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -88,8 +88,9 @@ namespace {
if (isLoopInvariant(I.getOperand(0)) && isLoopInvariant(I.getOperand(1)))
hoist(I);
}
- void visitCastInst(CastInst &I) {
- if (isLoopInvariant(I.getOperand(0))) hoist((Instruction&)I);
+ void visitCastInst(CastInst &CI) {
+ Instruction &I = (Instruction&)CI;
+ if (isLoopInvariant(I.getOperand(0))) hoist(I);
}
void visitShiftInst(ShiftInst &I) { visitBinaryOperator((Instruction&)I); }