[PATCH] D150384: [CodeGenPrepare] Fix for using outdated/corrupt LoopInfo

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 06:08:18 PDT 2023


chill updated this revision to Diff 531714.
chill added a comment.

Fix some more issues with maintaining DT/LI up to date:

If the DT was modified in a normal (not huge) function, the over-the-blocks loop
will exit with an outdated DT, which is then used by `mergeSExts`.
Thus the reset of the DT was moved immediately after returning from `optimizeBlock`.
This ensures that `mergeSExts` will work with an up to date DT and allows
to avoid unnecessary rebuilds of the DT by moving the initial reset outside the outer loop.
The latter necessitates updating the LI and DT in `splitLargeGEPOffsets` and
`eliminateFallThrough` (only if DT is already present).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150384/new/

https://reviews.llvm.org/D150384

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150384.531714.patch
Type: text/x-patch
Size: 7390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/2c821407/attachment.bin>


More information about the llvm-commits mailing list