3 ms·
The second sentence is as follows: The LLVM’s discourse RFC goes in depth about the project motivation Link to the discourse RFC: https://discourse.llvm.org/
by danuker 4y ago
The second sentence is as follows:
The LLVM’s discourse RFC goes in depth about the project motivation
Link to the discourse RFC:
https://discourse.llvm.org/t/rfc-an-mlir-based-clang-ir-cir/63319 https://discourse.llvm.org/t/rfc-an-mlir-based-clang-ir-cir/...
Motivation:
> In general, Clang’s AST is not an appropriate representation for dataflow analysis and reasoning about control flow. On the other hand, LLVM IR is too low level — it exists at a point in which we have already lost vital language information (e.g. scope information, loop forms and type hierarchies are invisible at the LLVM level), forcing a pass writer to attempt reconstruction of the original semantics. This leads to inaccurate results and inefficient analysis - not to mention the Sisyphean maintenance work given how fast LLVM changes. Clang’s CFG is supposed to bridge this gap but isn’t ideal either: a parallel lowering path for dataflow diagnostics that (a) is discarded after analysis, (b) has lots of known problems (checkout Kristóf Uman’s great survey 32 regarding “dataflowness”) and (c) has testing coverage for CFG pieces not quite up to LLVM’s standards.