summaryrefslogtreecommitdiffstats
path: root/llvm
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
commitb80b69cc3e6d865b4f4900bae758c3d6aeff7383 (patch)
treebd120543000f3887055c1975b52c3bdf388a6c56 /llvm
parent8fd96fcdafb6f673f01a3516118e55bbf7990226 (diff)
downloadbcm5719-llvm-b80b69cc3e6d865b4f4900bae758c3d6aeff7383.tar.gz
bcm5719-llvm-b80b69cc3e6d865b4f4900bae758c3d6aeff7383.zip
Fix bug introduced in last checkin due to CastInst not being visible
llvm-svn: 3327
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Scalar/GCSE.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp
index a99a502348e..2f1be3b2467 100644
--- a/llvm/lib/Transforms/Scalar/GCSE.cpp
+++ b/llvm/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/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 8bcb227e74b..1cb899bf6e2 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/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); }
OpenPOWER on IntegriCloud