ABataev added a comment. In D71241#1779168 <https://reviews.llvm.org/D71241#1779168>, @JonChesterfield wrote:
> Lowering in sema or in codegen seems a standard phase ordering choice. There > will be pros and cons to both. > > I think prior art leans towards sema. Variants are loosely equivalent to tag > dispatching or constexpr if, both handled before lowering the AST to IR. It is not quite so. Constexprs are not evaluated in sema. You can dump the ast and you will find all these constexprs in their original form. They are evaluated by the interpreter in place where it is required. But AST remains unaffected. > Writing the dispatch lowering on IR should make it easier to call from a > Fortran front end. I'm in favour of minimising work done on the clang AST on > general principles. > > Given we have two implementations, each at different points in the pipeline, > it might be constructive to each write down why you each choose said point. I > suspect the rationale is hidden by the implementation details. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71241/new/ https://reviews.llvm.org/D71241 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits