forked from OSchip/llvm-project
[WebAssembly] Disable some WebAssembly-specific optimization passes at -O0.
llvm-svn: 258127
This commit is contained in:
parent
3196650bf3
commit
b13c91f159
|
@ -140,7 +140,8 @@ void WebAssemblyPassConfig::addIRPasses() {
|
||||||
addPass(createAtomicExpandPass(TM));
|
addPass(createAtomicExpandPass(TM));
|
||||||
|
|
||||||
// Optimize "returned" function attributes.
|
// Optimize "returned" function attributes.
|
||||||
addPass(createWebAssemblyOptimizeReturned());
|
if (getOptLevel() != CodeGenOpt::None)
|
||||||
|
addPass(createWebAssemblyOptimizeReturned());
|
||||||
|
|
||||||
TargetPassConfig::addIRPasses();
|
TargetPassConfig::addIRPasses();
|
||||||
}
|
}
|
||||||
|
@ -165,7 +166,8 @@ void WebAssemblyPassConfig::addPreRegAlloc() {
|
||||||
TargetPassConfig::addPreRegAlloc();
|
TargetPassConfig::addPreRegAlloc();
|
||||||
|
|
||||||
// Prepare store instructions for register stackifying.
|
// Prepare store instructions for register stackifying.
|
||||||
addPass(createWebAssemblyStoreResults());
|
if (getOptLevel() != CodeGenOpt::None)
|
||||||
|
addPass(createWebAssemblyStoreResults());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebAssemblyPassConfig::addPostRegAlloc() {
|
void WebAssemblyPassConfig::addPostRegAlloc() {
|
||||||
|
@ -206,5 +208,6 @@ void WebAssemblyPassConfig::addPreEmitPass() {
|
||||||
addPass(createWebAssemblyRegNumbering());
|
addPass(createWebAssemblyRegNumbering());
|
||||||
|
|
||||||
// Perform the very last peephole optimizations on the code.
|
// Perform the very last peephole optimizations on the code.
|
||||||
addPass(createWebAssemblyPeephole());
|
if (getOptLevel() != CodeGenOpt::None)
|
||||||
|
addPass(createWebAssemblyPeephole());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue