[llvm] [DSE] Refactor DSE (PR #100956)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 10:54:20 PDT 2024
aeubanks wrote:
> > with just this patch, it's still one MemoryLocation per MemoryDef. can we keep that assumption for now in this PR? and then make the change in the initializes DSE patch
>
> It's correct! With this PR, we still keep one MemoryLocation per MemoryDef. See `assert(DefinedLocations.size() == 1 && "Expected a single defined location");` This PR only refactors and aims to be equivalent to the existing implementation.
I mean in this PR `DefinedLocation` shouldn't be a `SmallVector`, just a `MemoryLocationWrapper`. The PR that introduces multiple MemoryLocations per MemoryDef should make that change instead.
>
> > also, the dependency cycle between Memory*Wrapper and DSEState is awkward, is it possible to keep the `eliminateDeadDefs()` implementations as part of DSEState?
>
> We can do that to avoid the dependency cycle. DSEState is a big struct (1300 lines of code). Is it ok to continue adding code in this struct?
I thought the code was originally in DSEState?
https://github.com/llvm/llvm-project/pull/100956
More information about the llvm-commits
mailing list