This is an archive of the discontinued LLVM Phabricator instance.

[FastISel] Respect musttail over "disable-tail-calls"
ClosedPublic

Authored by aeubanks on Aug 18 2022, 6:23 PM.

Details

Summary

musttail should be honored even in the presence of attributes like "disable-tail-calls". SelectionDAG properly handles this.

Update LangRef to explicitly mention that this is the semantics of musttail.

Diff Detail

Event Timeline

aeubanks created this revision.Aug 18 2022, 6:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2022, 6:23 PM
aeubanks requested review of this revision.Aug 18 2022, 6:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2022, 6:23 PM

Is this explicitly documented anywhere? I can't find anything in langref

https://llvm.org/docs/LangRef.html#call-instruction
The musttail marker means that the call must be tail call optimized in order for the program to be correct. I read this as regardless of any attributes
And SelectionDAG properly handles this

https://llvm.org/docs/LangRef.html#call-instruction
The musttail marker means that the call must be tail call optimized in order for the program to be correct. I read this as regardless of any attributes
And SelectionDAG properly handles this

Should the description be updated to make that explicit? Worth adding the doc tweak to this patch?

aeubanks updated this revision to Diff 454081.Aug 19 2022, 12:39 PM

add langref clarification

aeubanks edited the summary of this revision. (Show Details)Aug 19 2022, 12:40 PM
rnk accepted this revision.Aug 22 2022, 9:12 PM

lgtm

This revision is now accepted and ready to land.Aug 22 2022, 9:12 PM
This revision was landed with ongoing or failed builds.Aug 23 2022, 8:56 AM
This revision was automatically updated to reflect the committed changes.