[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp
Nate Begeman
natebegeman at mac.com
Thu Mar 24 12:07:27 PST 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelSimple.cpp updated: 1.126 -> 1.127
---
Log message:
Commit Gabor Greif's patch to use iterators in lowering intrinsics.
---
Diffs of the changes: (+8 -7)
PPC32ISelSimple.cpp | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.126 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.127
--- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.126 Thu Mar 24 11:32:19 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Thu Mar 24 14:07:16 2005
@@ -1928,15 +1928,16 @@
BB->getInstList().erase(CI);
break;
}
- default:
+ default: {
// All other intrinsic calls we must lower.
- Instruction *Before = CI->getPrev();
+ BasicBlock::iterator me(CI);
+ bool atBegin(BB->begin() == me);
+ if (!atBegin)
+ --me;
TM.getIntrinsicLowering().LowerIntrinsicCall(CI);
- if (Before) { // Move iterator to instruction after call
- I = Before; ++I;
- } else {
- I = BB->begin();
- }
+ // Move iterator to instruction after call
+ I = atBegin ? BB->begin() : ++me;
+ }
}
}
More information about the llvm-commits
mailing list