Skip to content

Commit 3508d8f

Browse files
authored
RegAllocFast: Avoid using temporary DiagnosticInfo (#120184)
This reverts commit 1297933.
1 parent df2356b commit 3508d8f

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

llvm/lib/CodeGen/RegAllocFast.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,10 +1206,9 @@ MCPhysReg RegAllocFastImpl::getErrorAssignment(const LiveReg &LR,
12061206
"inline assembly requires more registers than available");
12071207
} else {
12081208
const Function &Fn = MBB->getParent()->getFunction();
1209-
DiagnosticInfoRegAllocFailure DI(
1209+
Fn.getContext().diagnose(DiagnosticInfoRegAllocFailure(
12101210
"ran out of registers during register allocation", Fn,
1211-
MI.getDebugLoc());
1212-
Fn.getContext().diagnose(DI);
1211+
MI.getDebugLoc()));
12131212
}
12141213
}
12151214

llvm/test/CodeGen/AMDGPU/ran-out-of-registers-error-all-regs-reserved.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; UNSUPPORTED: target={{.*}}
21
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -vgpr-regalloc=greedy -verify-machineinstrs=0 -filetype=null %s 2>&1 | FileCheck -implicit-check-not=error %s
32
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -vgpr-regalloc=basic -verify-machineinstrs=0 -filetype=null %s 2>&1 | FileCheck -implicit-check-not=error %s
43
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -vgpr-regalloc=fast -verify-machineinstrs=0 -filetype=null %s 2>&1 | FileCheck -implicit-check-not=error %s

llvm/test/CodeGen/AMDGPU/ran-out-of-registers-errors.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
; UNSUPPORTED: target={{.*}}
2-
;
31
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -stress-regalloc=1 -vgpr-regalloc=greedy -filetype=null %s 2>&1 | FileCheck -check-prefixes=CHECK,GREEDY -implicit-check-not=error %s
42
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -stress-regalloc=1 -vgpr-regalloc=basic -filetype=null %s 2>&1 | FileCheck -implicit-check-not=error -check-prefixes=CHECK,BASIC %s
53
; RUN: not llc -mtriple=amdgcn-amd-amdhsa -stress-regalloc=1 -vgpr-regalloc=fast -filetype=null %s 2>&1 | FileCheck -implicit-check-not=error -check-prefixes=CHECK,FAST %s

0 commit comments

Comments
 (0)