diff options
author | Duncan Sands <baldrick@free.fr> | 2008-12-31 16:14:43 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-12-31 16:14:43 +0000 |
commit | 1410dfde5c04d0c94590baa0b86467e9153b4af6 (patch) | |
tree | 4b985f2525e7c6470e7a9d345b5c7eb7ffa889fe /tools | |
parent | 250918eb177828db01fb92ba13152ddbc0d0ce92 (diff) | |
download | external_llvm-1410dfde5c04d0c94590baa0b86467e9153b4af6.zip external_llvm-1410dfde5c04d0c94590baa0b86467e9153b4af6.tar.gz external_llvm-1410dfde5c04d0c94590baa0b86467e9153b4af6.tar.bz2 |
Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape. Mark such arguments 'nocapture'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/opt/opt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 9039553..b46f7c9 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -291,7 +291,7 @@ void AddOptimizationPasses(PassManager &MPM, FunctionPassManager &FPM, MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE if (UnitAtATime) { MPM.add(createPruneEHPass()); // Remove dead EH info - MPM.add(createAddReadAttrsPass()); // Set readonly/readnone attrs + MPM.add(createFunctionAttrsPass()); // Deduce function attrs } if (OptLevel > 1) MPM.add(createFunctionInliningPass()); // Inline small functions @@ -363,7 +363,7 @@ void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createCFGSimplificationPass()); // Clean up after IPCP & DAE addPass(PM, createPruneEHPass()); // Remove dead EH info - addPass(PM, createAddReadAttrsPass()); // Set readonly/readnone attrs + addPass(PM, createFunctionAttrsPass()); // Deduce function attrs if (!DisableInline) addPass(PM, createFunctionInliningPass()); // Inline small functions |