[PATCH] D86534: [GVN] Preserve MemorySSA if it is available.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 05:02:26 PDT 2020
fhahn added a comment.
In D86534#2256179 <https://reviews.llvm.org/D86534#2256179>, @uabelho wrote:
> Hi!
>
> The following crashes for me with this patch
> opt -memoryssa -gvn -early-cse-memssa -S -o - foo.ll
>
> with foo.ll being just
>
> define void @f() {
> entry:
> unreachable
> }
>
> I get
>
> opt: ../lib/IR/LegacyPassManager.cpp:657: void llvm::PMTopLevelManager::setLastUser(ArrayRef<llvm::Pass *>, llvm::Pass *): Assertion `AnalysisPass && "Expected analysis pass to exist."' failed.
Thanks for the report. Looks like there is a problem with MemorySSAWrapperPass depending on AAResultsWrapperPass, which is not explicitly preserved by GVN. The problem can be solved by explicitly requiring AAResultsWrapperPass in EarlyCSE or by preserved AAResultsWrapper pass in GVN. I put up a patch for review/discussion for the best place to fix: D87137 <https://reviews.llvm.org/D87137>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86534/new/
https://reviews.llvm.org/D86534
More information about the llvm-commits
mailing list