[llvm-commits] [llvm] r67065 - /llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp
Bill Wendling
isanbard at gmail.com
Mon Mar 16 17:48:33 PDT 2009
Author: void
Date: Mon Mar 16 19:48:33 2009
New Revision: 67065
URL: http://llvm.org/viewvc/llvm-project?rev=67065&view=rev
Log:
--- Merging (from foreign repository) r67064 into '.':
U lib/Transforms/Scalar/JumpThreading.cpp
Fix a debug info dependency in jump threading.
Modified:
llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp
Modified: llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp?rev=67065&r1=67064&r2=67065&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Scalar/JumpThreading.cpp Mon Mar 16 19:48:33 2009
@@ -432,10 +432,13 @@
// If DESTBB *just* contains the switch, then we can forward edges from PREDBB
// directly to their destination. This does not introduce *any* code size
- // growth.
+ // growth. Skip debug info first.
+ BasicBlock::iterator BBI = DestBB->begin();
+ while (isa<DbgInfoIntrinsic>(BBI))
+ BBI++;
// FIXME: Thread if it just contains a PHI.
- if (isa<SwitchInst>(DestBB->begin())) {
+ if (isa<SwitchInst>(BBI)) {
bool MadeChange = false;
// Ignore the default edge for now.
for (unsigned i = 1, e = DestSI->getNumSuccessors(); i != e; ++i) {
More information about the llvm-commits
mailing list