[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Nicholas Hildenbrandt
hldnbrnd at cs.uiuc.edu
Wed Nov 6 14:09:01 PST 2002
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.69 -> 1.70
---
Log message:
Loads and stores can't be inlined. This fixes test/Singlesource/matrixTranspose
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.69 llvm/lib/CWriter/Writer.cpp:1.70
--- llvm/lib/CWriter/Writer.cpp:1.69 Fri Nov 1 11:37:09 2002
+++ llvm/lib/CWriter/Writer.cpp Wed Nov 6 14:07:54 2002
@@ -94,7 +94,8 @@
// Must be an expression, must be used exactly once. If it is dead, we
// emit it inline where it would go.
if (I.getType() == Type::VoidTy || I.use_size() != 1 ||
- isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I))
+ isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I) ||
+ isa<LoadInst>(I)) // Don't inline a load across a store!
return false;
// Only inline instruction it it's use is in the same BB as the inst.
More information about the llvm-commits
mailing list