SuccessChanges

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

Summary

  1. [X86] Add knownbits tests showing missing shift amount demanded elts (details)
  2. [SelectionDAG] ComputeKnownBits - Add DemandedElts support to (details)
  3. [SelectionDAG] ComputeNumSignBits - Use getValidShiftAmountConstant for (details)
  4. [InstSimplify] move tests for select from InstCombine; NFC (details)
  5. [MIPS][ELF] Use PC-relative relocations in .eh_frame when possible (details)
  6. [MIPS] Don't emit R_(MICRO)MIPS_JALR relocations against data symbols (details)
  7. [AArch64] Emit HINT instead of PAC insns in Armv8.2-A or below (details)
  8. Add missing triples to tests in 0c29d3ff2233696f663ae34a8aeda23c750ac68f (details)
  9. Sema::getOwningModule - take const Decl* type. (details)
  10. Fix "pointer is null" static analyzer warnings. NFCI. (details)
  11. Fix some cppcheck shadow variable warnings. NFCI. (details)
  12. Merge isVectorType() and getAs<VectorType> calls to silence clang static (details)
  13. Fix cppcheck uninitialized variable in DiffTree() constructor warning. (details)
  14. [RISCV] Handle globals and block addresses in asm operands (details)
  15. [Clang][Driver] Re-use the calling process instead of creating a new (details)
Commit 89ba150240a45cac88216b6127efb523fb9506b0 by llvm-dev
[X86] Add knownbits tests showing missing shift amount demanded elts
handling.
The file was modifiedllvm/test/CodeGen/X86/known-bits-vector.ll
The file was modifiedllvm/test/CodeGen/X86/combine-shl.ll
Commit 6d1a8fd447934387605ea11d35e1b62866b7d093 by llvm-dev
[SelectionDAG] ComputeKnownBits - Add DemandedElts support to
getValidShiftAmountConstant/getValidMinimumShiftAmountConstant()
The file was modifiedllvm/test/CodeGen/X86/known-bits-vector.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/combine-shl.ll
Commit 376bc39c829fab7ad14424c5418c03ed6649d839 by llvm-dev
[SelectionDAG] ComputeNumSignBits - Use getValidShiftAmountConstant for
shift opcodes
getValidShiftAmountConstant handles out of bounds shift amounts for us,
allowing us to remove the local handling.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 26d2ace9e2305266be888e15392be29e3145163d by spatel
[InstSimplify] move tests for select from InstCombine; NFC
InstCombine has transforms that would enable these simplifications in an
indirect way, but those transforms are unsafe and likely to be removed.
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstSimplify/select.ll
Commit 894f742acb977a09285dcab024e50c2cf6bce578 by Alexander.Richardson
[MIPS][ELF] Use PC-relative relocations in .eh_frame when possible
When compiling position-independent executables, we now use
DW_EH_PE_pcrel | DW_EH_PE_sdata4. However, the MIPS ABI does not define
a 64-bit PC-relative ELF relocation so we cannot use sdata8 for the
large code model case. When using the large code model, we fall back to
the previous behaviour of generating absolute relocations.
With this change clang-generated .o files can be linked by LLD without
having to pass -Wl,-z,notext (which creates text relocations). This is
simpler than the approach used by ld.bfd, which rewrites the
.eh_frame section to convert absolute relocations into relative
references.
I saw in D13104 that apparently ld.bfd did not accept pc-relative
relocations for MIPS ouput at some point. However, I also checked that
recent ld.bfd can process the clang-generated .o files so this no longer
seems true.
Reviewed By: atanasyan Differential Revision:
https://reviews.llvm.org/D72228
The file was modifiedllvm/lib/Object/RelocationResolver.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/test/DebugInfo/Mips/eh_frame.ll
The file was modifiedllvm/test/MC/Mips/eh-frame.s
The file was addedlld/test/ELF/mips-eh_frame-pic.s
Commit 8e8ccf4712cf58562a91c197da3efd4f9963ce0d by Alexander.Richardson
[MIPS] Don't emit R_(MICRO)MIPS_JALR relocations against data symbols
The R_(MICRO)MIPS_JALR optimization only works when used against
functions. Using the relocation against a data symbol (e.g. function
pointer) will cause some linkers that don't ignore the hint in this case
(e.g. LLD prior to commit 5bab291b7b) to generate a relative branch to
the data symbol which crashes at run time. Before this patch, LLVM was
erroneously emitting these relocations against local-dynamic TLS
function pointers and global function pointers with internal visibility.
Reviewers: atanasyan, jrtc27, vstefanovic Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D72571
The file was modifiedllvm/lib/Target/Mips/MipsISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Mips/reloc-jalr.ll
Commit da33762de8531914d4d0dae16bfce2192f02bc79 by pablo.barrio
[AArch64] Emit HINT instead of PAC insns in Armv8.2-A or below
Summary: The Pointer Authentication Extension (PAC) was added in
Armv8.3-A. Some instructions are implemented in the HINT space to allow
compiling code common to CPUs regardless of whether they feature PAC or
not, and still benefit from PAC protection in the PAC-enabled CPUs.
The 8.3-specific mnemonics were currently enabled in any architecture,
and LLVM was emitting them in assembly files when PAC code generation
was enabled. This was ok for compilations where both LLVM codegen and
the integrated assembler were used. However, the LLVM codegen was not
compatible with other assemblers (e.g. GAS). Given the fact that the
approach from these assemblers (i.e. to disallow Armv8.3-A mnemonics if
compiling for Armv8.2-A or lower) is entirely reasonable, this patch
makes LLVM to emit HINT when building for Armv8.2-A and below, instead
of PACIASP, AUTIASP and friends. Then, LLVM assembly should be
compatible with other assemblers.
Reviewers: samparker, chill, LukeCheeseman
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71658
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/speculation-hardening-loads.ll
The file was modifiedllvm/test/CodeGen/AArch64/sign-return-address.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-same-key-a.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-same-key-b.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-non-leaf.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-subtarget.ll
The file was modifiedllvm/test/MC/AArch64/armv8.3a-signed-pointer.s
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
The file was modifiedllvm/test/CodeGen/AArch64/speculation-hardening-dagisel.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-diff-key.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-diff-scope-same-key.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-cfi.ll
Commit 0b91e78a719065c67b33bf82b0cde3d4ecfe3b7d by sam.mccall
Add missing triples to tests in 0c29d3ff2233696f663ae34a8aeda23c750ac68f
so they target the right arch.
The file was modifiedllvm/test/CodeGen/X86/align-branch-boundary-default.s
The file was modifiedllvm/test/CodeGen/X86/align-branch-boundary-default.ll
Commit 7af67259cdd66811941514a263dd0f81c491d8f1 by llvm-dev
Sema::getOwningModule - take const Decl* type.
Fixes static analyzer warning that const_cast was being used despite
only const methods being called.
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
Commit 40311f9724953541ab7b755fb6a96b31c1e63f00 by llvm-dev
Fix "pointer is null" static analyzer warnings. NFCI.
Use castAs<> instead of getAs<> since the pointers are always
dereferenced and castAs will perform the null assertion for us.
The file was modifiedclang/lib/AST/ASTContext.cpp
Commit 025941785faf25a3d9ba2c1e7682ca6c2ad063af by llvm-dev
Fix some cppcheck shadow variable warnings. NFCI.
The file was modifiedclang/lib/AST/ASTContext.cpp
Commit 4647aae72f33b8742eb42c1fb869ebd4fdbb3038 by llvm-dev
Merge isVectorType() and getAs<VectorType> calls to silence clang static
analyzer warning. NFCI.
The file was modifiedclang/lib/AST/ASTDiagnostic.cpp
Commit b11027a08620dce2887377c830be239a4af478b6 by llvm-dev
Fix cppcheck uninitialized variable in DiffTree() constructor warning.
NFCI.
The file was modifiedclang/lib/AST/ASTDiagnostic.cpp
Commit 043c5eafa8789d76b06b93d157c928830c4d0814 by luismarques
[RISCV] Handle globals and block addresses in asm operands
Summary: These seem to be the machine operand types currently needed by
the RISC-V target.
Reviewers: asb, lenary Reviewed By: lenary Tags: #llvm Differential
Revision: https://reviews.llvm.org/D72275
The file was modifiedllvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/RISCV/inline-asm.ll
Commit b4a99a061f517e60985667e39519f60186cbb469 by alexandre.ganea
[Clang][Driver] Re-use the calling process instead of creating a new
process for the cc1 invocation
With this patch, the clang tool will now call the -cc1 invocation
directly inside the same process. Previously, the -cc1 invocation was
creating, and waiting for, a new process. This patch therefore reduces
the number of created processes during a build, thus it reduces build
times on platforms where process creation can be costly (Windows) and/or
impacted by a antivirus. It also makes debugging a bit easier, as
there's no need to attach to the secondary -cc1 process anymore,
breakpoints will be hit inside the same process.
Crashes or signaling inside the -cc1 invocation will have the same
side-effect as before, and will be reported through the same means.
This behavior can be controlled at compile-time through the
CLANG_SPAWN_CC1 cmake flag, which defaults to OFF. Setting it to ON will
revert to the previous behavior, where any -cc1 invocation will
create/fork a secondary process. At run-time, it is also possible to
tweak the CLANG_SPAWN_CC1 environment variable. Setting it and will
override the compile-time setting. A value of 0 calls -cc1 inside the
calling process; a value of 1 will create a secondary process, as
before.
Differential Revision: https://reviews.llvm.org/D69825
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/test/Driver/warning-options_pedantic.cpp
The file was modifiedclang/include/clang/Config/config.h.cmake
The file was modifiedclang/CMakeLists.txt
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/fsanitize-blacklist.c
The file was modifiedclang/include/clang/Driver/Driver.h
The file was modifiedclang/lib/Driver/Job.cpp
The file was modifiedclang/tools/driver/driver.cpp
The file was addedclang/test/Driver/cc1-spawnprocess.c
The file was modifiedclang/include/clang/Driver/Job.h
The file was modifiedclang/test/CMakeLists.txt
The file was modifiedclang/test/Driver/unknown-arg.c