[PATCH] D31359: [GlobalISel]: Allow backends to custom legalize Intrinsics

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 21:15:09 PDT 2019


aditya_nandakumar marked an inline comment as done.
aditya_nandakumar added inline comments.


================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:195-196
 
+  virtual bool legalizeIntrinsic(MachineInstr &MI, MachineRegisterInfo &MRI,
+                                 MachineIRBuilder &MIRBuilder) const;
+
----------------
arsenm wrote:
> I think this need to directly return LegalizeResult. Some intrinsics may be AlreadyLegal, or Legalized
When this was written originally, all this patch provided was a hook to custom lower intrinsics - and return true if either it was legalized or was already legal and false if it failed to legalize due to some reason. Of course it can return LegalizeResult (when it makes sense to differentiate b/w already legal and just legalized). Is this what this patch needs to move forward at this point?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D31359





More information about the llvm-commits mailing list