FailedChanges

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

Summary

  1. [clang] Add -fdebug-default-version for specifying the default DWARF (details)
  2. [Sema] Fixes a crash with a templated destructor (details)
  3. [InstCombine] Add test cases to show bad canonicalization of bitcasts (details)
  4. [lldb] Improve assert in GDBRemoteCommunicationReplayServer (details)
  5. [CodeGenModule] Group blocks runtime globals together, NFC (details)
  6. [Diagnostics] Teach -Wnull-dereference about address_space attribute (details)
  7. [codeview] Reference types in type parent scopes (details)
  8. Revert "[MachineVerifier] Improve verification of live-in lists. (details)
  9. [clang] Report sanitizer blacklist as a dependency in cc1 (details)
  10. BreakpointDummyOptionGroup was using g_breakpoint_modify_options rather (details)
  11. [compiler-rt] Fix tests after 03b84e4f6d0 (details)
  12. [debugify] Move the Debugify pass from tools/opt to lib/Transform/Utils (details)
  13. gn build: Merge 25ee861372f (details)
  14. Correctly update isSignalFrame when unwinding the stack via dwarf. (details)
  15. [SEH] Defer checking filter expression types until instantiaton (details)
  16. Modernize TestWeakSymbols Makefile (details)
  17. [InstCombine] auto-generate complete checks; NFC (details)
  18. [InstCombine] Don't transform bitcasts between x86_mmx and v1i64 into (details)
  19. [MC] Delete defaulted constructor llvm::AsmCond::AsmCond (details)
  20. [llvm/test] Update test comments (details)
  21. [analyzer] PR41729: CStringChecker: Improve strlcat and strlcpy (details)
  22. [analyzer] Add test cases for the unsupported C++ constructor modeling. (details)
  23. [creduce] Fixed a typo in the error message we're looking for. (details)
  24. [PowerPC] Option for enabling absolute jumptables with command line (details)
  25. [PowerPC][Altivec] Emit correct builtin for single precision vec_all_ne (details)
  26. [PowerPC][Altivec] Fix offsets for vec_xl and vec_xst (details)
  27. Reordering KextImageInfo::LoadImageUsingMemoryModule so we only call (details)
  28. [BPF] turn on -mattr=+alu32 for cpu version v3 and later (details)
  29. [ConstantRange] Add `ushl_sat()`/`sshl_sat()` methods. (details)
  30. [CR] ConstantRange::sshl_sat(): check sigdness of the min/max, not (details)
  31. [NFC][IndVarS] Adjust a comment (details)
  32. [Analyzer] Checker for Debugging Iterator Checkers (details)
  33. [RISCV] Fix evaluation of %pcrel_lo (details)
Commit 8d8f9c24407461fadf1730e80ebcf7c767254715 by dblaikie
[clang] Add -fdebug-default-version for specifying the default DWARF
version
This flag decouples specifying the DWARF version from enabling/disabling
DWARF in general (or the gN level - gmlt/limited/standalone, etc) while
still allowing existing -gdwarf-N flags to override this default.
Patch by Caroline Tice!
Differential Revision: https://reviews.llvm.org/D69822
The file was addedclang/test/Driver/debug-default-version.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h
The file was modifiedclang/include/clang/Driver/Options.td
Commit 2b943c46873a6411c5a79dcd708d8c72ce5b3675 by koraq
[Sema] Fixes a crash with a templated destructor
The issue was introduced by D33189 which fixed PR33189.
Fixes PR38671: "destructor cannot be declared as a template" leads to
segfault in Sema::LookupSpecialMember
Differential Revision: https://reviews.llvm.org/D69225
The file was modifiedclang/lib/Sema/SemaLookup.cpp
The file was modifiedclang/test/SemaTemplate/destructor-template.cpp
Commit 96119586c9968f3c1e56513d52956f5738cf4d26 by craig.topper
[InstCombine] Add test cases to show bad canonicalization of bitcasts
between x86_mmx and <1 x i64>.
As the test cases show, we end up with an insert/extract and a bitcast
to/from i64. x86_mmx is for some purposes conceptually a vector. We
shouldn't be adding scalar conversions around it.
Since _m64 is defined as <1 x i64> and intrinsics use x86_mmx as their
input/output these extra scalar operations prevent the X86 backend from
generating good code especially on 32-bit targets where i64 gets split.
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-vec-canon.ll
Commit c62a9f180c26e2fed012531caa581f0d736bfed9 by Jonas Devlieghere
[lldb] Improve assert in GDBRemoteCommunicationReplayServer
While investigating an issue where a different packet was sent during
replay I noticed how annoying it is that the existing assert doesn't
specify what packet is actually different. It's printed to the log, but
enabling logging has the potential to change LLDB's behavior. The same
is true when debugging LLDB while it's replaying the reproducer.
I replaced the assert with a printf of the unexpected packet followed by
a fatal_error wrapped in ifndef NDEBUG. The behavior is the same as the
previous assert, just with more/better context.
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
Commit b95bb0847a1ea366dda69901c24415e0d00a9527 by Vedant Kumar
[CodeGenModule] Group blocks runtime globals together, NFC
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
Commit 01b10bc7b14963902405d202ac78cd88d44adbc5 by Dávid Bolvanský
[Diagnostics] Teach -Wnull-dereference about address_space attribute
Summary: Clang should not warn for:
> test.c:2:12: warning: indirection of non-volatile null pointer will be
deleted,
>       not trap [-Wnull-dereference]
>     return *(int __attribute__((address_space(256))) *) 0;
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Solves PR42292.
Reviewers: aaron.ballman, rsmith
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69664
The file was modifiedclang/test/Sema/exprs.c
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit d91ed80e97ac9bfcfb02440874ed8b9a51c9491e by rnk
[codeview] Reference types in type parent scopes
Without this change, when a nested tag type of any kind (enum, class,
struct, union) is used as a variable type, it is emitted without
emitting the parent type. In CodeView, parent types point to their inner
types, and inner types do not point back to their parents. We already
walk over all of the parent scopes to build the fully qualified name.
This change simply requests their type indices as we go along to enusre
they are all emitted.
Fixes PR43905
Reviewers: akhuang, amccarth
Differential Revision: https://reviews.llvm.org/D69924
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
The file was modifiedllvm/test/DebugInfo/COFF/global-constants.ll
The file was addedllvm/test/DebugInfo/COFF/parent-type-scopes.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
Commit ad3c9d46fe39af1762a7be75d754723be9a5594a by gkistanova
Revert "[MachineVerifier] Improve verification of live-in lists.
This reverts commit b7b170c to give the author more time to address
failing tests on the expensive checks buildbots.
The file was removedllvm/test/MachineVerifier/live-ins-03.mir
The file was modifiedllvm/include/llvm/CodeGen/LivePhysRegs.h
The file was removedllvm/test/MachineVerifier/live-ins-02.mir
The file was removedllvm/test/MachineVerifier/live-ins-01.mir
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
Commit 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 by Jan Korous
[clang] Report sanitizer blacklist as a dependency in cc1
Previously these were reported from the driver which blocked
clang-scan-deps from getting the full set of dependencies from cc1
commands.
Also the default sanitizer blacklist that is added in driver was never
reported as a dependency. I introduced -fsanitize-system-blacklist cc1
option to keep track of which blacklists were user-specified and which
were added by driver and clang -MD now also reports system blacklists as
dependencies.
Differential Revision: https://reviews.llvm.org/D69290
The file was modifiedclang/test/Driver/fsanitize-blacklist.c
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Driver/SanitizerArgs.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was modifiedclang/test/Frontend/dependency-gen.c
Commit f1539b9db39a59a5e50c065c39e491ba4f890377 by jingham
BreakpointDummyOptionGroup was using g_breakpoint_modify_options rather
than g_breakpoint_dummy_options causing the -D option for breakpoint set
command to be incorrectly parsed.
Patch by Martin Svensson.
Differential Revision: https://reviews.llvm.org/D69425
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.cpp
The file was addedlldb/test/Shell/Breakpoint/Inputs/dummy-target.c
The file was addedlldb/test/Shell/Breakpoint/dummy-target.test
Commit bdeb2724f0aa9c518f94d998d24d8620a1e88727 by Jan Korous
[compiler-rt] Fix tests after 03b84e4f6d0
Fallout from:
[clang] Report sanitizer blacklist as a dependency in cc1
Default blacklists are now passed via -fsanitize-system-blacklist from
driver to cc1.
The file was modifiedcompiler-rt/test/asan/TestCases/default_blacklist.cpp
The file was modifiedcompiler-rt/test/msan/default_blacklist.cpp
Commit 25ee861372f1b6f512fb1fc7c938267670cf0cab by daniel_l_sanders
[debugify] Move the Debugify pass from tools/opt to lib/Transform/Utils
Summary: I need to make use of this pass from a driver program that
isn't opt. Therefore this patch moves this pass into the LLVM library so
that it is available for use elsewhere.
There was one function I kept in tools/opt which is
exportDebugifyStats() this is because it's serializing the statistics
into a human readable format and this seemed more in keeping with opt
than a library function
Reviewers: vsk, aprantl
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69926
The file was modifiedllvm/tools/opt/NewPMDriver.cpp
The file was removedllvm/tools/opt/Debugify.h
The file was modifiedllvm/tools/opt/CMakeLists.txt
The file was modifiedllvm/tools/opt/opt.cpp
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was addedllvm/include/llvm/Transforms/Utils/Debugify.h
The file was addedllvm/lib/Transforms/Utils/Debugify.cpp
The file was removedllvm/tools/opt/Debugify.cpp
Commit b4237db295d925646e4fe67c54517d22c78d1cc4 by llvmgnsyncbot
gn build: Merge 25ee861372f
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn
Commit d3c744313c3cca0c076f031ec71e66ca74b12f2a by saugustine
Correctly update isSignalFrame when unwinding the stack via dwarf.
A "signal frame" is a function or block of code where execution arrives
via a signal or interrupt, rather than via a normal call instruction. In
fact, a particular instruction is interrupted by the signal and needs to
be restarted. Therefore, when the signal handler is complete, execution
needs to return to the interrupted instruction, rather than the
instruction immediately following the call instruction, as in a normal
call.
Stack unwinders need to know this to correctly unwind signal frames.
Dwarf handily provides an "S" in the CIE augmentation string to describe
this case, and the libunwind API provides various functions to for
unwinders to determine it,.
The llvm libunwind implementation correctly sets it's internal variable
"isSignalFrame" when initializing an unwind context. However, upon
stepping up the stack, the current implementation correctly reads the
augmentation string and sets it in the CIE info (which it then
discards), libunwind doesn't update it's internal unwind context data
structure.
This change fixes that, and provides compatibility with both the
canonical libunwind and the libgcc implementation.
Reviewers: jfb
Subscribers: christof, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D69677
The file was modifiedlibunwind/src/UnwindCursor.hpp
The file was modifiedlibunwind/src/DwarfInstructions.hpp
The file was modifiedlibunwind/src/UnwindLevel1-gcc-ext.c
The file was addedlibunwind/test/signal_frame.pass.cpp
Commit 7177ce978e8f8e5409cec90bad07df92441656e3 by rnk
[SEH] Defer checking filter expression types until instantiaton
While here, wordsmith the error a bit. Now clang says:
error: filter expression has non-integral type 'Foo'
Fixes PR43779
Reviewers: amccarth
Differential Revision: https://reviews.llvm.org/D69969
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/test/Sema/__try.c
The file was modifiedclang/test/SemaCXX/exceptions-seh.cpp
Commit cbdd92be8a57e204aeb346c02ec6c4f440499679 by Fred Riss
Modernize TestWeakSymbols Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
Commit 2f32da3da1d5c02e7d212d1036982ff547cf1c25 by spatel
[InstCombine] auto-generate complete checks; NFC
The file was modifiedllvm/test/Transforms/InstCombine/builtin-object-size-ptr.ll
Commit 6749dc3446671df05235d0a218c426a314ac33cd by craig.topper
[InstCombine] Don't transform bitcasts between x86_mmx and v1i64 into
insertelement/extractelement
x86_mmx is conceptually a vector already. Don't introduce an extra
conversion between it and scalar i64.
I'm using VectorType::isValidElementType which checks for floating
point, integer, and pointers to hopefully make this more readable than
just blacklisting x86_mmx.
Differential Revision: https://reviews.llvm.org/D69964
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-vec-canon.ll
Commit ddff808e07d1e14565e688118e246c4b97630dae by maskray
[MC] Delete defaulted constructor llvm::AsmCond::AsmCond
The file was modifiedllvm/include/llvm/MC/MCParser/AsmCond.h
Commit 793679836a09da76fae910916d8997e69a06d9ca by scw
[llvm/test] Update test comments
The file was modifiedllvm/test/CodeGen/AArch64/arm64-preserve-most.ll
Commit acac540422e8cee4a77d10f087b2a2b67504b27b by Artem Dergachev
[analyzer] PR41729: CStringChecker: Improve strlcat and strlcpy
modeling.
- Fix false positive reports of strlcat.
- The return value of strlcat and strlcpy is now correctly calculated.
- The resulting string length of strlcat and strlcpy is now correctly
calculated.
Patch by Daniel Krupp!
Differential Revision: https://reviews.llvm.org/D66049
The file was modifiedclang/test/Analysis/bsd-string.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
Commit 5e0fb648420702e47c94de53757928360a106e8c by Artem Dergachev
[analyzer] Add test cases for the unsupported C++ constructor modeling.
Namely, for the following items:
- Handle constructors within new[];
- Handle constructors for default arguments.
Update the open projects page with a link to the newly added tests and
more hints for potential contributors.
Patch by Daniel Krupp!
Differential Revision: https://reviews.llvm.org/D69308
The file was addedclang/test/Analysis/handle_constructors_with_new_array.cpp
The file was addedclang/test/Analysis/handle_constructors_for_default_arguments.cpp
The file was modifiedclang/www/analyzer/open_projects.html
Commit 7215b7ef530bff896a1da70c6b062e9259f5fde7 by tra
[creduce] Fixed a typo in the error message we're looking for.
The file was modifiedclang/utils/creduce-clang-crash.py
Commit 9af28400d6ff59614dad2584f5de03be2e294151 by nemanjai
[PowerPC] Option for enabling absolute jumptables with command line
This option allows the user to specify the use of absolute jumptables
instead of relative which is the default on most PPC subtargets.
Patch by Kamauu Bridgeman
Differential revision: https://reviews.llvm.org/D69108
The file was addedllvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit 070e4027b02453f0962e5b61335a517581c5528f by nemanjai
[PowerPC][Altivec] Emit correct builtin for single precision vec_all_ne
We currently emit a double precision comparison instruction for this,
whereas we need to emit the single precision version.
Differential revision: https://reviews.llvm.org/D64024
The file was modifiedclang/test/CodeGen/builtins-ppc-p8vector.c
The file was modifiedclang/lib/Headers/altivec.h
Commit e0407f54965318247c8fece2dfa5c9023acf0973 by nemanjai
[PowerPC][Altivec] Fix offsets for vec_xl and vec_xst
As we currently have it implemented in altivec.h, the offsets for these
two intrinsics are element offsets. The documentation in the ABI (as
well as the implementation in both XL and GCC) states that these should
be byte offsets.
Differential revision: https://reviews.llvm.org/D63636
The file was modifiedclang/lib/Headers/altivec.h
The file was addedclang/test/CodeGen/builtins-ppc-xl-xst.c
Commit 6602e1fb0e34c1a755ef561de24e5b78a460672a by Jason Molenda
Reordering KextImageInfo::LoadImageUsingMemoryModule so we only call
ModulesDidLoad at the end of the method after the new module has been
added to the target and the sections have all been adjusted to their
actual load addresses.  Solves a problem where an operating system
plugin in the kernel could be loaded multiple times; the first before
the binary had even been added to the target.
<rdar://problem/50523558>
The file was modifiedlldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
Commit 6b8baf3062cdc7bd88867e239f26b6966ee3142c by yhs
[BPF] turn on -mattr=+alu32 for cpu version v3 and later
-mattr=+alu32 has shown good performance vs. without this attribute.
Based on discussion at

https://lore.kernel.org/bpf/1ec37838-966f-ec0b-5223-ca9b6eb0860d@fb.com/T/#t
cpu version v3 should support -mattr=+alu32. This patch enabled alu32 if
cpu version is v3, either specified by user or probed by the llvm.
Differential Revision: https://reviews.llvm.org/D69957
The file was modifiedllvm/lib/Target/BPF/BPFSubtarget.cpp
The file was modifiedllvm/test/CodeGen/BPF/32-bit-subreg-alu.ll
Commit e0ea842baec00b6bf6dc0069f1c1961da5889927 by lebedev.ri
[ConstantRange] Add `ushl_sat()`/`sshl_sat()` methods.
Summary: To be used in `ConstantRange::shlWithNoOverflow()`, may in
future be useful for when saturating shift/mul ops are added.
Unlike `ConstantRange::shl()`, these are precise.
Reviewers: nikic, spatel, reames
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69960
The file was modifiedllvm/lib/IR/ConstantRange.cpp
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
The file was modifiedllvm/include/llvm/IR/ConstantRange.h
Commit 72a21ad6c9cdbb41c8f17de2318fa469c013caef by lebedev.ri
[CR] ConstantRange::sshl_sat(): check sigdness of the min/max, not
ranges
This was pointed out in review, but forgot to stage this change into the
commit itself..
The file was modifiedllvm/lib/IR/ConstantRange.cpp
Commit 7b9f5401a61646f584249012de0be27ee0cb2b9b by suc-daniil
[NFC][IndVarS] Adjust a comment
(test commit)
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Commit 0f88caeef8f2d4708f442d03db7723396712a143 by adam.balogh
[Analyzer] Checker for Debugging Iterator Checkers
For white-box testing correct container and iterator modelling it is
essential to access the internal data structures stored for container
and iterators. This patch introduces a simple debug checkers called
debug.IteratorDebugging to achieve this.
Differential Revision: https://reviews.llvm.org/D67156
The file was modifiedclang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was addedclang/test/Analysis/debug-iterator-modeling.cpp
Commit 41449c58c58e466bcf9cdc4f7415950382bad8d7 by roger.ferrer
[RISCV] Fix evaluation of %pcrel_lo
The following testcase
  function:
.Lpcrel_label1:
auipc a0, %pcrel_hi(other_function)
addi a1, a0, %pcrel_lo(.Lpcrel_label1)
.p2align 2          # Causes a new fragment to be emitted
  .type other_function,@function
other_function:
ret
exposes an odd behaviour in which only the %pcrel_hi relocation is
evaluated but not the %pcrel_lo.
  $ llvm-mc -triple riscv64 -filetype obj t.s | llvm-objdump  -d -r -
  <stdin>: file format ELF64-riscv
  Disassembly of section .text:
0000000000000000 function:
        0: 17 05 00 00 auipc a0, 0
        4: 93 05 05 00 mv a1, a0
0000000000000004:  R_RISCV_PCREL_LO12_I other_function+4
  0000000000000008 other_function:
        8: 67 80 00 00 ret
The reason seems to be that in RISCVAsmBackend::shouldForceRelocation we
only consider the fragment but in RISCVMCExpr::evaluatePCRelLo we
consider the section. This usually works but there are cases where the
section may still be the same but the fragment may be another one. In
that case we end forcing a %pcrel_lo relocation without any %pcrel_hi.
This patch makes RISCVAsmBackend::shouldForceRelocation use the section,
if any, to determine if the relocation must be forced or not.
Differential Revision: https://reviews.llvm.org/D60657
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
The file was addedllvm/test/MC/RISCV/pcrel-fixups.s