Commit be87b2ec by Jim Stichnoth

Subzero: Fix -enable-block-profile.

Defer hi/lo i64 var splitting until after the block profiling IR is inserted, since block profiling operates on i64 counters. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1357733004 .
parent ff94f59a
......@@ -184,11 +184,6 @@ void Cfg::translate() {
}
TimerMarker T(TimerStack::TT_translate, this);
// Create the Hi and Lo variables where a split was needed
for (Variable *Var : Variables)
if (auto Var64On32 = llvm::dyn_cast<Variable64On32>(Var))
Var64On32->initHiLo(this);
dump("Initial CFG");
if (getContext()->getFlags().getEnableBlockProfile()) {
......@@ -201,6 +196,11 @@ void Cfg::translate() {
dump("Profiled CFG");
}
// Create the Hi and Lo variables where a split was needed
for (Variable *Var : Variables)
if (auto Var64On32 = llvm::dyn_cast<Variable64On32>(Var))
Var64On32->initHiLo(this);
// The set of translation passes and their order are determined by the
// target.
getTarget()->translate();
......
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