diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-02 06:34:04 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-02 06:34:04 +0000 |
| commit | 47837c51829049b27caa560be99dc13b0249f9b0 (patch) | |
| tree | 5cb4eaa26790813c397135d1f084215b23b48ccd /llvm/lib | |
| parent | 55033283326526fb606e21577c53045bf002eeed (diff) | |
| download | bcm5719-llvm-47837c51829049b27caa560be99dc13b0249f9b0.tar.gz bcm5719-llvm-47837c51829049b27caa560be99dc13b0249f9b0.zip | |
don't mark the arguments of prototype overdefined, they will never be queried.
llvm-svn: 85793
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 553c94bebc5..c11380abf5e 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1646,16 +1646,19 @@ bool IPSCCP::runOnModule(Module &M) { // Loop over all functions, marking arguments to those with their addresses // taken or that are external as overdefined. // - for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) + for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { + if (F->isDeclaration()) + continue; + if (!F->hasLocalLinkage() || AddressIsTaken(F)) { - if (!F->isDeclaration()) - Solver.MarkBlockExecutable(F->begin()); + Solver.MarkBlockExecutable(F->begin()); for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); AI != E; ++AI) Solver.markOverdefined(AI); } else { Solver.AddTrackedFunction(F); } + } // Loop over global variables. We inform the solver about any internal global // variables that do not have their 'addresses taken'. If they don't have |

