[AArch64] Enable PostRAScheduler for AArch64 generic build
authorMinSeong Kim <min.s.kim@samsung.com>
Thu, 17 Dec 2015 14:51:22 +0000 (14:51 +0000)
committerMinSeong Kim <min.s.kim@samsung.com>
Thu, 17 Dec 2015 14:51:22 +0000 (14:51 +0000)
This patch enables PostRAScheduler specifically for AArch64 generic build,
which is beneficial from the performance perspective.
Speedups up to 2 to 7% for some benchmarks on A57 and A53 are observed.
Also benchmarks from LLVM test-suite did not regress.

Differential Revision: http://reviews.llvm.org/D15557

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255896 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64Subtarget.h

index cf94445a885cd08284e85c5e5ae123c9bfafafca..1b8b9b27719ca4cece74b6d0893d40e067398ce8 100644 (file)
@@ -102,7 +102,7 @@ public:
   const Triple &getTargetTriple() const { return TargetTriple; }
   bool enableMachineScheduler() const override { return true; }
   bool enablePostRAScheduler() const override {
   const Triple &getTargetTriple() const { return TargetTriple; }
   bool enableMachineScheduler() const override { return true; }
   bool enablePostRAScheduler() const override {
-    return isCortexA53() || isCortexA57();
+    return isGeneric() || isCortexA53() || isCortexA57();
   }
 
   bool hasV8_1aOps() const { return HasV8_1aOps; }
   }
 
   bool hasV8_1aOps() const { return HasV8_1aOps; }
@@ -139,6 +139,7 @@ public:
   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
   bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
 
   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
   bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
 
+  bool isGeneric() const { return CPUString == "generic"; }
   bool isCyclone() const { return CPUString == "cyclone"; }
   bool isCortexA57() const { return CPUString == "cortex-a57"; }
   bool isCortexA53() const { return CPUString == "cortex-a53"; }
   bool isCyclone() const { return CPUString == "cyclone"; }
   bool isCortexA57() const { return CPUString == "cortex-a57"; }
   bool isCortexA53() const { return CPUString == "cortex-a53"; }