diff options
author | Chris Lattner <clattner@nondot.org> | 2021-09-08 10:28:52 -0700 |
---|---|---|
committer | Chris Lattner <clattner@nondot.org> | 2021-09-08 13:33:22 -0700 |
commit | 40a89da65ce85163123cdfec66afdcf2fa3687ce (patch) | |
tree | 045ba3c24dcc0afbe016a3a60a767a89f8a50e3d /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 8ae69338819d18d7a3669d8b51591bf742c61946 (diff) | |
download | llvm-40a89da65ce85163123cdfec66afdcf2fa3687ce.zip llvm-40a89da65ce85163123cdfec66afdcf2fa3687ce.tar.gz llvm-40a89da65ce85163123cdfec66afdcf2fa3687ce.tar.bz2 |
[Canonicalize] Don't call isBeforeInBlock in OperationFolder::tryToFold.
This patch (e4635e6328c8) fixed a bug where a newly generated/reused
constant wouldn't dominate a folded operation. It did so by calling
isBeforeInBlock to move the constant around on demand. This introduced
a significant compile time regression, because "isBeforeInBlock" is
O(n) in the size of a block the first time it is called, and the cache
is invalidated any time canonicalize changes something big in the block.
This fixes LLVM PR51738 and this CIRCT issue:
https://github.com/llvm/circt/issues/1700
This does affect the order of constants left in the top of a block,
I staged in the testsuite changes in rG42431b8207a5.
Differential Revision: https://reviews.llvm.org/D109454
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions