- User Since
- Jan 23 2018, 4:17 PM (77 w, 5 d)
Fri, Jul 19
- Implemented check for "best" possible result suggested by Johannes.
- Merged test cases into one file and applied update_test_checks.py
No, it's not PGO.
Also do you have branch misprediction perf data? (large slowdowns like this is usually triggered by side effect like this).
I do. There is no any branch/data/instruction miss predictions. LSD works 100% in both cases as well. Even after regression CPI is 0.3. That means we are execution bounded. If I run the benchmark under perf scores change a little and there is 19% difference instead of original 35%. About half of slowdown (8.3%) comes from increased path length due to extra jump instruction. Rest comes from CPI increase by 10%. I'm checking different hypotheses what could cause that but no success so far.
Thu, Jul 18
This change causes 35% regression on very simple loop which is hot part of our internal micro benchmark.
This loop takes 99% of total execution time and has reasonably large number of iterations.
All measurements were performed on Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz.
Wed, Jul 17
I was independently looking to this part and came up with essentially same change. The only difference is that I chose MachineFrameInfo as source of "truth". Not really sure which one is better though...
Tue, Jul 16
Just found small issue with the patch. Will update once testing is good.
Mon, Jul 15
Updating patch to use implementation proposed by Ayal.
I don't have commit rights. I need someone's assistance with putting the fix in. Thanks!
One more test case added.
Updating comment as requested.
Fri, Jul 12
Looks we are totally aligned here. Honestly I don't understand why we can't track this thread down to the end. I agree potentially we may reuse result of non-inv load for inv load if we know it's the best. But supporting this case would be about the same complexity as extending current caching for non-inv as well as inv loads. If I simply drop the first guard around the code which does cache lookup we will end up with inv load not removed on the following example.
Thu, Jul 11
Wed, Jul 10
Tue, Jul 9
Adding unit test.
Remove accidental changes.
Mon, Jul 8
Sun, Jul 7
There is a https://bugs.llvm.org/show_bug.cgi?id=42384 failing due same problem.