From: Chris Lattner Date: Wed, 14 Aug 2002 18:22:19 +0000 (+0000) Subject: Fix bug introduced in last checkin due to CastInst not being visible X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b2b80fd48b10396be85a71735ffda0c155e5f72;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index a99a502348e..2f1be3b2467 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 8bcb227e74b..1cb899bf6e2 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); }