andykaylor wrote: > > The adding of the AST ref to the IR is quite unfortunate, presumably this > > is intended to be removed in the future? > > The intent is to the keep the AST around - which shouldn't preclude raising > CIR or enhancing operations whenever it makes sense. This something we > learned from Swift, which keeps AST around in SIL and use that for analysis / > optimizations (there's a whole backlog/background for that in the RFCs). > > The AST is too big to be entirely replicated in CIR, and it's super handy to > have around if we want to progressively lower CIR.
Oh! I starting to understand this a bit better. When I was working on the pointer-to-member stuff, there was a case (with pointer-to-virtual-function, I think) where we were having to call into the target-specific CXXABI to get some information for our current representation. I didn't like that and made a mental note that we need to uplevel that, but that required information from the AST so I didn't know how we would get that after codegen. Now I do! https://github.com/llvm/llvm-project/pull/179827 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
