[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Juneyoung Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 22 23:45:59 PDT 2021
aqjune added a comment.
Hello all,
I'm a messenger of @hyeongyukim's two patches that allow clang to turn on noundef analysis by default.
The noundef analysis flag was added by D81678 <https://reviews.llvm.org/D81678> in the past. Its goal is to mark arguments and return values in C/C++ as `noundef` if legal.
Attaching `noundef` is beneficial because it allows quite a few optimizations that are unsound w.r.t. undef or poison (they are usually guarded with `isGuaranteedNotToBeUndefOrPoison` check).
Since the fact that arg/ret values are noundef is derived from the source language (C/C++)'s specification, the information is permanently lost unless explicitly attached by clang.
Previously, the flag was not activated by default because it required a lot of tests to be updated, possibly raising conflicts with downstream patches (discussed in this thread: D82317 <https://reviews.llvm.org/D82317>)
To handle the conflict, I'd like to update requested tests to simply adding `-disable-noundef-analysis` at `// RUN: %clang_cc1 ...` rather than fixing the whole text.
I'll talk about this more in the second patch (D108453 <https://reviews.llvm.org/D108453>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105169/new/
https://reviews.llvm.org/D105169
More information about the cfe-commits
mailing list