This patch allows the compile option -mcode-object-v3 to be set by default, unless the -mno-code-object-v3 is added to the compile options.
Details
- Reviewers
yaxunl kzhuravl - Commits
- rGfd2c5c05fc8f: Partial revert of r353952: [HIP] Handle compile -m options and propagate into…
rC355106: Partial revert of r353952: [HIP] Handle compile -m options and propagate into…
rL355106: Partial revert of r353952: [HIP] Handle compile -m options and propagate into…
rG7084b56ee2e0: [HIP] Handle compile -m options and propagate into LLC
rC353952: [HIP] Handle compile -m options and propagate into LLC
rL353952: [HIP] Handle compile -m options and propagate into LLC
rGa1adb80ae7ad: [HIP] Fix hip-toolchain-rdc tests
rL353885: [HIP] Fix hip-toolchain-rdc tests
rC353885: [HIP] Fix hip-toolchain-rdc tests
rG41bbc6e04cb1: [HIP] Handle compile -m options and propagate into LLC
rL353880: [HIP] Handle compile -m options and propagate into LLC
rC353880: [HIP] Handle compile -m options and propagate into LLC
Diff Detail
Event Timeline
Can you handle all features as follows instead of checking a particular option?
handleTargetFeaturesGroup(Args, Features, options::OPT_m_amdgpu_Features_Group)
There is code in AMDGPU tool chain you can use as a reference.
Changed patch to us handleTargetFeatures, to consume all -m options passed into clang.
Can you add some tests? Preferably with -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3
I've added a lit test to check for options such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3
Yes, but it will need this PR: https://github.com/ROCm-Developer-Tools/HIP/pull/910
So that the default is set.
LGTM. Please make sure to update your commit message as your patch processes all m options now.
I think this breaks the attributes already listed in the functions on the IR since -mattr overrides those. I think we need to stop using subtarget features to communicate this