[llvm] r259482 - WebAssembly: add option to disable register coloring
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 01:30:01 PST 2016
Author: jfb
Date: Tue Feb 2 03:30:01 2016
New Revision: 259482
URL: http://llvm.org/viewvc/llvm-project?rev=259482&view=rev
Log:
WebAssembly: add option to disable register coloring
Having this hidden option makes it easier to debug other issues.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp?rev=259482&r1=259481&r2=259482&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp Tue Feb 2 03:30:01 2016
@@ -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::runOnMachin
<< "********** 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>.)
More information about the llvm-commits
mailing list