- For some reason, upper bound being a variable works, lower bound does not.
- Teach PPCGCodeGeneration to codegen even when lower bound is variable.
Details
Details
- Reviewers
efriedma jdoerfert Meinersbur gareevroman sebpop • zinob huihuiz pollydev grosser - Commits
- rGa1b2086a33db: [Invariant Loads] Do not consider invariant loads to have dependences.
rPLO307907: [Invariant Loads] Do not consider invariant loads to have dependences.
rL307907: [Invariant Loads] Do not consider invariant loads to have dependences.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
- Remove a testcase that trivially worked (merged into master).
- Add a testcase that has both lower and upper bounds.
Comment Actions
- Hoist out values from the SubtreeValue because it appears like the value is used in two different "branches" of the code. So, find the closest dominator between where the value is and where it is used by PPCGCodeGeneration and put this instruction there.
- This is crazy, I see no reason as to why this is "correct". However, it seems to generate reasonable code for the testcases I have in mind.
- However, other test cases fail due to the change in hasScalarDepsInsideRegion, because of the change in SCEVInRegionDependences::follow.
Comment Actions
- Teach PPCGCodeGeneration to pick up values from ValueMap when it generates
loads and stores.
- No invalid code generated anymore.
- Some test cases fail due to change in generated IR / dependences.
Comment Actions
- Fix all test cases to work with this patch. I'm not sure about two test cases, have written them down here:
- test/ScopInfo/invariant-loads-leave-read-only-statements
- invariant_load_scalar_escape_alloca_sharing.ll
test/DeLICM/reduction_looprotate_hoisted.ll | ||
---|---|---|
67 ↗ | (On Diff #106396) | @Meinersbur: Does this change fix the FIXME you had added? |