[PATCH] D150557: [Mips] Avoid RegScavenger::forward in Mips16InstrInfo
    Jay Foad via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 15 05:22:51 PDT 2023
    
    
  
foad created this revision.
foad added reviewers: arsenm, RKSimon, bogner, theraven.
Herald added subscribers: StephenFan, atanasyan, jrtc27, hiraditya, arichardson, sdardis.
Herald added a project: All.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
RegScavenger::backward is preferred because it does not rely on accurate
kill flags.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D150557
Files:
  llvm/lib/Target/Mips/Mips16InstrInfo.cpp
Index: llvm/lib/Target/Mips/Mips16InstrInfo.cpp
===================================================================
--- llvm/lib/Target/Mips/Mips16InstrInfo.cpp
+++ llvm/lib/Target/Mips/Mips16InstrInfo.cpp
@@ -340,8 +340,8 @@
   int Reg =0;
   int SpReg = 0;
 
-  rs.enterBasicBlock(MBB);
-  rs.forward(II);
+  rs.enterBasicBlockEnd(MBB);
+  rs.backward(II);
   //
   // We need to know which registers can be used, in the case where there
   // are not enough free registers. We exclude all registers that
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150557.522128.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230515/21033a12/attachment.bin>
    
    
More information about the llvm-commits
mailing list