I looked at the GC part and it looks good to me.
Wed, Mar 24
Nov 19 2020
Nov 17 2020
Nov 11 2020
Nov 10 2020
Nov 9 2020
Can we split restructuring and generalization (possibly adding a test for the generalization part)? It's hard to assess correctness when you combine the two in one change.
Oct 26 2020
Accepting this change to unblock the progress.
Oct 25 2020
Oct 23 2020
Oct 22 2020
Oct 21 2020
Address review comments.
Oct 20 2020
Still digging through the main logic. In the meantime see some minor comments inline.
Oct 19 2020
Oct 16 2020
Oct 12 2020
Oct 7 2020
Added a note into the doc that a GC parseable copy operation is not required to take a safepoint.
Oct 6 2020
Currently, if we have a loop with a safepoint poll it is not converted into a memcpy/memmove. This is because the safepoint has read semantic and prevents LoopIdiomRecognize from performing the transform. In theory we can have a transform which recognizes loops with safepoints and converts them to non-leaf memcpy/memmove. It will be up to this new transform to figure out the legality and interactions with the runtime requirements.
Oct 5 2020
This was a draft. Abandoned in favor of D88861.
Sep 18 2020
Jun 19 2020
@mtrofin, I think it makes sense to have these tests available in all configurations. We have a bunch of printer passes which are not conditioned by NDEBUG.
Jun 17 2020
Jun 3 2020
That sounds fine, my point is that having some run on benchmarks to quantify the benefit would help understand the value of this particular omission from the cost analysis (or at minimum show there's no regression, or understand where the regressions may be). It could shed important insights into what matters for the cost analysis, basically.
Apr 16 2020
Apr 9 2020
Apr 7 2020
Can you please elaborate what is the issue you are solving? May be give an example?
Feb 27 2020
Feb 26 2020
Demonstrating an improvement accuracy due to PHI translation turned out to be a bit tricky.
Feb 21 2020
I reworked the patch using PHITransAddr. Now instead of tracking the backedge flag I keep track of the address to check and translate the address when needed.
Couple of nit comments inlined, LGTM once addressed.
Feb 20 2020
Feb 14 2020
what is the use case of these options? Do hidden nodes create too much noise?
Feb 12 2020
LGTM with the renaming addressed.
Jan 31 2020
- Comment cleanup was landed separately
- Fixed the issue mentioned in https://reviews.llvm.org/D68006#inline-616849
- Added more tests
Dec 16 2019
Nov 21 2019
Nov 11 2019
Nov 8 2019
Nov 7 2019
Yeah, this limitation seems arbitrary and overly conservative.
Can we handle the case with inbounds offsets only first and extend with non-inbounds support in a follow up change? This way in the first change you'll not need to change IR interfaces at all.
Nov 6 2019
LGTM. Maybe add a test when the WC has one use but the branch condition is used in multiple branches.
Nov 1 2019
Oct 31 2019
Oct 28 2019
Oct 20 2019
Oct 1 2019
Sep 27 2019
This change was resubmitted as D68006.
This is specifically a hole in the calloc() handling, right? This case can't come up in regular load->store no-op stores: the address of the load dominates the load, so the address dominates all the operations between the load and the store, so alias() does the right thing.
That's right. I don't think that load->store case is affected.
Sep 25 2019
It looks like you successfully avoid the pitfall the original original loop predication fell into by filtering implicit exits and using trip counts. It makes me think that we can revisit loop predication again and go back to SCEV based implementation.
+1 to a test.
Sep 24 2019
It looks like you forgot to CC llvm-commits? Please post a new differential so the patch is sent to the list.
Resubmitted as D68006.
We should just skip debug instructions while looking for the guard in the window. Just use getNextNonDebugInstruction instead of current getNextNode.
Sep 20 2019
Aug 28 2019
Aug 1 2019
The original patch introduces a function minIterationWidthForEvaluateAtIteration. This way it exposes the limitation of evaluateAtIteration through the API and makes it possible for the user to choose the proper It width (e.g. like I did in the first revision https://reviews.llvm.org/D62563?vs=on&id=201795). What was the reason to remove it?
Jun 27 2019
Even though it's motivated by downstream code, looks harmless to change upstream.
Jun 11 2019
Jun 3 2019
Fall back to non-canonical mode for non-affine addrecs.
May 31 2019
May 30 2019
May 29 2019
Artur, nice find. In terms of staging complexity, have you considered how impactful it would be to simply refuse to generate the value at the given iteration in this case? evaluateAtIteration is allowed to return SCEVCouldNotCompute. I'm tempted to first introduce a bailout for a quick correctness fix - maybe along side your assert to see if we're missing any other cases - and then spend more time considering your full fix.
Have you considered reusing calculateByteProvider mechanism from load combining instead of matching an exact pattern?