[PATCH] D36698: IPRA: Allow target to enable IPRA by default

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 09:56:46 PDT 2017


arsenm created this revision.
Herald added a subscriber: wdng.

https://reviews.llvm.org/D36698

Files:
  include/llvm/Target/TargetMachine.h
  lib/Target/TargetMachine.cpp


Index: lib/Target/TargetMachine.cpp
===================================================================
--- lib/Target/TargetMachine.cpp
+++ lib/Target/TargetMachine.cpp
@@ -47,6 +47,10 @@
       RequireStructuredCFG(false), DefaultOptions(Options), Options(Options) {
   if (EnableIPRA.getNumOccurrences())
     this->Options.EnableIPRA = EnableIPRA;
+  else {
+    // If not explicitly specified, use target default.
+    this->Options.EnableIPRA = useIPRA();
+  }
 }
 
 TargetMachine::~TargetMachine() {
Index: include/llvm/Target/TargetMachine.h
===================================================================
--- include/llvm/Target/TargetMachine.h
+++ include/llvm/Target/TargetMachine.h
@@ -259,6 +259,10 @@
   /// PEI. If false (virtual-register machines), then callee-save register
   /// spilling and scavenging are not needed or used.
   virtual bool usesPhysRegsForPEI() const { return true; }
+
+  virtual bool useIPRA() const {
+    return false;
+  }
 };
 
 /// This class describes a target machine that is implemented with the LLVM


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36698.111018.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/120fbe94/attachment.bin>


More information about the llvm-commits mailing list