Fixes exponential compilation complexity in PR19835.
Details
Diff Detail
Event Timeline
On the surface changes look OK to me, but obviously wait for someone else to review.
One thing about the test: AFAIK we've moved away from the convention of adding the dates to the names of tests.
Please make sure that you include the explanation from the PR (starting with "The problem is in LICM::sink, which does not handle the following pattern well:") into the commit message. LGTM.
test/Transforms/LICM/extra-copies.ll | ||
---|---|---|
37 | Please remove the extra metadata (like this one), and any unneeded attributes. |
What Hal said, plus one more request. =] Patch looks good otherwise.
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
567–598 | I would factor some part of this into a helper function, there is too much deeply nested conditional logic here. Maybe the right thing to do is to factor out the logic handling the build up a clone in the exit block? (But do that in a separate patch either before or after landing th ebugfix) |
test/Transforms/LICM/extra-copies.ll | ||
---|---|---|
37 | done |
Committed as r211673.
Thanks for the review!
I'll look into refactoring this code now.
I would factor some part of this into a helper function, there is too much deeply nested conditional logic here. Maybe the right thing to do is to factor out the logic handling the build up a clone in the exit block?
(But do that in a separate patch either before or after landing th ebugfix)