[WebAssembly] Set the scheduling preference.
authorDan Gohman <dan433584@gmail.com>
Tue, 7 Jul 2015 22:38:06 +0000 (22:38 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 7 Jul 2015 22:38:06 +0000 (22:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241637 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

index 4eec02efbd941bca7260fe4da8502c7d29ff183f..4184eb6dc5a6a416db85b9622ce975dc9b3dbef1 100644 (file)
@@ -38,6 +38,8 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
   // WebAssembly does not produce floating-point exceptions on normal floating
   // point operations.
   setHasFloatingPointExceptions(false);
+  // We don't know the microarchitecture here, so just reduce register pressure.
+  setSchedulingPreference(Sched::RegPressure);
 }
 
 //===----------------------------------------------------------------------===//