This is an archive of the discontinued LLVM Phabricator instance.

Restore ability for C++ API users to Enable IPRA.
ClosedPublic

Authored by dsanders on Sep 19 2017, 10:05 AM.

Details

Summary

Prior to r310876 one of our out-of-tree targets was enabling IPRA by modifying
the TargetOptions::EnableIPRA. This no longer works on current trunk since the
useIPRA() hook overrides any values that are set in advance. This patch adjusts
the behaviour of the hook so that API users and useIPRA() can both enable it
but useIPRA() cannot disable it if the API user already enabled it.

Diff Detail

Repository
rL LLVM

Event Timeline

dsanders created this revision.Sep 19 2017, 10:05 AM
arsenm added inline comments.Sep 19 2017, 6:06 PM
lib/CodeGen/TargetPassConfig.cpp
376 ↗(On Diff #115859)

I'm confused why you would want to still be directly setting this instead of using the new hook

dsanders added inline comments.Sep 20 2017, 3:18 AM
lib/CodeGen/TargetPassConfig.cpp
376 ↗(On Diff #115859)

For a given target, the hook only allows us to enable it for every compile or disable it for every compile. We need to be able to enable it for some compiles and disable it for others.

arsenm accepted this revision.Feb 21 2019, 6:24 PM

LGTM

This revision is now accepted and ready to land.Feb 21 2019, 6:24 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2019, 12:58 PM