Skip to content

[AMDGPU][CodeGen] Do not backtrace invalid -regalloc param #119687

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

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

optimisan
Copy link
Contributor

No need to generate a stack trace and a GitHub issue prompt on a wrongly set regalloc option.

@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Akshat Oke (optimisan)

Changes

No need to generate a stack trace and a GitHub issue prompt on a wrongly set regalloc option.


Full diff: https://github.com/llvm/llvm-project/pull/119687.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+2-2)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 34ad99dd980f27..c0dace31393fd7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -1549,7 +1549,7 @@ static const char RegAllocOptNotSupportedMessage[] =
 
 bool GCNPassConfig::addRegAssignAndRewriteFast() {
   if (!usingDefaultRegAlloc())
-    report_fatal_error(RegAllocOptNotSupportedMessage);
+    report_fatal_error(RegAllocOptNotSupportedMessage, /*GenCrashDiag=*/false);
 
   addPass(&GCNPreRALongBranchRegID);
 
@@ -1575,7 +1575,7 @@ bool GCNPassConfig::addRegAssignAndRewriteFast() {
 
 bool GCNPassConfig::addRegAssignAndRewriteOptimized() {
   if (!usingDefaultRegAlloc())
-    report_fatal_error(RegAllocOptNotSupportedMessage);
+    report_fatal_error(RegAllocOptNotSupportedMessage, /*GenCrashDiag=*/false);
 
   addPass(&GCNPreRALongBranchRegID);
 

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

report_fatal_error default should be false (and really it shouldn't even be an option)

@optimisan
Copy link
Contributor Author

Thanks, I'll look into that.

@optimisan optimisan merged commit 7a64855 into llvm:main Dec 13, 2024
8 checks passed
@optimisan optimisan deleted the no-crash-diag-regalloc branch December 13, 2024 06:29
@vitalybuka
Copy link
Collaborator

Something is broken here https://lab.llvm.org/buildbot/#/builders/55/builds/4246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants