SuccessChanges

Summary

  1. Re-land "Add an -fno-temp-file flag for compilation" (details)
  2. [Instcombine] Add select canonicalization tests. NFC (details)
  3. [InstCombine] Canonicalize select immediates (details)
  4. [Dsymutil][Debuginfo][NFC] Refactor dsymutil to separate DWARF (details)
  5. [gn build] Port abc7f6800df (details)
  6. [DebugInfo] Fix verbose printing of rows added via DW_LNE_end_sequence (details)
  7. [AArch64][SVE] Add permutation and selection intrinsics (details)
  8. [ConstantHoisting] Ignore unreachable bb:s when collecting candidates (details)
Commit dde7b6bcda9d8cf874fd77b98d0d62d6aeaed049 by hans
Re-land "Add an -fno-temp-file flag for compilation"
This time making sure to initialize FrontendOptions::UseTemporary.
Patch by Zachary Henkel!
Differential revision: https://reviews.llvm.org/D70615
The file was modifiedclang/lib/Frontend/FrontendActions.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Frontend/FrontendOptions.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
Commit d38153325f3d23b81be9c9916afc3a45270094aa by david.green
[Instcombine] Add select canonicalization tests. NFC
The file was addedllvm/test/Transforms/InstCombine/select-imm-canon.ll
Commit a59cc5e128f09ec5048c142cafaadea279406eba by david.green
[InstCombine] Canonicalize select immediates
In certain situations after inlining and simplification we end up with
code that is _almost_ a min/max pattern, but contains constants that
have been demand-bit optimised to the wrong values, ending up with code
like:
%1 = icmp slt i32 %shr, -128
%2 = select i1 %1, i32 128, i32 %shr
%.inv = icmp sgt i32 %shr, 127
%spec.select.i = select i1 %.inv, i32 127, i32 %2
%conv7 = trunc i32 %spec.select.i to i8 This should be turned into a
min/max pattern, but the -128 in the first select was instead
transformed into 128, as only the bottom byte was ever demanded.
To fix this, I've put in further canonicalisation for the immediates of
selects, preferring to use the same value as the icmp if available.
Differential Revision: https://reviews.llvm.org/D71516
The file was modifiedllvm/test/Transforms/InstCombine/select-imm-canon.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Commit abc7f6800df8a1f40e1e2c9ccce826abb0208284 by a.v.lapshin
[Dsymutil][Debuginfo][NFC] Refactor dsymutil to separate DWARF
optimizing part 2.
That patch is extracted from the D70709. It moves CompileUnit,
DeclContext into llvm/DebugInfo/DWARF. It also adds new file
DWARFOptimizer with AddressesMap class. AddressesMap generalizes
functionality from RelocationManager.
Differential Revision: https://reviews.llvm.org/D71271
The file was modifiedllvm/lib/DebugInfo/DWARF/CMakeLists.txt
The file was addedllvm/lib/DebugInfo/DWARF/DWARFOptimizer.cpp
The file was modifiedllvm/tools/dsymutil/DwarfLinker.h
The file was addedllvm/include/llvm/DebugInfo/DWARF/DWARFOptCompileUnit.h
The file was modifiedllvm/tools/dsymutil/DwarfStreamer.cpp
The file was removedllvm/tools/dsymutil/DeclContext.cpp
The file was addedllvm/lib/DebugInfo/DWARF/DWARFOptDeclContext.cpp
The file was removedllvm/tools/dsymutil/DeclContext.h
The file was modifiedllvm/tools/dsymutil/DwarfStreamer.h
The file was removedllvm/tools/dsymutil/CompileUnit.cpp
The file was modifiedllvm/tools/dsymutil/DwarfLinker.cpp
The file was addedllvm/include/llvm/DebugInfo/DWARF/DWARFOptDeclContext.h
The file was addedllvm/lib/DebugInfo/DWARF/DWARFOptCompileUnit.cpp
The file was addedllvm/include/llvm/DebugInfo/DWARF/DWARFOptimizer.h
The file was modifiedllvm/lib/DebugInfo/DWARF/LLVMBuild.txt
The file was removedllvm/tools/dsymutil/CompileUnit.h
The file was modifiedllvm/tools/dsymutil/CMakeLists.txt
Commit b94aeabfae1b1e062152e1b0ae4df3623f784fe2 by llvmgnsyncbot
[gn build] Port abc7f6800df
The file was modifiedllvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
Commit 60cb33c9b8543dee1630410c13679088d0569d03 by james.henderson
[DebugInfo] Fix verbose printing of rows added via DW_LNE_end_sequence
The debug line verbose printing was printing the wrong values for rows
added via DW_LNE_end_sequence, because the row was being printed AFTER
its state had been reset following it being appended to the line table.
This patch fixes this issue by printing the row before appending it.
Reviewers: dblaikie, MaskRay
Differential Revision: https://reviews.llvm.org/D71664
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/debug-line-dw-lne-end-sequence.s
Commit 23c28c40436143006be740533375c036d11c92cd by cullen.rhodes
[AArch64][SVE] Add permutation and selection intrinsics
Summary: Adds the following intrinsics:
    * @llvm.aarch64.sve.clasta
   * @llvm.aarch64.sve.clasta_n
   * @llvm.aarch64.sve.clastb
   * @llvm.aarch64.sve.clastb_n
   * @llvm.aarch64.sve.compact
   * @llvm.aarch64.sve.ext
   * @llvm.aarch64.sve.lasta
   * @llvm.aarch64.sve.lastb
   * @llvm.aarch64.sve.rev
   * @llvm.aarch64.sve.splice
   * @llvm.aarch64.sve.tbl
   * @llvm.aarch64.sve.trn1
   * @llvm.aarch64.sve.trn2
   * @llvm.aarch64.sve.uzp1
   * @llvm.aarch64.sve.uzp2
   * @llvm.aarch64.sve.zip1
   * @llvm.aarch64.sve.zip2
Reviewers: sdesmalen, efriedma, dancgr, mgudim, huntergr, rengolin
Reviewed By: sdesmalen, efriedma
Subscribers: kmclaughlin, tschuett, kristof.beyls, hiraditya, rkruppe,
psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71401
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
Commit 89e3bb4502631543e648cd387405004850871af0 by bjorn.a.pettersson
[ConstantHoisting] Ignore unreachable bb:s when collecting candidates
Summary: Ignore looking at blocks that are unreachable from entry when
collecting candidates for hosting.
Normally the consthoist pass is executed in the llc pipeline, just after
unreachableblockelim. So it is abnormal to have code that is unreachable
from the entry block. But when running the pass as part of opt, for
example as part of fuzzy testing, we might trigger various kinds of
asserts when collecting candidates if we include unreachable blocks in
that analysis.
It seems like a waste of time to hoist constants in unreachble blocks,
so the solution is to simply ignore such blocks when collecting the
hoisting candidates.
The two added test cases used to end up in two different asserts, and
the intention with the checks is just to verify that we no longer fail.
Fixes: PR43903
Reviewers: spatel
Reviewed By: spatel
Subscribers: hiraditya, uabelho, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71678
The file was addedllvm/test/Transforms/ConstantHoisting/AArch64/consthoist-unreachable.ll
The file was addedllvm/test/Transforms/ConstantHoisting/X86/pr43903-not-all-uses-rebased.ll
The file was modifiedllvm/lib/Transforms/Scalar/ConstantHoisting.cpp