[PATCH] D32621: TargetLowering: Add finalizeLowering() function; NFC

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 17:54:07 PDT 2017


MatzeB added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:595
 
-  if (TLI->hasCopyImplyingStackAdjustment(MF))
-    MFI.setHasCopyImplyingStackAdjustment(true);
-
-  // Freeze the set of reserved registers now that MachineFrameInfo has been
-  // set up. All the information required by getReservedRegs() should be
-  // available now.
-  MRI.freezeReservedRegs(*MF);
+  TLI->finalizeLowering(*MF);
 
----------------
arsenm wrote:
> MatzeB wrote:
> > arsenm wrote:
> > > Can we move this to after ExpandISelPseudos at least? It's a problem that reserved registers are frozen this early
> > I think that should work, we certainly could try. Maybe rename `ExpandISelPseudos` to `FinalizeISel` then?
> > 
> > However I'd like to do that in a separate patch then, to avoid complications when backporting this to a production branches.
> Last time I tried to do that a few PPC tests broke, although that might have been fixed since then
Just tried it https://reviews.llvm.org/D32628 and it seems to work (at least for PowerPC). So if you need this feel free to grab it and finish it up (more testing, changing tests to adjust for the changed passname, ask GlobalISel people whether is is fine to freeze registers later).


Repository:
  rL LLVM

https://reviews.llvm.org/D32621





More information about the llvm-commits mailing list