-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMDGPU] Remove "amdgpu-enable-structurizer-workarounds" flag #105819
Merged
jmmartinez
merged 1 commit into
llvm:main
from
jmmartinez:clean/structurizer_workarounds
Aug 23, 2024
Merged
[AMDGPU] Remove "amdgpu-enable-structurizer-workarounds" flag #105819
jmmartinez
merged 1 commit into
llvm:main
from
jmmartinez:clean/structurizer_workarounds
Aug 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmmartinez
force-pushed
the
clean/structurizer_workarounds
branch
from
August 23, 2024 12:15
1a3e806
to
3335d9c
Compare
@llvm/pr-subscribers-backend-amdgpu Author: Juan Manuel Martinez Caamaño (jmmartinez) ChangesFull diff: https://github.com/llvm/llvm-project/pull/105819.diff 2 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 7a9735790371a1..7ac7b3315bb972 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -338,12 +338,6 @@ static cl::opt<bool> EnableScalarIRPasses(
cl::init(true),
cl::Hidden);
-static cl::opt<bool, true> EnableStructurizerWorkarounds(
- "amdgpu-enable-structurizer-workarounds",
- cl::desc("Enable workarounds for the StructurizeCFG pass"),
- cl::location(AMDGPUTargetMachine::EnableStructurizerWorkarounds),
- cl::init(true), cl::Hidden);
-
static cl::opt<bool, true> EnableLowerModuleLDS(
"amdgpu-enable-lower-module-lds", cl::desc("Enable lower module lds pass"),
cl::location(AMDGPUTargetMachine::EnableLowerModuleLDS), cl::init(true),
@@ -615,7 +609,6 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, const Triple &TT,
bool AMDGPUTargetMachine::EnableFunctionCalls = false;
bool AMDGPUTargetMachine::EnableLowerModuleLDS = true;
-bool AMDGPUTargetMachine::EnableStructurizerWorkarounds = true;
AMDGPUTargetMachine::~AMDGPUTargetMachine() = default;
@@ -1231,10 +1224,8 @@ bool GCNPassConfig::addPreISel() {
// Merge divergent exit nodes. StructurizeCFG won't recognize the multi-exit
// regions formed by them.
addPass(&AMDGPUUnifyDivergentExitNodesID);
- if (EnableStructurizerWorkarounds) {
- addPass(createFixIrreduciblePass());
- addPass(createUnifyLoopExitsPass());
- }
+ addPass(createFixIrreduciblePass());
+ addPass(createUnifyLoopExitsPass());
addPass(createStructurizeCFGPass(false)); // true -> SkipUniformRegions
addPass(createAMDGPUAnnotateUniformValuesLegacy());
@@ -1853,8 +1844,6 @@ void AMDGPUCodeGenPassBuilder::addCodeGenPrepare(AddIRPass &addPass) const {
}
void AMDGPUCodeGenPassBuilder::addPreISel(AddIRPass &addPass) const {
- const bool EnableStructurizerWorkarounds =
- AMDGPUTargetMachine::EnableStructurizerWorkarounds;
if (TM.getOptLevel() > CodeGenOptLevel::None)
addPass(FlattenCFGPass());
@@ -1868,12 +1857,8 @@ void AMDGPUCodeGenPassBuilder::addPreISel(AddIRPass &addPass) const {
// regions formed by them.
addPass(AMDGPUUnifyDivergentExitNodesPass());
-
- if (EnableStructurizerWorkarounds) {
- addPass(FixIrreduciblePass());
- addPass(UnifyLoopExitsPass());
- }
-
+ addPass(FixIrreduciblePass());
+ addPass(UnifyLoopExitsPass());
addPass(StructurizeCFGPass(/*SkipUniformRegions=*/false));
addPass(AMDGPUAnnotateUniformValuesPass());
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
index 66dfd2f733e3e9..5b7257ddb36f1e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
@@ -38,7 +38,6 @@ class AMDGPUTargetMachine : public LLVMTargetMachine {
public:
static bool EnableFunctionCalls;
static bool EnableLowerModuleLDS;
- static bool EnableStructurizerWorkarounds;
AMDGPUTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
StringRef FS, const TargetOptions &Options,
|
jayfoad
approved these changes
Aug 23, 2024
cjdb
pushed a commit
to cjdb/llvm-project
that referenced
this pull request
Aug 23, 2024
5chmidti
pushed a commit
that referenced
this pull request
Aug 24, 2024
dmpolukhin
pushed a commit
to dmpolukhin/llvm-project
that referenced
this pull request
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.