File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 9
9
// Mark scratch load/spill instructions which are guaranteed to be the last time
10
10
// this scratch slot is used so it can be evicted from caches.
11
11
//
12
+ // TODO: Handle general stack accesses not just spilling.
13
+ //
12
14
// ===----------------------------------------------------------------------===//
13
15
14
16
#include " AMDGPU.h"
@@ -52,11 +54,6 @@ class AMDGPUMarkLastScratchLoad : public MachineFunctionPass {
52
54
} // end anonymous namespace
53
55
54
56
bool AMDGPUMarkLastScratchLoad::runOnMachineFunction (MachineFunction &MF) {
55
- LLVM_DEBUG ({
56
- dbgs () << " ********** Mark Last Scratch Load **********\n "
57
- << " ********** Function: " << MF.getName () << ' \n ' ;
58
- });
59
-
60
57
if (skipFunction (MF.getFunction ()))
61
58
return false ;
62
59
@@ -101,7 +98,7 @@ bool AMDGPUMarkLastScratchLoad::runOnMachineFunction(MachineFunction &MF) {
101
98
102
99
// Start iteration backwards from segment end until the start of basic
103
100
// block or start of segment if it is in the same basic block.
104
- auto End = BB->instr_rend ();
101
+ auto End = BB->rend ();
105
102
if (MISegmentStart && MISegmentStart->getParent () == BB)
106
103
End = MISegmentStart->getReverseIterator ();
107
104
@@ -118,7 +115,7 @@ bool AMDGPUMarkLastScratchLoad::runOnMachineFunction(MachineFunction &MF) {
118
115
MachineMemOperand *MMO = *LastLoad->memoperands_begin ();
119
116
MMO->setFlags (MOLastUse);
120
117
Changed = true ;
121
- LLVM_DEBUG (dbgs () << " Found last load: " << *LastLoad; );
118
+ LLVM_DEBUG (dbgs () << " Found last load: " << *LastLoad);
122
119
}
123
120
}
124
121
}
You can’t perform that action at this time.
0 commit comments