Commit 4047361a authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Disable loop peeling for asm.js.

BUG=chromium:669494
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2533303002
Cr-Commit-Position: refs/heads/master@{#41360}
parent d6752d94
......@@ -49,6 +49,7 @@ class CompilationInfo final {
kSourcePositionsEnabled = 1 << 13,
kBailoutOnUninitialized = 1 << 14,
kOptimizeFromBytecode = 1 << 15,
kLoopPeelingEnabled = 1 << 16,
};
CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure);
......@@ -172,6 +173,10 @@ class CompilationInfo final {
return GetFlag(kOptimizeFromBytecode);
}
void MarkAsLoopPeelingEnabled() { SetFlag(kLoopPeelingEnabled); }
bool is_loop_peeling_enabled() const { return GetFlag(kLoopPeelingEnabled); }
bool GeneratePreagedPrologue() const {
// Generate a pre-aged prologue if we are optimizing for size, which
// will make code flushing more aggressive. Only apply to Code::FUNCTION,
......
......@@ -552,6 +552,9 @@ PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl() {
if (!FLAG_always_opt) {
info()->MarkAsBailoutOnUninitialized();
}
if (FLAG_turbo_loop_peeling) {
info()->MarkAsLoopPeelingEnabled();
}
}
if (info()->is_optimizing_from_bytecode() ||
!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) {
......@@ -1505,7 +1508,7 @@ bool PipelineImpl::CreateGraph() {
Run<TypedLoweringPhase>();
RunPrintAndVerify("Lowered typed");
if (FLAG_turbo_loop_peeling) {
if (data->info()->is_loop_peeling_enabled()) {
Run<LoopPeelingPhase>();
RunPrintAndVerify("Loops peeled", true);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment