]> granicus.if.org Git - clang/commit
BackendUtil: Pass through -mdisable-tail-calls
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 18 Apr 2014 01:05:25 +0000 (01:05 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 18 Apr 2014 01:05:25 +0000 (01:05 +0000)
commit919d845e814b0bc74cc55191ac1b4257b2e5ce5e
treef776341c42cf0cb177c826a049e88bdb3a9c6050
parentdea85f9d241126f844cc46d4e91e7755c8e1851c
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206543 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BackendUtil.cpp
test/CodeGen/disable-tail-calls.c [new file with mode: 0644]