File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 69
69
#include " llvm/Support/Timer.h"
70
70
#include " llvm/Support/raw_ostream.h"
71
71
#include " llvm/Target/TargetMachine.h"
72
+ #include " llvm/IR/DebugInfoMetadata.h"
72
73
#include < algorithm>
73
74
#include < cassert>
74
75
#include < cstdint>
@@ -3215,7 +3216,10 @@ void RAGreedy::reportNumberOfSplillsReloads() {
3215
3216
using namespace ore ;
3216
3217
3217
3218
ORE->emit ([&]() {
3218
- MachineOptimizationRemarkMissed R (DEBUG_TYPE, " SpillReload" , DebugLoc (),
3219
+ DebugLoc Loc;
3220
+ if (auto *SP = MF->getFunction ().getSubprogram ())
3221
+ Loc = DILocation::get (SP->getContext (), SP->getLine (), 1 , SP);
3222
+ MachineOptimizationRemarkMissed R (DEBUG_TYPE, " SpillReload" , Loc,
3219
3223
&MF->front ());
3220
3224
Stats.report (R);
3221
3225
R << " generated in function" ;
Original file line number Diff line number Diff line change 23
23
; (loop:)
24
24
; REMARK: remark: /tmp/kk.c:1:20: 2 spills 2 reloads generated in loop{{$}}
25
25
; (func:)
26
- ; REMARK: remark: <unknown>:0:0 : 3 spills 3 reloads generated in function{{$}}
26
+ ; REMARK: remark: /tmp/kk.c:1:1 : 3 spills 3 reloads generated in function{{$}}
27
27
28
28
; (loop3:)
29
29
; HOTNESS: remark: /tmp/kk.c:3:20: 1 spills 1 reloads generated in loop (hotness: 300)
79
79
; YAML: --- !Missed
80
80
; YAML: Pass: regalloc
81
81
; YAML: Name: SpillReload
82
+ ; YAML: DebugLoc: { File: '/tmp/kk.c', Line: 1, Column: 1 }
82
83
; YAML: Function: fpr128
83
84
; YAML: Hotness: 3
84
85
; YAML: Args:
104
105
; THRESHOLD_YAML: - String: generated in loop
105
106
; THRESHOLD_YAML: ...
106
107
107
- define void @fpr128 (<4 x float >* %p ) nounwind ssp !prof !11 {
108
+ define void @fpr128 (<4 x float >* %p ) nounwind ssp !prof !11 !dbg !6 {
108
109
entry:
109
110
br label %loop , !dbg !8
110
111
You can’t perform that action at this time.
0 commit comments