[PATCH] D117223: [GlobalOpt] Make global SRA offset based
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 04:14:32 PST 2022
uabelho added a comment.
Hello,
We've seen a case where the output from opt is different with/without debug info and ended up bisection at this patch.
After reduction and fiddling it seems like it doesn't actually have to do with debug info at all but something else. Our best reproducer som far is like below.
If we run a sroa, early-cse and globalopt like this:
opt -passes='function(sroa,early-cse),invalidate<all>,globalopt' -debug-only=globalopt bbi-65060.ll -o /dev/null
we get one set of printouts and if we run like this where we run the same passes but in two different invocations:
opt -passes='function(sroa,early-cse),invalidate<all>' bbi-65060.ll | opt -passes=globalopt -debug-only=globalopt -o /dev/null
we get something else.
Notably is that with the second way, with the split pipeline we see
PERFORMING GLOBAL SRA ON: @g_93 = internal unnamed_addr global [6 x i16*] undef
MARKING CONSTANT: @g_93.0 = internal unnamed_addr global i16* undef
*** Marking constant allowed us to simplify all users and delete global!
GLOBAL NEVER LOADED: @g_93.1 = internal unnamed_addr global i16* undef
which we don't see when we run all passes in the same pipe.
This has been very elusive and hard to reproduce and reduce so we wouldn't be surprised if it's connected to some memory issue, iteration order or something like that.
F21943308: bbi-65060.ll <https://reviews.llvm.org/F21943308>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117223/new/
https://reviews.llvm.org/D117223
More information about the llvm-commits
mailing list