3 ms·
A top level comment seems to have answered this. There's a link[1] in the post that includes motivation. > In general, Clang’s AST is not an appropriate repres
by elromulous 4y ago
A top level comment seems to have answered this. There's a link[1] in the post that includes 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.
[1] 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/...