diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-18 01:05:25 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-18 01:05:25 +0000 |
commit | 85e349fd2c71186eeb5b0f1c48573f61e61c9c5b (patch) | |
tree | 145c54da7811e9306214d62d8d6c2e30a76b37be /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 49f3ec80c20f11b874c732307ea0788adf96c1ce (diff) | |
download | bcm5719-llvm-85e349fd2c71186eeb5b0f1c48573f61e61c9c5b.tar.gz bcm5719-llvm-85e349fd2c71186eeb5b0f1c48573f61e61c9c5b.zip |
BackendUtil: Pass through -mdisable-tail-calls
The frontend option -fno-optimize-sibling-calls resolves to -cc1's
-mdisable-tail-calls, which is passed to the TargetMachine in the
backend. PassManagerBuilder was adding the -tailcallelim pass anyway.
Use a new DisableTailCalls option in PassManagerBuilder to disable tail
calls harder.
Requires the matching commit in LLVM that adds DisableTailCalls.
<rdar://problem/16050591>
llvm-svn: 206543
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index b75c62a4223..2c388ef58e9 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -247,6 +247,7 @@ void EmitAssemblyHelper::CreatePasses() { PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP; PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop; + PMBuilder.DisableTailCalls = CodeGenOpts.DisableTailCalls; PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime; PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; |