summaryrefslogtreecommitdiff
path: root/tools/gccld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-07 22:12:40 +0000
committerChris Lattner <sabre@nondot.org>2004-03-07 22:12:40 +0000
commitf8338c4375b25cbb61b5ea38b2e0006efa554db7 (patch)
tree0910a2df87f8aac7b893d4894ef669eeaa11ffde /tools/gccld
parent7e6f5090afbb5c05c8f73c836d56aadb16425bb0 (diff)
downloadllvm-f8338c4375b25cbb61b5ea38b2e0006efa554db7.tar.gz
llvm-f8338c4375b25cbb61b5ea38b2e0006efa554db7.tar.bz2
llvm-f8338c4375b25cbb61b5ea38b2e0006efa554db7.tar.xz
Run the new pass in gccld now that it passes all tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r--tools/gccld/GenerateCode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index 982a7e3cd4..d2c0f3dd31 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -111,6 +111,10 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
if (!DisableInline)
addPass(Passes, createFunctionInliningPass()); // Inline small functions
+ // If we didn't decide to inline a function, check to see if we can
+ // transform it to pass arguments by value instead of by reference.
+ addPass(Passes, createArgumentPromotionPass());
+
// The IPO passes may leave cruft around. Clean up after them.
addPass(Passes, createInstructionCombiningPass());