[PATCH] D29448: [RegAlloc] Don’t freeze reserved registers again if it is not necessary

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 09:59:59 PST 2017


qcolombet added inline comments.


================
Comment at: include/llvm/Target/TargetRegisterInfo.h:822
+  /// Returns true if the target wants to update the reserved register
+  /// before the register allocation process.
+  virtual bool
----------------
nemanjai wrote:
> I think a comment with an example of why this may be needed by a target is in order here. For example, PPC requires it because it has a different set of reserved registers if a function ends up having a `TargetOpcode::PATCHPOINT` node in it.
> Perhaps @hfinkel has a different suggestion here.
My understanding is that this kind of things should be settled at ISel time. I.e., I would expect only one call to the freeze function per function. If we need more, I'd say our representation is broken.

I'll dig a little more to make sure we are not missing anything (in particular I'll have a look at r168630), but ultimately, I would suggest that all targets work with just one call to this.


https://reviews.llvm.org/D29448





More information about the llvm-commits mailing list