[llvm-branch-commits] [llvm] [AMDGPU][Attributor] Add a pass parameter `closed-world` for AMDGPUAttributor pass (PR #101760)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Aug 4 00:26:50 PDT 2024
================
@@ -661,6 +662,24 @@ Error AMDGPUTargetMachine::buildCodeGenPipeline(
return CGPB.buildPipeline(MPM, Out, DwoOut, FileType);
}
+Expected<AMDGPUAttributorOptions>
+parseAMDGPUAttributorPassOptions(StringRef Params) {
+ AMDGPUAttributorOptions Result;
+ while (!Params.empty()) {
+ StringRef ParamName;
+ std::tie(ParamName, Params) = Params.split(';');
+ if (ParamName == "closed-world") {
+ Result.IsClosedWorld = true;
+ } else {
+ return make_error<StringError>(
+ formatv("invalid AMDGPUAttributor pass parameter '{0}' ", ParamName)
----------------
arsenm wrote:
Add a test for the error case
https://github.com/llvm/llvm-project/pull/101760
More information about the llvm-branch-commits
mailing list