diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-20 04:11:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-20 04:11:48 +0000 |
commit | cf5933a716e7eb6bd5ff49aa62f3e76379ebaf51 (patch) | |
tree | 4a29d051a5ffa76e47823fc3590c2ce3963fb2d5 /lib | |
parent | 8e6d2bb8fa3e4d62fa3e0623d84381fcc4dc4330 (diff) | |
download | external_llvm-cf5933a716e7eb6bd5ff49aa62f3e76379ebaf51.zip external_llvm-cf5933a716e7eb6bd5ff49aa62f3e76379ebaf51.tar.gz external_llvm-cf5933a716e7eb6bd5ff49aa62f3e76379ebaf51.tar.bz2 |
Fix the inliner to be deterministic, not letting its output depend on the
relative location of Function objects in memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/Inliner.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index 0abc4f7..8fca968 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -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 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) { // 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); |