SuccessChanges

Summary

  1. [ELF] --wrap: set isUsedInRegularObj of __wrap_ if it is defined or shared (details)
  2. [NFC][SimplifyCFG] Count the number of invokes turned into calls due to empty cleanup blocks (details)
  3. [NFC][SimplifyCFG] Add a test showing invoke->call simplification failure (details)
  4. [NFC][SimplifyCFG] Rewrite isCleanupBlockEmpty() to be iterator_range-based (details)
  5. [SimplifyCFG] Fix invoke->call fold w/ multiple invokes in presence of lifetime intrinsics (details)
  6. [Diagnostics] Diagnose missing comma in string array initialization (details)
Commit 99cd56906a4dd00db25b045eccddcb6802d39f8d by i
[ELF] --wrap: set isUsedInRegularObj of __wrap_ if it is defined or shared

Fixes PR47017 (a regression when fixing PR46169): if __wrap_ is shared,
it is not exported.
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/test/ELF/wrap-shlib-undefined.s
Commit a587bf3eb074340710a36c0c00c16dadcf5adb79 by lebedev.ri
[NFC][SimplifyCFG] Count the number of invokes turned into calls due to empty cleanup blocks
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit c2ebb3246551eb144fb4d684bc597c9495c0d0c0 by lebedev.ri
[NFC][SimplifyCFG] Add a test showing invoke->call simplification failure
The file was addedllvm/test/Transforms/SimplifyCFG/invoke_unwind_lifetime.ll
Commit 1f452ac1d784dbeba983aed7986827e3a7cd9c59 by lebedev.ri
[NFC][SimplifyCFG] Rewrite isCleanupBlockEmpty() to be iterator_range-based
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit e492f0e03b01a5e4ec4b6333abb02d303c3e479e by lebedev.ri
[SimplifyCFG] Fix invoke->call fold w/ multiple invokes in presence of lifetime intrinsics

SimplifyCFG has two main folds for resumes - one when resume is directly
using the landingpad, and the other one where resume is using a PHI node.

While for the first case, we were already correctly ignoring all the
PHI nodes, and both the debug info intrinsics and lifetime intrinsics,
in the PHI-based-one, we weren't ignoring PHI's in the resume block,
and weren't ignoring lifetime intrinsics. That is clearly a bug.

On RawSpeed library, this results in +9.34% (+81) more invoke->call folds,
-0.19% (-39) landing pads, -0.24% (-81) invoke instructions
but +51 call instructions and -132 basic blocks.

Though, the run-time performance impact appears to be within the noise.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/invoke_unwind_lifetime.ll
Commit dc096a66cb519532121fb0fbedb13265bd4b29ec by Dávid Bolvanský
[Diagnostics] Diagnose missing comma in string array initialization

Motivation (from PR37674):

const char *ss[] = {
  "foo", "bar",
  "baz", "qux"  // <-- Missing comma!
  "abc", "xyz"
  };

This kind of bug was recently also found in LLVM codebase (see PR47030).

Solves PR47038, PR37674

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D85545
The file was addedclang/test/Sema/string-concat.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaExpr.cpp