[llvm] change contents of ScalarEvolution from private to protected (PR #83052)

Joshua Ferguson via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 14:58:48 PST 2024


skewballfox wrote:

I'm starting to get this implemented. In order to avoid taking the implementation in the wrong direction, I'd like to get feedback whether this is a solution you guys are okay with:
- moving `ScalarEvolutionMustExit` out of Enzyme and into the headers and source files for ScalarEvolution, in the llvm namespace but outside of `ScalarEvolution`, and moving any necessy utility functions into a new file under `Analysis/Utils/EnzymeFunctionUtils`
- declaring `ScalarEvolutionMustExit` as a friend class within `ScalarEvolution`
- changing the instantiation of `ScalarEvolutionMustExit` to take a reference to a `ScalarEvolution` instance, and stores that internally

If you guys would prefer this to be handled another way, let me know. totally open to suggestions

https://github.com/llvm/llvm-project/pull/83052


More information about the llvm-commits mailing list