[llvm-commits] patch: target option to disable tail calls
nlewycky at google.com
Wed Jan 18 17:17:14 PST 2012
On 18 January 2012 17:15, Chad Rosier <mcrosier at apple.com> wrote:
> Hi Nick,
> From the test case:
> ;CALL: test1:
> ;CALL-NOT: ret
> ;CALL: callq helper
> ;CALL: ret
> Shouldn't it be:
> ; CALL-NOT: jmp
The call-not is there to ensure that we don't run past the end of the
function and match a call from a later test instead. Presumably if we emit
a jmp instead of a call, we'll fail to match the "callq helper".
Also, we generally put a space between the semi-colon and the first letter
> of the check prefix (i.e., "; CALL-NOT").
Good call, will do!
Same comments for test2.
> LGTM, otherwise.
> On Jan 18, 2012, at 4:02 PM, Nick Lewycky wrote:
> On 18 January 2012 15:19, Chad Rosier <mcrosier at apple.com> wrote:
>> Hi Nick,
>> Why not something more like disable-tail-calls? Most of the options
>> begin with verbs such as Enable, Disable, Emit, Trap, etc.
> Sounds good, replaced all over. Updated patch attached!
>> On Jan 18, 2012, at 3:10 PM, Nick Lewycky wrote:
>> > The attached patch adds a new "-no-tail-calls" flag to llc, and
>> implements it in the x86 backend only. The intent is to support gcc's
>> -fno-optimize-sibling-calls in clang, which as far as I can tell just
>> disables tail calls period. The goal is to help ASAN produce correct stack
>> traces, which requires disabling all tail calls.
>> > As an aside, there is a good reason to do this in the backend and not
>> at the IR-level. The "tail" marker is used to indicate things that are
>> useful to the optimizers themselves; for example alias analysis interprets
>> the presence of a tail marker as proof that the callee can't access any
>> alloca's in the caller, whether the pointer has been captured or not.
>> > Please review!
>> > Nick
>> > <no-tail-calls-1.patch>_______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits