[PATCH] D151797: [AMDGPU] WQM: Allow insertion of exact mode transition as terminator
    Carl Ritson via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jun  1 18:33:05 PDT 2023
    
    
  
critson marked 2 inline comments as done.
critson added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:1213-1217
+    if (FirstTerm != MBB.end()) {
+      SlotIndex FirstTermIdx = LIS->getInstructionIndex(*FirstTerm);
+      SlotIndex BeforeIdx = LIS->getInstructionIndex(*Before);
+      IsTerminator = BeforeIdx > FirstTermIdx;
+    }
----------------
foad wrote:
> Simpler to use comesBefore? It is supposed to be efficient.
`comesBefore` isn't defined for machine instructions, otherwise, yes.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151797/new/
https://reviews.llvm.org/D151797
    
    
More information about the llvm-commits
mailing list