mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
WebAssembly: add option to disable register coloring
Having this hidden option makes it easier to debug other issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc1e90c277
commit
7f5fe827a0
@ -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>.)
|
||||
|
Loading…
Reference in New Issue
Block a user