@@ -100,23 +100,20 @@ class SIMemOpInfo final {
100
100
bool IsNonTemporal = false ;
101
101
bool IsLastUse = false ;
102
102
103
- SIMemOpInfo (AtomicOrdering Ordering = AtomicOrdering::SequentiallyConsistent,
104
- SIAtomicScope Scope = SIAtomicScope::SYSTEM,
105
- SIAtomicAddrSpace OrderingAddrSpace = SIAtomicAddrSpace::ATOMIC,
106
- SIAtomicAddrSpace InstrAddrSpace = SIAtomicAddrSpace::ALL,
107
- bool IsCrossAddressSpaceOrdering = true ,
108
- AtomicOrdering FailureOrdering =
109
- AtomicOrdering::SequentiallyConsistent,
110
- bool IsVolatile = false ,
111
- bool IsNonTemporal = false ,
112
- bool IsLastUse = false )
113
- : Ordering(Ordering), FailureOrdering(FailureOrdering),
114
- Scope (Scope), OrderingAddrSpace(OrderingAddrSpace),
115
- InstrAddrSpace(InstrAddrSpace),
116
- IsCrossAddressSpaceOrdering(IsCrossAddressSpaceOrdering),
117
- IsVolatile(IsVolatile),
118
- IsNonTemporal(IsNonTemporal),
119
- IsLastUse(IsLastUse) {
103
+ SIMemOpInfo (
104
+ AtomicOrdering Ordering = AtomicOrdering::SequentiallyConsistent,
105
+ SIAtomicScope Scope = SIAtomicScope::SYSTEM,
106
+ SIAtomicAddrSpace OrderingAddrSpace = SIAtomicAddrSpace::ATOMIC,
107
+ SIAtomicAddrSpace InstrAddrSpace = SIAtomicAddrSpace::ALL,
108
+ bool IsCrossAddressSpaceOrdering = true ,
109
+ AtomicOrdering FailureOrdering = AtomicOrdering::SequentiallyConsistent,
110
+ bool IsVolatile = false , bool IsNonTemporal = false ,
111
+ bool IsLastUse = false )
112
+ : Ordering(Ordering), FailureOrdering(FailureOrdering), Scope(Scope),
113
+ OrderingAddrSpace (OrderingAddrSpace), InstrAddrSpace(InstrAddrSpace),
114
+ IsCrossAddressSpaceOrdering(IsCrossAddressSpaceOrdering),
115
+ IsVolatile(IsVolatile), IsNonTemporal(IsNonTemporal),
116
+ IsLastUse(IsLastUse) {
120
117
121
118
if (Ordering == AtomicOrdering::NotAtomic) {
122
119
assert (Scope == SIAtomicScope::NONE &&
@@ -206,9 +203,7 @@ class SIMemOpInfo final {
206
203
207
204
// / \returns True if memory access of the machine instruction used to
208
205
// / create this SIMemOpInfo is last use, false otherwise.
209
- bool isLastUse () const {
210
- return IsLastUse;
211
- }
206
+ bool isLastUse () const { return IsLastUse; }
212
207
213
208
// / \returns True if ordering constraint of the machine instruction used to
214
209
// / create this SIMemOpInfo is unordered or higher, false otherwise.
@@ -638,8 +633,7 @@ class SIGfx12CacheControl : public SIGfx11CacheControl {
638
633
639
634
bool expandSystemScopeStore (MachineBasicBlock::iterator &MI) const override ;
640
635
641
- bool enableLastUse (MachineInstr &MI,
642
- bool IsLastUse) const override ;
636
+ bool enableLastUse (MachineInstr &MI, bool IsLastUse) const override ;
643
637
};
644
638
645
639
class SIMemoryLegalizer final : public MachineFunctionPass {
@@ -2453,7 +2447,7 @@ bool SIGfx12CacheControl::enableLastUse(MachineInstr &MI,
2453
2447
assert (MI.mayLoad () && !MI.mayStore ());
2454
2448
2455
2449
if (IsLastUse && !isScope (MI, AMDGPU::CPol::SCOPE_SYS))
2456
- return setTH (MI, AMDGPU::CPol::TH_LU);;
2450
+ return setTH (MI, AMDGPU::CPol::TH_LU);
2457
2451
2458
2452
return false ;
2459
2453
}
0 commit comments