Changes

Summary

  1. [X86] Check immediate before get it. (details)
  2. [ARM][NEON] Combine base address updates for vld1Ndup intrinsics (details)
  3. [clang] Implement P2266 Simpler implicit move (details)
  4. [ORC-RT] Fix a comment. (details)
  5. [JITLink][MachO] Add missing testcase. (details)
  6. [ORC-RT] Remove unused header in unit test. (details)
  7. VPlanSLP.cpp - tidy implicit header dependencies. NFCI. (details)
  8. ArgumentPromotion.cpp - remove unused <string> include. NFCI. (details)
  9. SValExplainer.h - get APSInt values by const reference instead of value. NFCI. (details)
  10. [InstCombine] fold ctlz/cttz of bool types (details)
  11. [clang][NFC] Add IsAnyDestructorNoReturn field to CXXRecord instead of calculating it on demand (details)
  12. [ARM] Introduce t2WhileLoopStartTP (details)
  13. LoopUnrollAndJamPass.cpp - remove unused <vector> include. NFCI. (details)
  14. GVN.cpp - remove unused <vector> include. NFCI. (details)
Commit 5be314f79ba7db0dcd6ea94b8dfcf7f03d8da89c by yuanke.luo
[X86] Check immediate before get it.

For CMP imm instruction, when the operand 1 is symbol address we should
check if it is immediate first. Here is the example code.
`CMP64mi32 $noreg, 8, killed renamable $rcx, @d, $noreg, @a, implicit-def
$eflags`
Many thanks to Craig, Topper for the test case to reproduce this issue.

Differential Revision: https://reviews.llvm.org/D104037
The file was addedllvm/test/CodeGen/X86/unfoldMemoryOperand.mir
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp (diff)
Commit f6b9836b09c78dc05abb6dfd4ad39345bc4d9f09 by kbessonova
[ARM][NEON] Combine base address updates for vld1Ndup intrinsics

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D103836
The file was modifiedllvm/lib/Target/ARM/ARMISelDAGToDAG.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/ARMInstrNEON.td (diff)
The file was modifiedllvm/test/CodeGen/ARM/arm-vlddup-update.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp (diff)
Commit bf20631782183cd19e0bb7219e908c2bbb01a75f by mizvekov
[clang] Implement P2266 Simpler implicit move

This Implements [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html|P2266 Simpler implicit move]].

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: Quuxplusone

Differential Revision: https://reviews.llvm.org/D99005
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp (diff)
The file was modifiedclang/test/CXX/drs/dr3xx.cpp (diff)
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp (diff)
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp (diff)
The file was modifiedclang/lib/Sema/SemaType.cpp (diff)
The file was modifiedclang/test/CXX/class/class.init/class.copy.elision/p3.cpp (diff)
The file was modifiedclang/test/SemaCXX/deduced-return-type-cxx14.cpp (diff)
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp (diff)
The file was modifiedclang/test/SemaCXX/coroutine-rvo.cpp (diff)
The file was modifiedclang/test/SemaCXX/constant-expression-cxx14.cpp (diff)
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp (diff)
The file was modifiedclang/lib/Sema/SemaStmt.cpp (diff)
The file was modifiedclang/test/SemaCXX/coroutines.cpp (diff)
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/test/SemaCXX/return-stack-addr.cpp (diff)
The file was modifiedclang/test/CXX/temp/temp.decls/temp.mem/p5.cpp (diff)
The file was modifiedclang/test/SemaCXX/warn-return-std-move.cpp (diff)
Commit e405db075b308094b831c99011d813e65cb6bf2c by Lang Hames
[ORC-RT] Fix a comment.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h (diff)
Commit fc3ca2cc083b58780b6b3aac9d0cfac9f3be8cc7 by Lang Hames
[JITLink][MachO] Add missing testcase.

This test was accidentally left out of f9649d123db.
The file was addedllvm/test/ExecutionEngine/JITLink/X86/MachO_cstring_section_splitting.s
Commit a7c3105adb55e506e63ad63ab2110341df1ab92b by Lang Hames
[ORC-RT] Remove unused header in unit test.
The file was modifiedcompiler-rt/lib/orc/unittests/wrapper_function_utils_test.cpp (diff)
The file was modifiedcompiler-rt/lib/orc/unittests/simple_packed_serialization_test.cpp (diff)
Commit b013c58e82c67574b137d33d275c7b9328446b70 by llvm-dev
VPlanSLP.cpp - tidy implicit header dependencies. NFCI.

We don't use std::string and std::vector, but we do use std::pair and std::max.
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanSLP.cpp (diff)
Commit 2477b498f2566d303d1b35c495f289512854ec00 by llvm-dev
ArgumentPromotion.cpp - remove unused <string> include. NFCI.
The file was modifiedllvm/lib/Transforms/IPO/ArgumentPromotion.cpp (diff)
Commit 7d7e913e096a915038dd41d0bfe5dd8827da1f60 by llvm-dev
SValExplainer.h - get APSInt values by const reference instead of value. NFCI.

Avoid unnecessary copies.
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h (diff)
Commit afd44bb6f29ca11b87b76349709fdee2ecd9d921 by spatel
[InstCombine] fold ctlz/cttz of bool types

https://alive2.llvm.org/ce/z/tX4pUT
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/intrinsics.ll (diff)
Commit 7ff3a89a7b94193638cb13f8a0a1ef70094c8263 by markus.boeck02
[clang][NFC] Add IsAnyDestructorNoReturn field to CXXRecord instead of calculating it on demand

This patch addresses a performance issue I noticed when using clang-12 to compile projects of mine. Even though the files weren't too large (around 1k cpp), the compiler was taking more than a minute to compile the source file, much longer than either GCC or MSVC.

Using a profiler it turned out the issue was the isAnyDestructorNoReturn function in CXXRecordDecl. In particular it being recursive, recalculating the property for every invocation, for every field and base class. This showed up in tracebacks in the profiler.

This patch instead adds IsAnyDestructorNoReturn as a Field to the data inside of CXXRecord and updates when a new base class, destructor, or record field member is added.

After this patch the problematic file of mine went from a compile time of 81s, down to 12s.

The patch itself should not change any functionality, just improve performance.

Differential Revision: https://reviews.llvm.org/D104182
The file was modifiedclang/lib/AST/DeclCXX.cpp (diff)
The file was modifiedclang/include/clang/AST/CXXRecordDeclDefinitionBits.def (diff)
The file was modifiedclang/include/clang/AST/DeclCXX.h (diff)
Commit bee2f618d599201aa0c91d0322f058cc697e0779 by david.green
[ARM] Introduce t2WhileLoopStartTP

This adds t2WhileLoopStartTP, similar to the t2DoLoopStartTP added in
D90591. It keeps a reference to both the tripcount register and the
element count register, so that the ARMLowOverheadLoops pass in the
backend can pick the correct one without having to search for it from
the operand of a VCTP.

Differential Revision: https://reviews.llvm.org/D103236
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/wls-search-pred.mir (diff)
The file was modifiedllvm/lib/Target/ARM/ARMBlockPlacement.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/memcall.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td (diff)
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/MVETailPredUtils.h (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-memtp-loop.ll (diff)
The file was modifiedllvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll (diff)
Commit c14fd171fe77a829347e5fd7650632b3e6dd857c by llvm-dev
LoopUnrollAndJamPass.cpp - remove unused <vector> include. NFCI.
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp (diff)
Commit 56541d13779047d353f6665d33f58456f7943e6e by llvm-dev
GVN.cpp - remove unused <vector> include. NFCI.
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp (diff)