SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [x86][CGP] improve sinking of splatted vector shift amount operand (details)
  2. [analyzer] Modernize analyzer's Python scripts (details)
  3. [clang] Fix bug in #pragma float_control(push/pop) (details)
  4. [analyzer] Make NonNullParamChecker as dependency for StdCLibraryFunctionsChecker (details)
  5. [libc++][span] SFINAE span default constructor on Extent == 0 (details)
  6. [analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries (details)
  7. Fix Z3 function calls regarding arithmetic operations (details)
  8. [Hexagon] Check isInstr() before getInstr() with SUnit (details)
  9. [analyzer] Improve PlacementNewChecker (details)
  10. lld: Let find_package(LLD) work (details)
  11. [lldb/PDB] Make "native" pdb tests host-independent (details)
  12. [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer (details)
  13. Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer" (details)
  14. Prohibit capture of _ExtInt in inline assembly. (details)
  15. [PowerPC] Remove support for SplitCSR. (details)
  16. [libcxx][span] Implement solution to LWG-3255 (details)
  17. Moving executable module symbols parsing to target creation method. (details)
  18. Revert "[StructurizeCFG] Fix region nodes ordering" (details)
Commit 26e742fd848b27ff925eab23e4d2a5675b418721 by spatel
[x86][CGP] improve sinking of splatted vector shift amount operand

Expands on the enablement of the shouldSinkOperands() TLI hook in:
D79718

The last codegen/IR test diff shows what I suspected could happen - we were
sinking all splat shift operands into a loop. But that's not what we want in
general; we only want to sink the *shift amount* operand if it is a splat.

Differential Revision: https://reviews.llvm.org/D79827
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/Transforms/CodeGenPrepare/X86/vec-shift.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shift-by-select-loop.ll
Commit c98872e3a3c0fc4390e0892866d7e844df929179 by vsavchenko
[analyzer] Modernize analyzer's Python scripts

Summary:
Fix read/write in binary format, which crashes Python 3.
Additionally, clean up redundant (as for Python 3) code and
fix a handful of flake8 warnings.

Differential Revision: https://reviews.llvm.org/D79932
The file was modifiedclang/utils/analyzer/SATestUtils.py
The file was modifiedclang/utils/analyzer/exploded-graph-rewriter.py
The file was modifiedclang/utils/analyzer/SATestUpdateDiffs.py
The file was modifiedclang/utils/analyzer/SumTimerInfo.py
The file was modifiedclang/utils/analyzer/SATestAdd.py
The file was modifiedclang/utils/analyzer/CmpRuns.py
The file was modifiedclang/utils/analyzer/SATestBuild.py
Commit 7b8e3065606cb555e7528e3b59d5e164ecf008fa by melanie.blower
[clang] Fix bug in #pragma float_control(push/pop)

Summary: #pragma float_control(pop) was failing to restore the expected
floating point settings because the settings were not correctly preserved
at #pragma float_control(push).
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedclang/test/CodeGen/fp-floatcontrol-pragma.cpp
Commit d061685a8304eb0b6adacd24f8dd2c2ef6dfee39 by gabor.marton
[analyzer] Make NonNullParamChecker as dependency for StdCLibraryFunctionsChecker

Summary:
If a given parameter in a FunctionDecl has a nonull attribute then the NonNull
constraint in StdCLibraryFunctionsChecker has the same effect as
NonNullParamChecker. I think it is better to emit diagnostics from the simpler
checker. By making NonNullParamChecker as a dependency, in these cases it will
be the first to emit a diagnostic and to stop the analysis on that path.

Reviewers: Szelethus, NoQ, baloghadamsoftware, balazske, steakhal

Subscribers: whisperity, xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79420
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modifiedclang/test/Analysis/analyzer-enabled-checkers.c
Commit 79941086fba3df115e5e7b54a5f826096c933102 by Louis Dionne
[libc++][span] SFINAE span default constructor on Extent == 0

The default constructor of a static span requires _Extent == 0 so
SFINAE it out rather than using a static_assert

Differential Revision: https://reviews.llvm.org/D71994
The file was modifiedlibcxx/include/span
The file was modifiedlibcxx/test/std/containers/views/span.cons/default.pass.cpp
The file was modifiedlibcxx/test/std/containers/views/span.cons/default.fail.cpp
Commit ff4492c89feb54e6ddfd6edaea59c98776963208 by gabor.marton
[analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries

Reviewers: NoQ, Szelethus, baloghadamsoftware, balazske

Subscribers: whisperity, xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, steakhal, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78118
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modifiedclang/test/Analysis/analyzer-config.c
The file was modifiedclang/test/Analysis/std-c-library-functions.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 5fc05c376a3cc0fb9a532e41d12e51f3d9916692 by gabor.marton
Fix Z3 function calls regarding arithmetic operations

Summary:
The order of Z3_mk_fpa_mul, Z3_mk_fpa_div, Z3_mk_fpa_add and Z3_mk_fpa_sub functions' arguments is: context, rounding_mode, ast1, ast2.
See for example: https://github.com/Z3Prover/z3/blob/a14c2a30516003cd1a60f8b7deca029033d11c78/src/api/api_fpa.cpp#L433

At function calls from LLVM the argument order was different: rounding_mode was passed as last argument.

Unfortunately these Z3_ast and other function parameter types are technically like void* which are reinterpret_cast-ed to a specific class type. So there was no type error, but the assertions fail in runtime if something goes wrong. Such a crash happened during Z3 refutation while using StaticAnalyzer.

Reviewers: Szelethus, xazax.hun, baloghadamsoftware, steakhal, martong, mikhail.ramalho

Reviewed By: martong

Subscribers: hiraditya, rnkovacs, mikhail.ramalho, martong, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79883

Patch by Tibor Brunner!
The file was modifiedllvm/lib/Support/Z3Solver.cpp
Commit 5f3f45dc5338266f4e73bdbea2ce20fdb7142ded by kparzysz
[Hexagon] Check isInstr() before getInstr() with SUnit

SUnit represent a MachineInstr in post-regalloc scheduling but SDNode
in pre-regalloc scheduling. when pass -enable-hexagon-sdnode-sched to
Hexagon backend with -O1 and above, this may cause an assertion failed.

Fixes PR45194.

Differential Revision: https://reviews.llvm.org/D76134
The file was modifiedllvm/lib/Target/Hexagon/HexagonSubtarget.cpp
Commit 7c3768495e8c1599dc30986f7bd47d5e91f303f2 by gabor.marton
[analyzer] Improve PlacementNewChecker

Summary:
1. Added insufficient storage check for arrays
2. Added align support check

Based on https://reviews.llvm.org/D76229

Reviewers: aaron.ballman, lebedev.ri, NoQ, martong

Reviewed By: martong

Subscribers: xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76996

Patch by Karasev Nikita!
The file was modifiedclang/test/Analysis/placement-new.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp
Commit 2b2a961309e65fb175fcf8d56507323fa6872425 by Matthew.Arsenault
lld: Let find_package(LLD) work

Install a cmake config file. Copied exactly from how clang exports.

I also wasn't sure whether the canonical capitalization is "lld" or
"LLD". The project() is still calling this lld, but most places seemed
to capitalize it.
The file was modifiedlld/CMakeLists.txt
The file was addedlld/cmake/modules/LLDConfig.cmake.in
The file was modifiedlld/cmake/modules/AddLLD.cmake
The file was addedlld/cmake/modules/CMakeLists.txt
Commit eb50b643fe00171823e055f7801e6610ee7bdef7 by pavel
[lldb/PDB] Make "native" pdb tests host-independent

These test don't execute the binaries they build, and so they don't need
to build for the host. By hardcoding the target, we don't have do xfail
or skip them for targets which don't have the appropriate support in
clang(-cl).
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
The file was modifiedlldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
Commit bb308b020522420413c7d3f2989a88f2fc423c56 by anna
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer

Summary:
This is a more general fix to 59029b9eef23 (D75704).
This patch does the following:
1. updates isKnownBaseValue to account for base pointer and
derived pointer having differing types.
2. This inturn allows us to populate the
lattice (States) for such derived pointers.
3. It also updates all states where the base and derived pointers have
differing types (vector versus scalar) and conservatively marks these
states as conflictcs.
Note that in 59029b9eef23, we were just fixing existing lattice values
and that too, only for uses of extractelement.

Reviewers: reames, skatkov, dantrushin

Reviewed By: skatkov

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76305
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
The file was modifiedllvm/test/Transforms/RewriteStatepointsForGC/scalar-base-vector.ll
Commit f20c62741e7b8c35f1d840488352f8e035af0abb by anna
Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer"

This reverts commit bb308b020522420413c7d3f2989a88f2fc423c56.
Failing a testcase.
The file was modifiedllvm/test/Transforms/RewriteStatepointsForGC/scalar-base-vector.ll
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Commit 5f1f4a5d0157c11e0a88d9a273f49c8f866b01ef by erich.keane
Prohibit capture of _ExtInt in inline assembly.

The backends don't seem to properly handle the _ExtInt type in inline
assembly with crashes occurring in many. While the ones I tested seem to
work for powers of 2 < 64 (and some any multiple of 64 greater than
that), it seemed like a better idea to just use of this type in inline
assembly prohibited.
The file was modifiedclang/test/SemaCXX/ext-int.cpp
The file was modifiedclang/lib/Sema/SemaStmtAsm.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticCommonKinds.td
Commit ce4ebc14a8963e58f08a6ab6c5ce4096469d570d by sd.fertile
[PowerPC] Remove support for SplitCSR.

SplitCSR was only suppored for functions with CXX_FAST_TLS calling
convention. Clang only emits that calling convention for Darwin which is
no longer supported by the PowerPC backend. Another IR producer could
use the calling convention, but considering the calling convention is
meant to be an optimization and the codegen for SplitCSR can be
attrocious on Power (see the modifed lit test) it is best to remove it
and codegen CXX_FAST_TLS same as the C calling convention.

Differential Revision: https://reviews.llvm.org/D79018
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCCallingConv.td
The file was modifiedllvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
The file was modifiedllvm/lib/Target/PowerPC/PPCRegisterInfo.h
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/Target/PowerPC/PPCFastISel.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/cxx_tlscc64.ll
Commit ab9f11168f55add345f29592ec0946ac2e5ae697 by Louis Dionne
[libcxx][span] Implement solution to LWG-3255

This implements the relaxed requirements on the std::array constructors of span,
where the type only needs to be convertible to the element type of the span.

Note that the previous tests were not sufficient, as the const array<T, n> constructor
was only tested for compile time and the array<T, N> only during runtime.

Restructure the tests so that we can test conversions as well as both constructors.

Differential Revision: https://reviews.llvm.org/D75706
The file was modifiedlibcxx/www/cxx2a_status.html
The file was modifiedlibcxx/include/span
The file was modifiedlibcxx/test/std/containers/views/span.cons/stdarray.pass.cpp
Commit 631048e8117864c09672e33eb7b6fcc4efe5f749 by pavel
Moving executable module symbols parsing to target creation method.

Summary:
In our project we are using remote client-server LLDB configuration.
We want to parse as much debugging symbols as we can before debugger starts attachment to the remote process.
To do that we are passing the path of the local executable module to CreateTarget method at the client.
But, it seems that this method are not parsing the executable module symbols.
To fix this I added PreloadSymbols call for executable module to target creation method.

This patch also fixes a problem where the DynamicLoader would reset a
module when launching the target. We fix it by making sure
Platform::ResolveExecutable returns the module object obtained from the
remote platform.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D78654
The file was modifiedlldb/source/Target/RemoteAwarePlatform.cpp
The file was addedlldb/unittests/Target/RemoteAwarePlatformTest.cpp
The file was modifiedlldb/source/Target/TargetList.cpp
The file was modifiedlldb/unittests/Target/CMakeLists.txt
Commit c6c265527dd16bea1069b53760f56577c840036c by ehudkatz
Revert "[StructurizeCFG] Fix region nodes ordering"

This reverts commit 897d8ee5cd693e17f95a7e84194bca4c089a520b,
due to causing an infinite loop when encountering a loop with
a sub-region with an inner loop.
The file was removedllvm/test/Transforms/StructurizeCFG/interleaved-loop-order.ll
The file was modifiedllvm/lib/Transforms/Scalar/StructurizeCFG.cpp