[PATCH] D21534: GlobalISel: first outline of legalization interface.

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:09:37 PDT 2016


arsenm added inline comments.

================
Comment at: include/llvm/CodeGen/GlobalISel/MachineLegalizeInfo.h:51
@@ +50,3 @@
+  /// Set how a specific G_* operation should be legalized on a given type.
+  void setAction(unsigned Opcode, Type *Ty, LegalizeAction Action) {
+    Actions[std::make_pair(Opcode, Ty)] = Action;
----------------
qcolombet wrote:
> We’ll actually need more setAction kind of thing.
> E.g., right now, there is no way to specify that "fptoint float to i32" is legal whereas "fptoint float to i64" is not, same for truncate, extensions, etc.
> What I am saying is that some instructions need both their input and output types to set an action.
> Note: This is something broken in SDISel and we need to fix that while we are here. I believe some of the custom lowering happens because of that.
For memory operations, we really need to be able to specify legality per address space


Repository:
  rL LLVM

http://reviews.llvm.org/D21534





More information about the llvm-commits mailing list