summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-08-15 15:04:49 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-08-15 15:04:49 +0000
commitd5a9c2d551a7c7a888b1fc009815cff571d97dbb (patch)
tree77916c41de77d90a53a674f05e1c804736db0137 /llvm/lib/Target/SystemZ
parent21149aa2faeb3cca002f3d5b5a7a5930c7c11d12 (diff)
downloadbcm5719-llvm-d5a9c2d551a7c7a888b1fc009815cff571d97dbb.tar.gz
bcm5719-llvm-d5a9c2d551a7c7a888b1fc009815cff571d97dbb.zip
[SystemZ] New CL option to enable subreg liveness
This option is needed to enable subreg liveness tracking during register allocation. Review: Ulrich Weigand https://reviews.llvm.org/D50779 llvm-svn: 339776
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZSubtarget.cpp10
-rw-r--r--llvm/lib/Target/SystemZ/SystemZSubtarget.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
index 9cd09b0f911..fb030a207bc 100644
--- a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
@@ -19,6 +19,11 @@ using namespace llvm;
#define GET_SUBTARGETINFO_CTOR
#include "SystemZGenSubtargetInfo.inc"
+static cl::opt<bool> UseSubRegLiveness(
+ "systemz-subreg-liveness",
+ cl::desc("Enable subregister liveness tracking for SystemZ (experimental)"),
+ cl::Hidden);
+
// Pin the vtable to this file.
void SystemZSubtarget::anchor() {}
@@ -54,6 +59,11 @@ SystemZSubtarget::SystemZSubtarget(const Triple &TT, const std::string &CPU,
TargetTriple(TT), InstrInfo(initializeSubtargetDependencies(CPU, FS)),
TLInfo(TM, *this), TSInfo(), FrameLowering() {}
+
+bool SystemZSubtarget::enableSubRegLiveness() const {
+ return UseSubRegLiveness;
+}
+
bool SystemZSubtarget::isPC32DBLSymbol(const GlobalValue *GV,
CodeModel::Model CM) const {
// PC32DBL accesses require the low bit to be clear. Note that a zero
diff --git a/llvm/lib/Target/SystemZ/SystemZSubtarget.h b/llvm/lib/Target/SystemZ/SystemZSubtarget.h
index 8285b4277d1..cb6b21a1d46 100644
--- a/llvm/lib/Target/SystemZ/SystemZSubtarget.h
+++ b/llvm/lib/Target/SystemZ/SystemZSubtarget.h
@@ -102,6 +102,9 @@ public:
// Always enable the early if-conversion pass.
bool enableEarlyIfConversion() const override { return true; }
+ // Enable tracking of subregister liveness in register allocator.
+ bool enableSubRegLiveness() const override;
+
// Automatically generated by tblgen.
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
OpenPOWER on IntegriCloud