This is an archive of the discontinued LLVM Phabricator instance.

Stop resetting DisableTailCalls in TargetMachine::resetTargetOptions
ClosedPublic

Authored by ahatanak on May 28 2015, 12:11 PM.

Details

Summary

This patch makes changes in TargetMachine::resetTargetOptions to stop setting DisableTallCalls based on function attribute "disable-tail-calls". DisableTailCalls is the last non-fast-math option that is set in resetTargetOptions, so we should be able to remove this function entirely after the work to propagate IR-level fast-math flags to DAG nodes is completed.

Also, this patch enables cl:opt option "disable-tail-calls" to override function attribute "disable-tail-calls".

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak updated this revision to Diff 26720.May 28 2015, 12:11 PM
ahatanak retitled this revision from to Stop resetting DisableTailCalls in TargetMachine::resetTargetOptions.
ahatanak updated this object.
ahatanak edited the test plan for this revision. (Show Details)
ahatanak added reviewers: echristo, dexonsmith.
ahatanak added a subscriber: Unknown Object (MLST).
echristo edited edge metadata.Jun 8 2015, 2:38 PM

Hi Akira,

Can you add a "no attribute" function to the testcase as well? Also probably test with x86 since you're changing that backend as well that matches the ARM one?

I assume there's a front end patch that I'm missing that goes along with this?

Thanks!

-eric

Hi Akira,

Just saw the frontend patch, so go ahead and ignore that question :)

-eric

ahatanak updated this revision to Diff 27348.Jun 8 2015, 4:42 PM
ahatanak edited edge metadata.

Added a function that doesn't have any attributes and a test case for x86_64.

echristo accepted this revision.Jun 9 2015, 8:10 AM
echristo edited edge metadata.

LGTM, thanks!

-eric

This revision is now accepted and ready to land.Jun 9 2015, 8:10 AM
This revision was automatically updated to reflect the committed changes.