[PATCH] D127477: [RISCV] move `isFaultFirstLoad` into `RISCVInstrInfo`

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 01:42:55 PDT 2022


fakepaper56 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h:436
 
-bool isFaultFirstLoad(const MachineInstr &MI);
 } // namespace llvm
----------------
sunshaoce wrote:
> fakepaper56 wrote:
> > fakepaper56 wrote:
> > > Maybe we could add inline static in a header file, like here?
> > I mean you could rewrite to in a header file. 
> >   inline static bool isFaultFirstLoad(const MachineInstr &MI) {
> >     return MI.getNumExplicitDefs() == 2 && MI.modifiesRegister(RISCV::VL) &&
> >          !MI.isInlineAsm();
> >   }
> > 
> It works. Should we move `isFaultFirstLoad ` into a `LLVM::RISCV*` namespace?
> Should we move isFaultFirstLoad  into a LLVM::RISCV* namespace?
I think the idea is great. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127477



More information about the llvm-commits mailing list