[llvm-dev] Turning on clang's noundef analysis flag by default

Juneyoung Lee via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 7 23:27:20 PDT 2021


Hello all,

As described in the mail that I've sent in August, we'd like to turn on
clang's enable-noundef-analysis by default to address the performance
regression after some miscompilation bugs are fixed.
(The bug fixes are not landed yet; waiting for slowdowns to be handled. The
prototype of bug fix is https://reviews.llvm.org/D106041)

The two patches are: https://reviews.llvm.org/D105169 , https://reviews.llvm
.org/D108453 .
These patches help LLVM analyze that variables are well-defined,
facilitating optimizations that are correct only if vars are neither undef
nor poison.
They are splitted for readability, but they will be merged into one commit
and pushed if accepted.
The first link has the numbers about performance improvements after turning
the flag on.

Any questions or concerns about enabling the flag are appreciated.
One major concern that we've received was that enabling the flag could
raise merge conflicts and unit test failures in the downstream projects.
To handle this issue, we will disable the noundef flag for requested tests.
For any requested tests, we will add -disable-noundef-analysis to the flags
at // RUN: %clang_cc1 ... to avoid changes in CHECKs. Please feel free to
let us know.

Sincerely,
Juneyoung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211008/feb7fc23/attachment.html>


More information about the llvm-dev mailing list