[PATCH] D146466: [clang] diagnose function fallthrough
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 12:17:29 PDT 2023
efriedma added a comment.
The problem with a change like that is that it's not clear what the underlying semantic model is. If we add a flag that says "try to generate code that matches Linux kernel developers' mental model of the underlying machine", or "loop unrolling should try to preserve undefined behavior", or "out-of-bounds memory accesses are well-defined", the semantics are unclear. The point of having well-defined IR is that a developer can tell whether a transform is legal or not based on reading LangRef, as opposed to trying to blindly guess whether a transform is going to break some user's code.
Making clang generate different IR for specific load/division/etc. operators is much easier to specify; IR has the same meaning it always has, we're just generating IR that's well-defined in more cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146466/new/
https://reviews.llvm.org/D146466
More information about the llvm-commits
mailing list