diff options
| author | Florian Hahn <flo@fhahn.com> | 2021-10-12 11:10:40 +0100 |
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2021-10-12 11:42:28 +0100 |
| commit | cd0ba9dc58c5806f4e3cc9635ab1f64af6973a83 (patch) | |
| tree | 88ea8e04a6a590ee63042160f3f5ea01ad268eb3 /lldb/test/API/lua_api/TestProcessAPI.lua | |
| parent | 6a1f50b84ae8f8a8087fcdbe5f27dae8c76878f1 (diff) | |
[LoopPeel] Peel if it turns invariant loads dereferenceable.
This patch adds a new cost heuristic that allows peeling a single
iteration off read-only loops, if the loop contains a load that
1. is feeding an exit condition,
2. dominates the latch,
3. is not already known to be dereferenceable,
4. and has a loop invariant address.
If all non-latch exits are terminated with unreachable, such loads
in the loop are guaranteed to be dereferenceable after peeling,
enabling hoisting/CSE'ing them.
This enables vectorization of loops with certain runtime-checks, like
multiple calls to `std::vector::at` if the vector is passed as pointer.
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D108114
Diffstat (limited to 'lldb/test/API/lua_api/TestProcessAPI.lua')
0 files changed, 0 insertions, 0 deletions
