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

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 14:53:25 PST 2021


schweitz added a comment.

I agree with the comment that calling MLIR and/or FIR a "front end" is arbitrary and, I suspect, mostly based on a directory structure.

In the flang project/directory, there is a pretty clear and obvious distinction between the front end of parsing and semantics checking and the high-level semantic representation of FIR and optimizations. Indeed the distinction between these in the vernacular of the Flang project is "front end" vs. "lowering" or "optimizer". Flang has an Optimizer directory, mostly upstreamed, of its own, so the definitions given here seem confusing. In short, LLVM target independent optimizations won't be the only optimizations and do not define the entirety of "the optimizer" for Flang. (For completeness, the LLVM target independent optimizations and code generation parts are often referred to as "the backend" in Flang.)



================
Comment at: flang/docs/FlangDriver.md:350
+IR output (it can also consume and generate most of the intermediate
+representations). The generated LLVM IR is then passed onto the **optimiser**
+that is implemented within the LLVM sub-project and that transforms the input
----------------
optimizer. You'll want to search and replace as both the British 's' and the American 'z' are used here.


================
Comment at: flang/docs/FlangDriver.md:361
+components inside Flang. Note that other parts of the Flang frontend my refer
+to LLVM (or LLVM IR) as the backaned without making a distinction into the
+optimiser and one of the LLVM hardware backends.
----------------
PeteSteinfeld wrote:
> In American English, at least, the usual phrase is "distinction between" rather than "distinction into".
backaned / backend


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