summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-05-18 20:19:02 +0000
committerDan Gohman <dan433584@gmail.com>2016-05-18 20:19:02 +0000
commite045f67ffc979bb1b99f1e707f033b4a324a1c54 (patch)
treee6347f9c30fb5ce4b84bab1e9734da245e2898dc
parent6f6f9f0bb93bcc238f2189f0a506a192d52376e2 (diff)
downloadbcm5719-llvm-e045f67ffc979bb1b99f1e707f033b4a324a1c54.tar.gz
bcm5719-llvm-e045f67ffc979bb1b99f1e707f033b4a324a1c54.zip
[WebAssembly] Disable the MachineScheduler.
llvm-svn: 269976
-rw-r--r--llvm/lib/Target/WebAssembly/README.txt7
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp8
2 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/README.txt b/llvm/lib/Target/WebAssembly/README.txt
index 7699ecc7dd0..a6c2eefc057 100644
--- a/llvm/lib/Target/WebAssembly/README.txt
+++ b/llvm/lib/Target/WebAssembly/README.txt
@@ -128,3 +128,10 @@ has two operands and one result, so in such cases there could be a net win by
prefering the operands.
//===---------------------------------------------------------------------===//
+
+Instruction ordering has a significant influence on register stackification and
+coloring. Consider experimenting with the MachineScheduler (enable via
+enableMachineScheduler) and determine if it can be configured to schedule
+instructions advantageously for this purpose.
+
+//===---------------------------------------------------------------------===//
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp b/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
index 3d5ac4f05fc..ce39051b055 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
@@ -45,5 +45,11 @@ WebAssemblySubtarget::WebAssemblySubtarget(const Triple &TT,
InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(),
TLInfo(TM, *this) {}
-bool WebAssemblySubtarget::enableMachineScheduler() const { return true; }
+bool WebAssemblySubtarget::enableMachineScheduler() const {
+ // Disable the MachineScheduler for now. Even with ShouldTrackPressure set and
+ // enableMachineSchedDefaultSched overridden, it appears to have an overall
+ // negative effect for the kinds of register optimizations we're doing.
+ return false;
+}
+
bool WebAssemblySubtarget::useAA() const { return true; }
OpenPOWER on IntegriCloud