[llvm-commits] CVS: llvm/lib/Transforms/IPO/Inliner.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jun 19 23:19:01 PDT 2004
Changes in directory llvm/lib/Transforms/IPO:
Inliner.cpp updated: 1.15 -> 1.16
---
Log message:
Fix the inliner to be deterministic, not letting its output depend on the
relative location of Function objects in memory.
---
Diffs of the changes: (+3 -4)
Index: llvm/lib/Transforms/IPO/Inliner.cpp
diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.15 llvm/lib/Transforms/IPO/Inliner.cpp:1.16
--- llvm/lib/Transforms/IPO/Inliner.cpp:1.15 Mon May 24 01:24:46 2004
+++ llvm/lib/Transforms/IPO/Inliner.cpp Sat Jun 19 23:11:48 2004
@@ -1,4 +1,4 @@
-//===- InlineCommon.cpp - Code common to all inliners ---------------------===//
+//===- Inliner.cpp - Code common to all inliners --------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -90,9 +90,8 @@
// from inlining other functions.
std::vector<CallSite> CallSites;
- for (std::set<Function*>::iterator SCCI = SCCFunctions.begin(),
- E = SCCFunctions.end(); SCCI != E; ++SCCI)
- if (Function *F = *SCCI)
+ for (unsigned i = 0, e = SCC.size(); i != e; ++i)
+ if (Function *F = SCC[i]->getFunction())
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
CallSite CS = CallSite::get(I);
More information about the llvm-commits
mailing list