https://github.com/andykaylor commented:
We should create a design document describing the EH codegen and lowering process. When I made my suggestions on https://github.com/llvm/llvm-project/pull/172713 I may have been starting from the wrong place in the CIR pipeline, but the way we currently have things ordered isn't well-suited to our needs. Currently, we have this order: 1. High-level CIR CodeGen 2. CIR canonicalize pass 3. (optionally) CIR simplify pass 4. CXXABI lowering pass 5. Lowering prepare pass 6. (command-line specified passes) 7. Hoist allocas pass 8. CIR flatten cfg pass 9. Goto solver pass That's problematic for EH because the C++ ABI details of EH handling don't appear until the flatten cfg pass. Should we be flattening the EH call graph during CXXABI lowering? Or should the CXXABI lowering be deferred until after the CFG flattening. The ABI-independent representation I suggested isn't necessary if we do the flattening as part of the CXXABI lowering. I'm not sure that's practical in all cases, but I'm also not sure it isn't. https://github.com/llvm/llvm-project/pull/173306 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
