[PATCH] D115529: [flang][nfc] Clarify the frontend/backend distinction

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 10:15:52 PST 2021


Meinersbur added a comment.

IMHO, MLIR is part of the mid-end/optimizer. From a conceptual point, drawing the line between LLVM-IR and MLIR is arbitrary, and optimizations are done on the MLIR/FIR-level as well. Eg. Open64 has six different intermediate representations. "all the stages implemented in the Flang sub-project" is also blurry since MLIR other than the FIR dialect is not part of the flang project. Consistency with Clang can also not claimed since Clang has no MLIR or language-specific IR stage.

Generally, I'd prefer to introduce different meanings for front-end/mid-end/back-end for different parts. IMHO renaming `EmitObjAction` to `BackendAction` is still fine since emitting assembly and object code both go through the actual LLVM backends.



================
Comment at: flang/docs/FlangDriver.md:340
 
+# Frontend vs Optimiser vs Backend
+Depending on the context, compiler frontend and backend can mean different
----------------
I think the doc uses American English


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115529/new/

https://reviews.llvm.org/D115529



More information about the llvm-commits mailing list