[PATCH] D105086: [NFC][RISCV] Add FrameSetup/FrameDestroy flag to prologue/epilog instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 1 18:59:46 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:528
         // move BP, SP
         TII->copyPhysReg(MBB, MBBI, DL, BPReg, SPReg, false);
       }
----------------
HsiangKai wrote:
> rogfer01 wrote:
> > rogfer01 wrote:
> > > I think this might still add unflagged instructions.
> > > 
> > > Not sure what is the best way to flag them (I imagine we could traverse MBBI to the end of the MBB and invoke `setFlag`).
> > > (I imagine we could traverse MBBI to the end of the MBB and invoke setFlag).
> > Oh no, that wouldn't work. Please ignore me.
> Yeah, there is no way to distinguish the caller of copyPhysReg() comes from prologue/epilogue or not.
Can we just use BuildMI? We're not getting much from copyPhysReg here are we? It's just an ADDI with 0, I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105086/new/

https://reviews.llvm.org/D105086



More information about the llvm-commits mailing list