summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
index 9ec66595d8d..fd54701c35c 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
@@ -29,6 +29,10 @@ using namespace llvm;
#define DEBUG_TYPE "wasm-reg-coloring"
+static cl::opt<bool>
+ DisableRegColoring("disable-wasm-reg-coloring", cl::Hidden, cl::init(false),
+ cl::desc("Disable WebAssembly register coloring"));
+
namespace {
class WebAssemblyRegColoring final : public MachineFunctionPass {
public:
@@ -76,6 +80,9 @@ bool WebAssemblyRegColoring::runOnMachineFunction(MachineFunction &MF) {
<< "********** Function: " << MF.getName() << '\n';
});
+ if (DisableRegColoring)
+ return false;
+
// If there are calls to setjmp or sigsetjmp, don't perform coloring. Virtual
// registers could be modified before the longjmp is executed, resulting in
// the wrong value being used afterwards. (See <rdar://problem/8007500>.)
OpenPOWER on IntegriCloud