This patch relaxes overconservative checks on whether or not we could write memory
before we execute an instruction. This allows us to hoist guards out of loops even if they
are not in the header block.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/Analysis/MustExecute.h | ||
---|---|---|
77 ↗ | (On Diff #161208) | 'could not' does not seem to be a right verb here. Perhaps 'does not' better meets the purpose (doesNotWriteMemoryBefore?). |
lib/Analysis/MustExecute.cpp | ||
193 ↗ | (On Diff #161208) | Since current usage of this interface is limited to invariant guards only it should not be a pressing problem compile-time wise. |
lib/Analysis/MustExecute.cpp | ||
---|---|---|
193 ↗ | (On Diff #161208) | Planning to make MemoryWriteTracking based on https://reviews.llvm.org/D50954 |
lib/Analysis/MustExecute.cpp | ||
---|---|---|
184 ↗ | (On Diff #161457) | I'm not sure fast-path is needed here, it will definitely be handled by the code below and will only be And, anyway, comment is taken from somewhere else and is a bit confusing. |
lib/Analysis/MustExecute.cpp | ||
---|---|---|
184 ↗ | (On Diff #161457) | Set creation is just unneeded overhead. Agreed with the comment, it needs fixed. :) |
Rebased. I will wait a bit if we will find any bugs in underlying LICM changes and if it's OK, I will merge it by the end of week.