Repository navigation
Conversation
…its own A pure refactor
Metric Pipeline n geomean Δ% total Δ% min Δ% max Δ% --------------- --------- -- ---------- -------- ------ ------ cpu_time ir-ssacfg 54 -0.54% -1.41% -3.17% +5.38% wall_time ir-ssacfg 54 -0.42% -1.3% -3.07% +5.46% peak_rss ir-ssacfg 54 -0.11% -0.12% -0.64% -0.08% cache_miss_rate ir-ssacfg 54 +0.43% +0.47% -2.65% +1.78% creation_size ir-ssacfg 54 -1.74% -2.91% -5.78% 0.0% runtime_size ir-ssacfg 54 -1.74% -2.96% -5.91% 0.0% gas_used ir-ssacfg 40 -0.04% -0.04% -0.24% 0.0%
c25aae6 to
96f606a
Compare
blishko
left a comment
There was a problem hiding this comment.
I like the idea very much, implementation seems OK. I would like to polish the terminology a bit (I'll come up with suggestions tomorrow).
But I think we should do something about the tests.
| } | ||
| { | ||
| transform::foldDominatedConditions(*cfg); | ||
| // Trivial phi elimination may have made conditions constant |
There was a problem hiding this comment.
Which trivial phi elimination? The one above? Would this make sense without foldDominatedConditions as well?
| { | ||
| auto& block = _cfg.block(_block); | ||
| auto const [conditionId, nonZero, zero] = | ||
| std::get<SSACFG::BasicBlock::ConditionalJump>(block.exit); |
There was a problem hiding this comment.
I am just wondering if we should be defensive and add an assert that it is indeed ConditionalJump.
There was a problem hiding this comment.
well actually this throws if it doesn't hold the right alternative so... we'd just get a nicer error message.
| { | ||
| BlockId branch; | ||
| BlockId successor; | ||
| bool conditionBaseNegated; // whether what holds on this edge is the negation of the base |
There was a problem hiding this comment.
What do you mean by "base"?
There was a problem hiding this comment.
base as in base of the condition: iszero(iszero(iszero(base)))
There was a problem hiding this comment.
Didn't we say we would change the test format to not have .dot graphs as expected output?
This is extremely difficult to review.
There was a problem hiding this comment.
well yeah, of course we said that, i just didn't have time to do it yet. it'll have to wait for next year.
folds subtrees which hide behind conditions that can are provably false:
Details