[PATCH] D15340: Separate CSRs into a subset handled via explicit copies and a subset handled by prologue/epilogue

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 14:36:50 PST 2015


hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.

A few minor comments, otherwise, LGTM.


================
Comment at: include/llvm/Target/TargetLowering.h:2273
@@ +2272,3 @@
+  /// Perform necessary initialization to handle a subset of CSRs explicitly
+  /// via copies.
+  virtual void initializeSplitCSR(MachineBasicBlock *Entry) const {
----------------
Add:

  // This function is called at the beginning of instruction selection.

================
Comment at: include/llvm/Target/TargetLowering.h:2281
@@ +2280,3 @@
+  /// physical registers in the exit blocks.
+  virtual void insertCopiesSplitCSR(
+      MachineBasicBlock *Entry,
----------------
Add:

  // This function is called at the end of instruction selection.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:506
@@ -474,3 +505,3 @@
   // emitting the code for the block.
   MachineBasicBlock *EntryMBB = &MF->front();
   const TargetRegisterInfo &TRI = *MF->getSubtarget().getRegisterInfo();
----------------
Can you move this up so that you can use EntryBB in the call to initializeSplitCSR? If so, please do.


http://reviews.llvm.org/D15340





More information about the llvm-commits mailing list