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


  1. [InstCombine] Let combineLoadToNewType preserve ABI alignment of the (details)
  2. [AIX][XCOFF] Supporting the ReadOnlyWithRel SectionKnd (details)
  3. SCC: Allow ReplaceNode to safely support insertion (details)
  4. [X86] Directly emit a BROADCAST_LOAD from constant pool in (details)
  5. [ThinLTO] Handle variable with twice promoted name (Rust) (details)
  6. [ELF] Delete the RelExpr member R_HINT. NFC (details)
  7. [ThinLTO/WPD] Remove an overly-aggressive assert (details)
  8. [RISCV] Allow shrink wrapping for RISC-V (details)
  9. Added readability-qualified-auto check (details)
  10. [gn build] Port 36fcbb838c8 (details)
  11. [lldb/test] test_breakpoints_func_full from (details)
  12. [MachineScheduler] Reduce reordering due to mem op clustering (details)
  13. [InstCombine] add test for possible cast-of-select transform; NFC (details)
  14. Fix NetBSD bot after b4a99a061f517e60985667e39519f60186cbb469 (details)
  15. [nfc][libomptarget] Refactor amdgcn target_impl (details)
  16. [nfc][libomptarget] Refactor nvptx/ (details)
  17. [InstCombine] Add test for iterator invalidation bug; NFC (details)
  18. [InstCombine] Fix user iterator invalidation in bitcast of phi transform (details)
  19. [InstCombine] Make combineLoadToNewType a method; NFC (details)
  20. [InstCombine] Fix infinite loop due to bitcast <-> phi transforms (details)
Commit 3e32b7e12701de772b1cdf855b42253650a1e997 by aqjune
[InstCombine] Let combineLoadToNewType preserve ABI alignment of the
load (PR44543)
Summary: If aligment on `LoadInst` isn't specified, load is assumed to
be ABI-aligned. And said aligment may be different for different types.
So if we change load type, but don't pay extra attention to the aligment
(i.e. keep it unspecified), we may either overpromise (if the default
aligment of the new type is higher), or underpromise (if the default
aligment of the new type is smaller).
Thus, if no alignment is specified, we need to manually preserve the
implied ABI alignment.
This addresses by making
combineLoadToNewType preserve ABI alignment of the load.
Reviewers: spatel, lebedev.ri
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
The file was modifiedllvm/test/Transforms/InstCombine/load-bitcast64.ll
Commit eb23cc136b68b24e63dd765b87d1facecd622695 by diggerlin
[AIX][XCOFF] Supporting the ReadOnlyWithRel SectionKnd
SUMMARY: In this patch we put the global variable in a Csect which's
SectionKind is "ReadOnlyWithRel" into Data Section.
Reviewers: hubert.reinterpretcast,jasonliu,Xiangling_L Subscribers:
wuzish, nemanjai, hiraditya
Differential Revision:
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was addedllvm/test/CodeGen/PowerPC/aix-readonly-with-relocation.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit f7e9f4f4c50245d10ca9869a9f8f3d431dfb6948 by warren_ristow
SCC: Allow ReplaceNode to safely support insertion
If scc_iterator::ReplaceNode is inserting a new entry in the map, rather
than replacing an existing entry, the possibility of growing the map
could cause a failure.  This change safely implements the insertion.
Reviewed By: probinson
Differential Revision:
The file was modifiedllvm/include/llvm/ADT/SCCIterator.h
Commit 98c54fb1feba081c509f7e389877550df130a80d by craig.topper
[X86] Directly emit a BROADCAST_LOAD from constant pool in
lowerUINT_TO_FP_vXi32 to avoid double loads seen in D71971
By directly emitting the constants as a constant pool load we seem to
avoid the build_vector/extract_subvector combines that resulted in the
duplicate loads we had before.
Differential Revision:
The file was modifiedllvm/test/CodeGen/X86/vec_int_to_fp.ll
The file was modifiedllvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vec-strict-inttofp-256.ll
Commit 7dc4bbf8ab311606388faacca58b6c3e3e508b77 by tejohnson
[ThinLTO] Handle variable with twice promoted name (Rust)
Summary: Ensure that we can internalize values produced from two rounds
of promotion.
Note that this cannot happen currently via clang, but in other use cases
such as the Rust compiler which does a first round of ThinLTO on library
code, producing bitcode, and a second round on the final binary.
In particular this can happen if a function is exported and promoted,
ending up with a ".llvm.${hash}" suffix, and then goes through a round
of optimization creating an internal switch table expansion variable
that is internal and contains the promoted name of the enclosing
function. This variable will be promoted in the second round of ThinLTO
if @foo is imported again, and therefore ends up with two
".llvm.${hash}" suffixes. Only the final one should be stripped when
consulting the index to locate the summary.
Reviewers: wmi
Subscribers: mehdi_amini, inglorion, hiraditya, JDevlieghere, steven_wu,
dexonsmith, arphaman, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/include/llvm/IR/ModuleSummaryIndex.h
The file was addedllvm/test/ThinLTO/X86/Inputs/thinlto-internalize-doublepromoted.ll
The file was addedllvm/test/ThinLTO/X86/thinlto-internalize-doublepromoted.ll
Commit bec1b55c64cf33d5f33c8cb7cc10d02e25811bef by maskray
[ELF] Delete the RelExpr member R_HINT. NFC
R_HINT is ignored like R_NONE. There are no strong reasons to keep
R_HINT. The largest RelExpr member R_RISCV_PC_INDIRECT is 60 now.
Differential Revision:
The file was modifiedlld/ELF/Arch/ARM.cpp
The file was modifiedlld/ELF/Relocations.h
The file was modifiedlld/ELF/Relocations.cpp
Commit 2cefb93951cca01dcdde6fe5c7354dc8bcd796d6 by tejohnson
[ThinLTO/WPD] Remove an overly-aggressive assert
Summary: An assert added to the index-based WPD was trying to verify
that we only have multiple vtables for a given guid when they are all
non-external linkage. This is too conservative because we may have
multiple external vtable with the same guid when they are in comdat.
Remove the assert, as we don't have comdat information in the index, the
linker should issue an error in this case.
See discussion on D71040 for more information.
Reviewers: evgeny777, aganea
Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith,
Tags: #llvm
Differential Revision:
The file was addedllvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
The file was addedllvm/test/ThinLTO/X86/Inputs/devirt_external_comdat_same_guid.ll
Commit cd800f3b226b25142f233beca846715fc601809b by lewis-revill
[RISCV] Allow shrink wrapping for RISC-V
Enabling shrink wrapping requires ensuring the insertion point of the
epilogue is correct for MBBs without a terminator, in which case the
instruction to adjust the stack pointer is the last instruction in the
Differential Revision:
The file was addedllvm/test/CodeGen/RISCV/shrinkwrap.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Commit 36fcbb838c8f293f46bfed78c6ed8c177f1e3485 by aaron
Added readability-qualified-auto check
Adds a check that detects any auto variables that are deduced to a
pointer or a const pointer then adds in the const and asterisk
according. Will also check auto L value references that could be written
as const. This relates to the coding standard
The file was addedclang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto.cpp
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was addedclang-tools-extra/docs/clang-tidy/checks/llvm-qualified-auto.rst
The file was addedclang-tools-extra/test/clang-tidy/checkers/readability-qualified-auto-cxx20.cpp
The file was addedclang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst
The file was modifiedclang-tools-extra/clang-tidy/readability/CMakeLists.txt
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was addedclang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
The file was modifiedclang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
Commit 527f5a471eac75fd7d6ed48bd1e242ef8ea98dd0 by llvmgnsyncbot
[gn build] Port 36fcbb838c8
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/
Commit ab72db7fc85266f094cc6b9452dd01f175c04cab by stilis
[lldb/test] test_breakpoints_func_full from
TestNamespace.NamespaceBreakpointTestCase is now passing on Windows
After, the test is now passing on
The file was modifiedlldb/packages/Python/lldbsuite/test/lang/cpp/namespace/
Commit b777e551f044bbc7245a0b535e46000469479ff6 by jay.foad
[MachineScheduler] Reduce reordering due to mem op clustering
Summary: Mem op clustering adds a weak edge in the DAG between two loads
or stores that should be clustered, but the direction of this edge is
pretty arbitrary (it depends on the sort order of MemOpInfo, which
represents the operands of a load or store). This often means that two
loads or stores will get reordered even if they would naturally have
been scheduled together anyway, which leads to test case churn and goes
against the scheduler's "do no harm" philosophy.
The fix makes sure that the direction of the edge always matches the
original code order of the instructions.
Reviewers: atrick, MatzeB, arsenm, rampitec, t.p.northover
Subscribers: jvesely, wdng, nhaehnle, kristof.beyls, hiraditya,
javed.absar, arphaman, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/lib/CodeGen/MachineScheduler.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/frame-index-elimination.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/shift-i128.ll
The file was modifiedllvm/test/CodeGen/AArch64/global-merge-group-by-use.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/kernel-argument-dag-lowering.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-scheduler.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/kernel-args.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert-subvector-unused-scratch.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-stp-cluster.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/bitcast-constant-to-vector.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-ldp-cluster.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/byval-frame-setup.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-descriptor-waterfall-loop-idom-update.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-memset-inline.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/max.i16.ll
The file was modifiedllvm/test/CodeGen/AArch64/expand-select.ll
Commit 57cb4685140284907d16673b555fd62307b4cd76 by spatel
[InstCombine] add test for possible cast-of-select transform; NFC
The file was modifiedllvm/test/Transforms/InstCombine/trunc.ll
Commit 88b8cb7215d4333ab990c99f21c7f92262ef02ef by alexandre.ganea
Fix NetBSD bot after b4a99a061f517e60985667e39519f60186cbb469
([Clang][Driver] Re-use the calling process instead of creating a new
process for the cc1 invocation)
The file was modifiedclang/test/Driver/cc1-spawnprocess.c
Commit 2d287bec3c5b63b7df9946163ba02987858b1736 by jonathanchesterfield
[nfc][libomptarget] Refactor amdgcn target_impl
[nfc][libomptarget] Refactor amdgcn target_impl
Removes references to internal libraries from the header Standardises on
C++ mangling for all the target_impl functions Update comment block
clang-format Move some functions into a new target_impl.hip source file
This lays the groundwork for implementing the remaining unresolved
symbols in the target_impl.hip source.
Reviewers: jdoerfert, grokos, ABataev, ronlieb
Reviewed By: jdoerfert
Subscribers: jvesely, mgorny, jfb, openmp-commits
Tags: #openmp
Differential Revision:
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was addedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
Commit 2a43688a0a074a70e395491fa0c3cdb4556ccea4 by jonathanchesterfield
[nfc][libomptarget] Refactor nvptx/
[nfc][libomptarget] Refactor nxptx/
Use __kmpc_impl_atomic_add instead of atomicAdd to match the rest of the
file. Alternatively, could use the cuda functions
directly. Using a mixture in this file was an oversight, happy to
resolve in either direction.
Removed some comments that look outdated.
Call __kmpc_impl_unset_lock directly to avoid a redundant diagnostic and
remove an implict dependency on interface.h.
Reviewers: ABataev, grokos, jdoerfert
Reviewed By: jdoerfert
Subscribers: jfb, openmp-commits
Tags: #openmp
Differential Revision:
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/
Commit fa632340938cc02e03262e1318cb06b34c32f5fe by nikita.ppv
[InstCombine] Add test for iterator invalidation bug; NFC
The file was addedllvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll
Commit 652cd7c1007aa5a13ad9864fadc939c5710c5199 by nikita.ppv
[InstCombine] Fix user iterator invalidation in bitcast of phi transform
This fixes the issue encountered in D71164. Instead of using a
range-based for, manually iterate over the users and advance the
iterator beforehand, so we do not skip any users due to iterator
Differential Revision:
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll
Commit b4dd928ffbb8232d6909b640d3affcd531681ffb by nikita.ppv
[InstCombine] Make combineLoadToNewType a method; NFC
So it can be reused as part of other combines. In particular for D71164.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Commit 65c0805be523445d7ad0f12e90f53648e1ae9f84 by nikita.ppv
[InstCombine] Fix infinite loop due to bitcast <-> phi transforms
Fix for
The optimizeBitCastFromPhi() and FoldPHIArgOpIntoPHI() end up fighting
against each other, because optimizeBitCastFromPhi() assumes that
bitcasts of loads will get folded. This doesn't happen here, because a
dangling phi node prevents the one-use fold in
from triggering.
This patch fixes the issue by explicitly performing the load combine as
part of the bitcast of phi transform. Other attempts to force the load
to be combined first were ultimately too unreliable.
Differential Revision:
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was addedllvm/test/Transforms/InstCombine/pr44245.ll