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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to