[llvm] [NVPTX] Fixup NVPTXPrologEpilogPass for opt-bisect-limit (PR #144136)

Justin Fargnoli via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 09:05:52 PDT 2025


================
@@ -57,41 +95,27 @@ bool NVPTXPrologEpilogPass::runOnMachineFunction(MachineFunction &MF) {
 
   calculateFrameObjectOffsets(MF);
 
-  for (MachineBasicBlock &MBB : MF) {
-    for (MachineInstr &MI : MBB) {
-      for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
-        if (!MI.getOperand(i).isFI())
+  for (MachineBasicBlock &BB : MF) {
+    for (MachineBasicBlock::iterator I = BB.end(); I != BB.begin();) {
----------------
justinfargnoli wrote:

Why iterate backward? 

https://github.com/llvm/llvm-project/pull/144136


More information about the llvm-commits mailing list