2 ms·
I read up to the may_explode example. You can already analyse this in clang. I have no idea what the actual point of any of this is since it claims something th
by ArrayBoundCheck 4y ago
I read up to the may_explode example. You can already analyse this in clang. I have no idea what the actual point of any of this is since it claims something that is in reality already being done. Also the syntax is much harder to read than the current ir
- elromulous 4y agoA 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/...