Changes

Summary

  1. [lld-macho] Parse relocations quickly by assuming sorted order (details)
  2. [RISCV] Pass FeatureBitset by reference rather than by value. NFCI (details)
  3. [mlir] Add LogOp lowering from Complex dialect to Standard/Math dialect. (details)
  4. [lld-macho][nfc] Add REQUIRES: x86 to test (details)
  5. [docs] Fix linking issues in LibASTMatchers tutorial (details)
  6. [AMDGPU] Stop mulhi from doing 24 bit mul for uniform values (details)
  7. [DebugInfo] CGP+HWasan: Handle dbg.values with duplicate location ops (details)
  8. [mlir] Escape strings of opaque attributes (details)
  9. [AArch64] Cost-model i8 vector loads/stores (details)
  10. [DAGCombiner] Pre-commit test to demonstrate mulhi const folding (details)
  11. Add MulOp lowering from Complex dialect to Standard/Math dialect. (details)
  12. [DAGCombiner] Add support for mulhi const folding in DAGCombiner (details)
  13. [AArch64][SVE] Improve fixed length codegen for common vector shuffle case (details)
  14. [C++][Sema] Ignore top-level qualifiers in casts (details)
  15. [SLPVectorizer] Fix crash in vectorizeChainsInBlock for scalable vector. (details)
  16. [clangd] NFC: Remove outdated comment (details)
  17. [InstSimplify] fold extractelement of splat with variable extract index (details)
  18. [CostModel][X86] Adjust i32/i64 to f32/f64 scalar based on llvm-mca reports (+ Agner). (details)
  19. [CostModel][X86] Handle costs for insert/extractelement with non-immediate indices via stack (details)
  20. [libc++] NFC: Sort headers in CMakeLists.txt (details)
  21. [X86] Twist shuffle mask when fold HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y)) (details)
  22. [AArch64][CostModel] Add cost model for experimental.vector.splice (details)
  23. [InstCombine][tests] add tests for signed icmp with constant and offset; NFC (details)
  24. [InstCombine] fold icmp slt/sgt of offset value with constant (details)
  25. [libc++] NFC: Add note about how the libcxx website gets updated (details)
  26. [mlir] Change custom syntax of emitc.include op to resemble C (details)
  27. [LV] Add initial test cases with small clamped indices. (details)
  28. [LV] Extend FIXME in test add in 91ee1e379901af3. (details)
  29. [MCParser][z/OS] Mark a few tests as unsupported for the z/OS Target (details)
  30. [mlir] Unbreak building mlir-reduce (details)
  31. Fix typo in help text for -aarch64-enable-branch-targets. (details)
  32. [AArch64ISelDAGToDAG] Fix ORRWrs/ORRXrs usefulbits calculation bug (details)
  33. Precommit another test for https://reviews.llvm.org/D104953 (details)
  34. [MLIR] Fix memref get constant bound size and shape method (details)
  35. [llvm-strings] Switch command line parsing from llvm::cl to OptTable (details)
  36. [M68k][GloballSel] Lower outgoing return values in IRTranslator (details)
  37. [gn build] (manually) port 98f078324fc5 (llvm-strings Opts.td) (details)
  38. [libc++] NFC: Sort header lists in test scripts (details)
  39. [ObjC][ARC] Prevent moving objc_retain calls past objc_release calls (details)
  40. [profile][test] Improve coverage-linkage.cpp (details)
  41. [ARM] Fix arm.mve.pred.v2i range upper limit (details)
  42. [AIX] Add _AIX73 version macro (details)
  43. [Bazel] Fix build for 35d4593e6b555f852088211f5561c0e360c98c91 (details)
  44. [Bazel] Fix build for 98f078324fc51da460660920f4a1aa308bfc3547 (details)
  45. [clang] Add -fdump-record-layouts-canonical option (details)
  46. [compiler-rt][iwyu] explicitly includes `<new>` in xray_utils.cpp (details)
  47. [clang] unbreak Index/preamble-reparse-changed-module.m with LLVM_APPEND_VC_REV=NO after 9964b0e (details)
  48. [lld-macho] Only emit one BIND_OPCODE_SET_SYMBOL per symbol (details)
  49. [lld/mac] Implement -umbrella (details)
  50. [lld/mac] Implement -final_output (details)
  51. [clang] fixes named return of variables with dependent alignment (details)
  52. [PowerPC] Implament Load and Reserve and Store Conditional Builtins (details)
  53. [PowerPC] Removed a test case meant for a later patch (details)
  54. [lld/mac] Implement -arch_multiple (details)
Commit bcaf57cae82500f40f2348f5ee41e57b11152825 by jezng
[lld-macho] Parse relocations quickly by assuming sorted order

clang and gcc both seem to emit relocations in reverse order of
address. That means we can match relocations to their containing
subsections in `O(relocs + subsections)` rather than the `O(relocs *
log(subsections))` that our previous binary search implementation
required.

Unfortunately, `ld -r` can still emit unsorted relocations, so we have a
fallback code path for that (less common) case.

Numbers for linking chromium_framework on my 3.2 GHz 16-Core Intel Xeon W:

      N           Min           Max        Median           Avg        Stddev
  x  20          4.04          4.11         4.075        4.0775   0.018027756
  +  20          3.95          4.02          3.98         3.985   0.020900768
  Difference at 95.0% confidence
          -0.0925 +/- 0.0124919
          -2.26855% +/- 0.306361%
          (Student's t, pooled s = 0.0195172)

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D105410
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was addedlld/test/MachO/unsorted-relocations.yaml
Commit 21a1bcbd4df8c443ab7c0168784789b5b74a7d5c by craig.topper
[RISCV] Pass FeatureBitset by reference rather than by value. NFCI

FeatureBitset is 4 64-bit values in an array. It's better passed by
reference rather than copying it.

I may be adding FeatureBitset as an argument to another function
and noticed this while working on that.
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
Commit 380fa71fb00998332ee5dd97f82aaf3eadd282ac by akuegel
[mlir] Add LogOp lowering from Complex dialect to Standard/Math dialect.

Differential Revision: https://reviews.llvm.org/D105342
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
Commit 4aaf87875039ee27ba7bec9f534241a9a3b1c213 by jezng
[lld-macho][nfc] Add REQUIRES: x86 to test

I didn't realize that llvm-objdump's features were arch-specific.

This should fix the non-x86 buildbots.
The file was modifiedlld/test/MachO/unsorted-relocations.yaml
Commit 3697f2683695a5e67184c4b348415f4da028133c by jubnzv
[docs] Fix linking issues in LibASTMatchers tutorial

Update CMakeLists.txt in the tutorial to reflect the latest changes in
LLVM. The demo project cannot be linked without added libraries.

Reviewed By: xgupta

Differential Revision: https://reviews.llvm.org/D105409
The file was modifiedclang/docs/LibASTMatchersTutorial.rst
Commit b8173c317812a51354e2874ee6dd5c3150d98ac8 by david.stuttard
[AMDGPU] Stop mulhi from doing 24 bit mul for uniform values

Added support to check if architecture supports s_mulhi which is used as part of
the decision whether or not to use valu 24 bit mul (if the mulhi gets
transformed to a valu op anyway, then may as well use it).

This is an extension of the work in D97063

Differential Revision: https://reviews.llvm.org/D103321

Change-Id: I80b1323de640a52623d69ac005a97d06a5d42a14
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was modifiedllvm/test/CodeGen/AMDGPU/mul_uint24-amdgcn.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul_int24.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Commit 14b62f7e2f07db548779fc17550a5265ef374413 by stephen.tozer
[DebugInfo] CGP+HWasan: Handle dbg.values with duplicate location ops

This patch fixes an issue which occurred in CodeGenPrepare and
HWAddressSanitizer, which both at some point create a map of Old->New
instructions and update dbg.value uses of these. They did this by
iterating over the dbg.value's location operands, and if an instance of
the old instruction was found, replaceVariableLocationOp would be
called on that dbg.value. This would cause an error if the same operand
appeared multiple times as a location operand, as the first call to
replaceVariableLocationOp would update all uses of the old instruction,
invalidating the old iterator and eventually hitting an assertion.

This has been fixed by no longer iterating over the dbg.value's location
operands directly, but by first collecting them into a set and then
iterating over that, ensuring that we never attempt to replace a
duplicated operand multiple times.

Differential Revision: https://reviews.llvm.org/D105129
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/Instrumentation/HWAddressSanitizer/alloca.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was modifiedllvm/test/DebugInfo/X86/codegenprep-addrsink.ll
Commit a96911c49bff75b22e980b87ac7375c62f671d15 by markus.boeck02
[mlir] Escape strings of opaque attributes

Opaque attributes that currently contain string literals can't currently be properly roundtripped as they are not printed as escaped strings. This leads to incorrect tokens being generated and the parser to almost certainly fail. This patch simply uses llvm::printEscapedString from LLVM. It escapes all non printable characters and quotes to \xx hex literals, and backslashes to two backslashes. This syntax is supported by MLIRs Lexer as well. The same function is also currently in use for the same purpose in printSymbolReference, printAttribute for StringAttr and many more in AsmPrinter.cpp.

Differential Revision: https://reviews.llvm.org/D105405
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/test/IR/parser.mlir
Commit ee752134ace3418ed088c86aa62111667eba6776 by sjoerd.meijer
[AArch64] Cost-model i8 vector loads/stores

Loads of <4 x i8> vectors were modeled as extremely expensive. And while we
don't have a load instruction that supports this, it isn't that expensive to
create a vector of i8 elements. The codegen for this was fixed/optimised in
D105110. This now tweaks the cost model and enables SLP vectorisation of my
motivating case loadi8.ll.

Differential Revision: https://reviews.llvm.org/D103629
The file was modifiedllvm/test/Analysis/CostModel/AArch64/mem-op-cost-model.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/gather-root.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/extend-vectorization-factor-for-unprofitable-memops.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/loadi8.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/interleaved-vs-scalar.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/store.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/cast.ll
Commit 4b125b23ba9562ca013caf85ab23d1630417b3e2 by david.stuttard
[DAGCombiner] Pre-commit test to demonstrate mulhi const folding

D103323 will fold this

Differential Revision: https://reviews.llvm.org/D105424

Change-Id: I64947215eb531fbd70b52a72203b39e43fefafcc
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv.ll
Commit bf17ee1950ef7df95e160c4869de8398bc2b67d2 by akuegel
Add MulOp lowering from Complex dialect to Standard/Math dialect.

The lowering handles special cases with NaN or infinity like C++.

Differential Revision: https://reviews.llvm.org/D105270
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
Commit 83cb9632a13d97753181e8b3e417b7836b414e26 by david.stuttard
[DAGCombiner] Add support for mulhi const folding in DAGCombiner

Differential Revision: https://reviews.llvm.org/D103323

Change-Id: I4ffaaa32301795ba8a339567a68e77fe0862b869
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/pmulh.ll
Commit cc273983f705ebfbbe42d6327a626ce87c494c96 by bradley.smith
[AArch64][SVE] Improve fixed length codegen for common vector shuffle case

Improve codegen when lowering the common vector shuffle case from the
vectorizer (op1[last]:op2[0:last-1]). This patch only handles this
common case as it is difficult to handle this more generally when using
fixed length vectors, due to being unable to use the SVE ext instruction.

Differential Revision: https://reviews.llvm.org/D105289
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was addedllvm/test/CodeGen/AArch64/sve-fixed-length-vector-shuffle.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 85255a04e5729c03214c51177aa885c055f3e242 by olemarius.strohm
[C++][Sema] Ignore top-level qualifiers in casts

Ignore top-level qualifiers in casts, which fixes issues in reinterpret_cast.

This rule comes from [expr.type]/8.2.2 which explains that casting to a
pr-qualified type should actually cast to the unqualified type. In C++
this is only done for types that aren't classes or arrays.

Fixes: PR49221

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D102689
The file was modifiedclang/test/SemaOpenCLCXX/reinterpret-cast.clcpp
The file was modifiedclang/test/SemaCXX/reinterpret-cast.cpp
The file was modifiedclang/test/CodeGenOpenCLCXX/reinterpret_cast.clcpp
The file was modifiedclang/test/SemaOpenCLCXX/addrspace_cast.clcpp
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/test/SemaCXX/warn-reinterpret-base-class.cpp
Commit b868a2d2c69c20ba0f906354986354b84540e6c0 by caroline.concatto
[SLPVectorizer] Fix crash in vectorizeChainsInBlock for scalable vector.

The function vectorizeChainsInBlock does not support scalable vector,
because function like canReuseExtract and isCommutative in the code
path assert with scalable vectors.

This patch avoids vectorizing blocks that have extract instructions with scalable
vector..

Differential Revision: https://reviews.llvm.org/D104809
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/scalable-vector.ll
Commit de8274a1b912687ca7b182ce28b34b0e66b2b0e3 by kbobyrev
[clangd] NFC: Remove outdated comment
The file was modifiedclang-tools-extra/clangd/index/dex/Dex.h
Commit 3d3c0ed9323ba387dd6030337c672d2c9c4816f0 by spatel
[InstSimplify] fold extractelement of splat with variable extract index

We already have a fold for variable index with constant vector,
but if we can determine a scalar splat value, then it does not
matter whether that value is constant or not.

We overlooked this fold in D102404 and earlier patches,
but the fixed vector variant is shown in:
https://llvm.org/PR50817

Alive2 agrees on that:
https://alive2.llvm.org/ce/z/HpijPC

The same logic applies to scalable vectors.

Differential Revision: https://reviews.llvm.org/D104867
The file was modifiedllvm/test/Transforms/InstSimplify/vscale.ll
The file was modifiedllvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstSimplify/extract-element.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 65e4240fa10848d3b201429ab5a1bfb2eb02c7ad by llvm-dev
[CostModel][X86] Adjust i32/i64 to f32/f64 scalar based on llvm-mca reports (+ Agner).

Older SSE targets have slower gpr->fpu scalar conversions - we also need to account for uitofp i32 > f32/f64 being lowered as sitofp i64 -> f32/f64
The file was modifiedllvm/test/Analysis/CostModel/X86/uitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/sitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/uitofp.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit 5db826e4ce63a4d45a4695e5486841d08b86cd24 by llvm-dev
[CostModel][X86] Handle costs for insert/extractelement with non-immediate indices via stack

Determine the insert/extractelement costs when performing this as a sequence of aliased loads+stores via the stack.
The file was modifiedllvm/test/Analysis/CostModel/X86/insert-extract-at-zero.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-extract.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-insert.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/X86/insert-extract-at-zero-inseltpoison.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-insert-inseltpoison.ll
Commit 681aa574c088525c80396ae46b66ab463a9dba99 by Louis Dionne
[libc++] NFC: Sort headers in CMakeLists.txt
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/include/CMakeLists.txt
Commit 9ab99f773fec7da4183495a3fdc655a797d3bea2 by pengfei.wang
[X86] Twist shuffle mask when fold HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y))

This patch fixes PR50823.

The shuffle mask should be twisted twice before gotten the correct one due to the difference between inner HOP and outer.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D104903
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was addedllvm/test/CodeGen/X86/pr50823.ll
The file was modifiedllvm/test/CodeGen/X86/haddsub-undef.ll
The file was modifiedllvm/test/CodeGen/X86/packss.ll
Commit a2c5c56055767c81f991c419420de89e8387c79e by caroline.concatto
[AArch64][CostModel] Add cost model for experimental.vector.splice

This patch adds a new  ShuffleKind SK_Splice and then handle the cost in
getShuffleCost, as in experimental.vector.reverse.

Differential Revision: https://reviews.llvm.org/D104630
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was addedllvm/test/Analysis/CostModel/AArch64/splice.ll
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 32dd914f7182875730eb3453f39dcc584b7219b2 by spatel
[InstCombine][tests] add tests for signed icmp with constant and offset; NFC
The file was modifiedllvm/test/Transforms/InstCombine/icmp-add.ll
Commit 40b752d28d95158e52dba7cfeea92e41b7ccff9a by spatel
[InstCombine] fold icmp slt/sgt of offset value with constant

This follows up patches for the unsigned siblings:
0c400e895306
c7b658aeb526

We are translating an offset signed compare to its
unsigned equivalent when one end of the range is
at the limit (zero or unsigned max).

(X + C2) >s C --> X <u (SMAX - C) (if C == C2 - 1)
(X + C2) <s C --> X >u (C ^ SMAX) (if C == C2)

This probably does not show up much in IR derived
from C/C++ source because that would likely have
'nsw', and we have folds for that already.

As with the previous unsigned transforms, the folds
could be generalized to handle non-constant patterns:

https://alive2.llvm.org/ce/z/Y8Xrrm

  ; sgt
  define i1 @src(i8 %a, i8 %c) {
    %c2 = add i8 %c, 1
    %t = add i8 %a, %c2
    %ov = icmp sgt i8 %t, %c
    ret i1 %ov
  }

  define i1 @tgt(i8 %a, i8 %c) {
    %c_off = sub i8 127, %c ; SMAX
    %ov = icmp ult i8 %a, %c_off
    ret i1 %ov
  }

https://alive2.llvm.org/ce/z/c8uhnk

  ; slt
  define i1 @src(i8 %a, i8 %c) {
    %t = add i8 %a, %c
    %ov = icmp slt i8 %t, %c
    ret i1 %ov
  }

  define i1 @tgt(i8 %a, i8 %c) {
    %c_offnot = xor i8 %c, 127 ; SMAX
    %ov = icmp ugt i8 %a, %c_offnot
    ret i1 %ov
  }
The file was modifiedllvm/test/Transforms/InstCombine/icmp-add.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 0724c0e4fb9aa015b3b32ca165d3b926d5bc1aef by Louis Dionne
[libc++] NFC: Add note about how the libcxx website gets updated
The file was modifiedlibcxx/docs/README.txt
Commit 4ff440b0efb0a9dbfd6786d16e6e5d4dfeca2bde by marius.brehler
[mlir] Change custom syntax of emitc.include op to resemble C

This changes the custom syntax of the emitc.include operation for standard includes.

Reviewed By: marbre

Differential Revision: https://reviews.llvm.org/D105281
The file was modifiedmlir/lib/Dialect/EmitC/IR/EmitC.cpp
The file was modifiedmlir/test/Dialect/EmitC/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/EmitC/IR/EmitC.td
Commit 91ee1e379901af3dfc5b482f9b83aed0c7ea22f5 by flo
[LV] Add initial test cases with small clamped indices.
The file was addedllvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
Commit 0bb9c05b1ec654eeba195c0e1a4030f795a2f09d by flo
[LV] Extend FIXME in test add in 91ee1e379901af3.
The file was modifiedllvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
Commit 7bc1baea6ec8498c82877f773750f9b4c0025874 by anirudh_prasad
[MCParser][z/OS] Mark a few tests as unsupported for the z/OS Target

- Background here is that that these sets of tests are "invalid" to be run on z/OS
- The reason is because these test constructs that HLASM never supports (HLASM doesn't support GNU style directives)
- Usually tests are geared towards a particular target via the use of a triple that targets just that platform, but these tests require the use of a "default triple"
- Thus, we mark these tests as "UNSUPPORTED" for z/OS since we don't want to run these for z/OS

Reviewed By: yusra.syeda, abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D105204
The file was modifiedllvm/test/MC/AsmParser/debug-empty-source.s
The file was modifiedllvm/test/MC/AsmParser/macro-same-context.ll
The file was modifiedllvm/test/MC/ELF/dwarf-file0.s
The file was modifiedllvm/test/MC/AsmParser/debug-no-source.s
The file was modifiedllvm/test/tools/llvm-mc/no_warnings.test
The file was modifiedllvm/test/MC/AsmParser/include.ll
The file was modifiedllvm/test/MC/ELF/dwarf-loc0.s
Commit 96e3fb2416f6ce9bae94313b30bdfeeaddb2de36 by marius.brehler
[mlir] Unbreak building mlir-reduce

Unbreaks building mlir-reduce when `DLLVM_INCLUDE_TESTS` is set to OFF.
The dependency MLIRTestDialect is only available if building with tests.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D105434
The file was modifiedmlir/tools/mlir-reduce/CMakeLists.txt
Commit 88522455c03459b016ed6a6b21b5847eda2df5ca by paul.walker
Fix typo in help text for -aarch64-enable-branch-targets.
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
Commit d4ed965b2d14361e4273525a9888344a25f3800c by chenmindong1
[AArch64ISelDAGToDAG] Fix ORRWrs/ORRXrs usefulbits calculation bug

For the following case:

    t8: i32 = or t7, t4
    t10: i32 = ORRWrs t8, t8, TargetConstant:i32<73>

Current code wrongly returns (t8 >> shiftConstant) as the
UsefulBits of t8, which in fact is (t8 | (t8 >> shiftConstant)).

Reviewed by: sdesmalen, mdchen

Differential Revision: https://reviews.llvm.org/D102759
The file was addedllvm/test/CodeGen/AArch64/arm64-isel-or.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
Commit b931c2a714b93327c602ee54e867f812bded4262 by Akira
Precommit another test for https://reviews.llvm.org/D104953
The file was modifiedllvm/test/Transforms/ObjCARC/code-motion.ll
Commit 715137d0c8f99d172e06526032c8f13104af5e51 by uday
[MLIR] Fix memref get constant bound size and shape method

Fix FlatAffineConstraints::getConstantBoundOnDimSize to ensure that
returned bounds on dim size are always non-negative regardless of the
constraints on that dimension. Add an assertion at the user.

Differential Revision: https://reviews.llvm.org/D105171
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/include/mlir/Analysis/Utils.h
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
The file was modifiedmlir/test/Dialect/Affine/affine-data-copy.mlir
Commit 98f078324fc51da460660920f4a1aa308bfc3547 by i
[llvm-strings] Switch command line parsing from llvm::cl to OptTable

Some behavior changes:

* `-t=d` is removed. Use `-t d` instead.
* one-dash long options like `-all` are supported. Use `--all` instead.
* `--all=0` or `--all=false` cannot be used. (Note: `--all` is silently ignored anyway)
* `--help-list` is removed. This is a `cl::` specific option.

Nobody is likely leveraging any of the above.

Advantages:

* `-t` diagnostic gets improved.
* in the absence of `HideUnrelatedOptions`, `--help` will not list unrelated options if linking against libLLVM-13git.so or linker GC is not used.
* Decrease the probability of cl::opt collision if we do decide to support multiplexing

Note: because the tool is so simple, used more for forensics instead of a building
tool, and its long options are unlikely used in one-dash form, I just drop the
one-dash form in this patch.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D104889
The file was modifiedllvm/docs/CommandGuide/llvm-strings.rst
The file was modifiedllvm/tools/llvm-strings/CMakeLists.txt
The file was modifiedllvm/tools/llvm-strings/llvm-strings.cpp
The file was addedllvm/test/tools/llvm-strings/grouped.test
The file was modifiedllvm/test/tools/llvm-strings/help.test
The file was addedllvm/tools/llvm-strings/Opts.td
The file was modifiedllvm/test/tools/llvm-strings/length.test
The file was modifiedllvm/test/tools/llvm-strings/radix.test
Commit 086370faee2a85c40855893537740c14217131e3 by minyihh
[M68k][GloballSel] Lower outgoing return values in IRTranslator

Implementation of lowerReturn in the IRTranslator for the M68k backend.

Differential Revision: https://reviews.llvm.org/D105332
The file was modifiedllvm/lib/Target/M68k/M68kISelLowering.h
The file was modifiedllvm/lib/Target/M68k/M68kISelLowering.cpp
The file was modifiedllvm/test/CodeGen/M68k/GlobalISel/irtranslator-ret.ll
The file was modifiedllvm/lib/Target/M68k/GlSel/M68kCallLowering.cpp
Commit 325a5619e47500a7301bd99e39a82e27d06571df by thakis
[gn build] (manually) port 98f078324fc5 (llvm-strings Opts.td)
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-strings/BUILD.gn
Commit 0f31f68e2698111ce8fc547421f054a0ad60dd56 by Louis Dionne
[libc++] NFC: Sort header lists in test scripts
The file was modifiedlibcxx/utils/generate_header_inclusion_tests.py
The file was modifiedlibcxx/utils/generate_header_tests.py
Commit 28fe9afdba83202ba9e1c1fe4c169ba14a9154f4 by Akira
[ObjC][ARC] Prevent moving objc_retain calls past objc_release calls
that release the retained object

This patch fixes what looks like a longstanding bug in ARC optimizer
where it reverses the order of objc_retain calls and objc_release calls
that retain and release the same object.

The code in ARC optimizer that is responsible for code motion takes the
following steps:

1. Traverse the CFG bottom-up and determine how far up objc_release
   calls can be moved. Determine the insertion points for the
   objc_release calls, but don't actually move them.
2. Traverse the CFG top-down and determine how far down objc_retain
   calls can be moved. Determine the insertion points for the
   objc_retain calls, but don't actually move them.
3. Try to move the objc_retain and objc_release calls if they can't be
   removed.

The problem is that the insertion points for the objc_retain calls are
determined in step 2 without taking into consideration the insertion
points for objc_release calls determined in step 1, so the order of an
objc_retain call and an objc_release call can be reversed, which is
incorrect, even though each step is correct in isolation.

To fix this bug, this patch teaches the top-down traversal step to take
into consideration the insertion points for objc_release calls
determined in the bottom-up traversal step. Code motion for an
objc_retain call is disabled if there is a possibility that it can be
moved past an objc_release call that releases the retained object.

rdar://79292791

Differential Revision: https://reviews.llvm.org/D104953
The file was modifiedllvm/test/Transforms/ObjCARC/code-motion.ll
The file was modifiedllvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Commit 36ba86fe8a29cdf3251b786db7f342efde666cb2 by i
[profile][test] Improve coverage-linkage.cpp
The file was modifiedcompiler-rt/test/profile/Linux/coverage-linkage.cpp
Commit a77e2d196c39950e191f9d0ce7e61920ac32f4e7 by david.green
[ARM] Fix arm.mve.pred.v2i range upper limit

The range metadata specifies a half open range, so our top limit was one
off.
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/test/Transforms/InstCombine/ARM/mve-v2i2v.ll
Commit 52f34673ead32e6818d337207661597de52b9808 by wanyu9511
[AIX] Add _AIX73 version macro

This patch defines _AIX73 version macro for AIX 7.3.

It extends the following patch https://reviews.llvm.org/D61530.

Reviewed By: xgupta

Differential Revision: https://reviews.llvm.org/D105185
The file was modifiedclang/test/Preprocessor/init-ppc.c
The file was modifiedclang/lib/Basic/Targets/OSTargets.h
Commit b3f5d0639e6ef9d2c6a8baf56304f3cc8af07813 by benny.kra
[Bazel] Fix build for 35d4593e6b555f852088211f5561c0e360c98c91
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 775cac4ccad5d0396ad15c160545df87bffad7f5 by benny.kra
[Bazel] Fix build for 98f078324fc51da460660920f4a1aa308bfc3547
The file was modifiedutils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Commit 9964b0ef828b685dc575a50f75bb1780b84b95c8 by wanyu9511
[clang] Add -fdump-record-layouts-canonical option

This option implies -fdump-record-layouts but dumps record layout information with canonical field types, which can be more useful in certain cases when comparing structure layouts.

Reviewed By: stevewan

Differential Revision: https://reviews.llvm.org/D105112
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was addedclang/test/Layout/dump-canonical.cpp
The file was modifiedclang/lib/AST/RecordLayoutBuilder.cpp
Commit 873e8b96b1226d64e4f95083147d8592ba7bd5d8 by cjdb
[compiler-rt][iwyu] explicitly includes `<new>` in xray_utils.cpp

Compiling compiler-rt with Clang modules and libc++ revealed that the
global `operator new` is being called without including `<new>`.

Differential Revision: https://reviews.llvm.org/D105401
The file was modifiedcompiler-rt/lib/xray/xray_utils.cpp
Commit e2904c8e0fa901adeefe579297cb2ece2757fb18 by wanyu9511
[clang] unbreak Index/preamble-reparse-changed-module.m with LLVM_APPEND_VC_REV=NO after 9964b0e

See revision b8b7a9d for prior art.
The file was modifiedclang/include/clang/Serialization/ASTBitCodes.h
Commit 718c32175b3bcced88d9ca25ab1482a682ae5bbb by jezng
[lld-macho] Only emit one BIND_OPCODE_SET_SYMBOL per symbol

Size-wise, BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM is the most
expensive opcode, since it comes with an associated symbol string. We
were previously emitting it once per binding, instead of once per
symbol. This diff groups all bindings for a given symbol together and
ensures we only emit one such opcode per symbol. This matches ld64's
behavior.

While this is a relatively small win on chromium_framework (-72KiB), for
programs that have more dynamic bindings, the difference can be quite
large.

This change is perf-neutral when linking chromium_framework.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D105075
The file was modifiedlld/MachO/SyntheticSections.h
The file was addedlld/test/MachO/bind-opcodes.s
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit db64306d99138a3700a2ab9c7d3b47f302781cc3 by thakis
[lld/mac] Implement -umbrella

I think this is an old way for doing what is done with
-reexport_library these days, but it's e.g. still used in libunwind's
build (the opensource.apple.com one, not the llvm one).

Differential Revision: https://reviews.llvm.org/D105448
The file was addedlld/test/MachO/umbrella.s
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Writer.cpp
Commit 2c25f39fcce4f1789c18f67dbf5f10e9ef8c51e6 by thakis
[lld/mac] Implement -final_output

This is one of two flags clang passes to the linker when giving calling
clang with multiple -arch flags.

I think it'd make sense to also use finalOutput instead of outputFile
in CodeSignatureSection() and when replacing @executable_path, but
ld64 doesn't do that, so I'll at least put those in separate commits.

Differential Revision: https://reviews.llvm.org/D105449
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/InputFiles.cpp
The file was addedlld/test/MachO/final-output.s
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 21106388eb96c87b3f580c42a322c76a61605261 by mizvekov
[clang] fixes named return of variables with dependent alignment

Named return of a variable with aligned attribute would
trip an assert in case alignment was dependent.

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

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D105380
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/test/CodeGen/nrvo-tracking.cpp
The file was modifiedclang/include/clang/AST/Decl.h
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit 7d10dd60ce126a6a0a29aa1f3948f596bd6e4fb0 by albionapc
[PowerPC] Implament Load and Reserve and Store Conditional Builtins

This patch implaments the load and reserve and store conditional
builtins for the PowerPC target, in order to have feature parody with
xlC on AIX.

Differential revision: https://reviews.llvm.org/D105236
The file was addedllvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond.ll
The file was addedclang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c
The file was addedclang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond-64bit-only.c
The file was modifiedclang/include/clang/Basic/BuiltinsPPC.def
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td
The file was addedclang/test/CodeGen/builtins-ppc-xlcompat-error.c
The file was modifiedllvm/lib/Target/PowerPC/PPCInstr64Bit.td
The file was addedllvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond-64bit-only.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
Commit 203b48c71a0db835bd0d6869311578dbd7cc8b71 by albionapc
[PowerPC] Removed a test case meant for a later patch

A test case meant for a later patch was accidentally
included.

Original Patch: https://reviews.llvm.org/D105236

Differential revision: https://reviews.llvm.org/D105454
The file was removedclang/test/CodeGen/builtins-ppc-xlcompat-error.c
Commit 64be5b7d87139c5fa9cfbe9ee413dc15d04cedb7 by thakis
[lld/mac] Implement -arch_multiple

This is the other flag clang passes when calling clang with two -arch
flags (which means with this, `clang -arch x86_64 -arch arm64 -fuse-ld=lld ...`
now no longer prints any warnings \o/). Since clang calls the linker several
times in that setup, it's not clear to the user from which invocation the
errors are. The flag's help text is

    Specifies that the linker should augment error and warning messages
    with the architecture name.

In ld64, the only effect of the flag is that undefined symbols are prefaced
with

    Undefined symbols for architecture x86_64:

instead of the usual "Undefined symbols:". So for now, let's add this
only to undefined symbol errors too. That's probably the most common
linker diagnostic.

Another idea would be to prefix errors and warnings with "ld64.lld(x86_64):"
instead of the usual "ld64.lld:", but I'm not sure if people would
misunderstand that as a comment about the arch of ld itself.
But open to suggestions on what effect this flag should have :) And we
don't have to get it perfect now, we can iterate on it.

Differential Revision: https://reviews.llvm.org/D105450
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/Config.h
The file was addedlld/test/MachO/arch-multiple.s