SuccessChanges

Summary

  1. [mlir][openacc] Add conversion for if operand to scf.if for standalone data operation (details)
  2. [Demangle][Rust] Parse dyn-bounds (details)
  3. [Demangle][Rust] Parse dyn-trait (details)
  4. [Demangle][Rust] Parse dyn-trait-assoc-binding (details)
  5. [CostModel] Return Invalid cost in getArithmeticCost instead of crashing for scalable vectors. (details)
  6. [CostModel][AArch64] NFC: Simplify some cost model tests for SVE. (details)
  7. [NFC] Add missing include to LaneBitmask.h to fix modules build (details)
  8. [lldb] Fix TypeSystemClang compilation after D101777 (details)
  9. [libc++] Simplify a few macros in __config (details)
  10. [docs] Set Phabricator as the tool for pre-commit reviews (details)
  11. [dfsan] Fix internal build errors because of more strict warning checks (details)
  12. [VPlan] Print successors of VPRegionBlocks. (details)
  13. [AArch64] handle -Wa,-march= (details)
  14. [Demangle][Rust] Parse instantiating crate (details)
  15. [RISCV] Don't enable loop vectorizer interleaving if the V extension isn't enabled. (details)
  16. [InstCombine] add tests for FMF propagation via -(C/X); NFC (details)
  17. [InstCombine] refactor match clauses; NFC (details)
  18. [InstCombine] intersect nsz and ninf fast-math-flags (FMF) for fneg(fdiv) fold (details)
  19. [XCOFF][AIX] Enable tooling support for 64 bit symbol table parsing (details)
  20. [RS4GC] Treat inttoptr as base pointer (details)
  21. [RISCV] Lower i8/i16 bswap/bitreverse to grevi/greviw with Zbp. (details)
  22. [MLIR] Conditional Branch Argument Propagation (details)
  23. [lld/mac] Add a test for -reexport_library + -dead_strip_dylibs (details)
  24. [libc++] Rename 'and' to '&&' (details)
  25. [MLIR][GPU] Simplify memcpy of cast (details)
  26. [SCEV] Compute exit counts for unsigned IVs using mustprogress semantics (details)
  27. GlobalISel: Remove unnecessary .getReg(0)s (details)
  28. GlobalISel: Use MMO helper for getting the size in bits (details)
  29. AMDGPU: Move codegen test out of MIR test directory (details)
  30. [OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type (details)
  31. [OpenMP][runtime] add .clang-tidy file (details)
  32. [LoopUnroll] Clamp unroll count to MaxTripCount (details)
Commit fb5b590b5e18796bf850170946f15fc10ab9394a by clementval
[mlir][openacc] Add conversion for if operand to scf.if for standalone data operation

This patch convert the if condition on standalone data operation such as acc.update,
acc.enter_data and acc.exit_data to a scf.if with the operation in the if region.
It removes the operation when the if condition is constant and false. It removes the
the condition if it is contant and true.

Conversion to scf.if is done in order to use the translation to LLVM IR dialect out of the box.
Not sure this is the best approach or we should perform this during the translation from OpenACC
to LLVM IR dialect. Any thoughts welcome.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D103325
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was addedmlir/test/Conversion/OpenACCToSCF/convert-openacc-to-scf.mlir
The file was addedmlir/include/mlir/Conversion/OpenACCToSCF/ConvertOpenACCToSCF.h
The file was addedmlir/lib/Conversion/OpenACCToSCF/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.h
Commit 89615a5e925e10f388130e80fba4bf28bc3c3c0a by tomasz.miasko
[Demangle][Rust] Parse dyn-bounds

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103151
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/include/llvm/Demangle/RustDemangle.h
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 1499afa09ba27ee0e6569668b74fea40e0458930 by tomasz.miasko
[Demangle][Rust] Parse dyn-trait

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103361
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
The file was modifiedllvm/include/llvm/Demangle/RustDemangle.h
Commit 619a65e5e4ed0df7b753eac9d7d41be976fd909b by tomasz.miasko
[Demangle][Rust] Parse dyn-trait-assoc-binding

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103364
The file was modifiedllvm/include/llvm/Demangle/RustDemangle.h
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
The file was modifiedllvm/test/Demangle/rust.test
Commit c908196e100a5ac1b25cba859094bfc28cffb5f3 by sander.desmalen
[CostModel] Return Invalid cost in getArithmeticCost instead of crashing for scalable vectors.

This fixes an issue in BasicTTIImpl.h where it tries to do a
cast<FixedVectorType> on a scalable vector type in order to get the
scalarization cost. Because scalarization of scalable vectors is not
supported, we return Invalid instead.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D103798
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was addedllvm/test/Analysis/CostModel/AArch64/sve-remainder.ll
Commit be663c4337c6e3d81a9a539abc11477fdb74cc6e by sander.desmalen
[CostModel][AArch64] NFC: Simplify some cost model tests for SVE.

* Merged some functions into a single function, to make the costs more obvious.
* Moved scalable-mem-op-cost-model.ll -> sve-ldst.ll to be more consistent with other filenames.
The file was removedllvm/test/Analysis/CostModel/AArch64/scalable-mem-op-cost-model.ll
The file was addedllvm/test/Analysis/CostModel/AArch64/sve-ldst.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/sve-gather.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/sve-scatter.ll
Commit f10b9ca9c6723dba571f4b319b1c55c0ae8ad0ab by Raphael Isemann
[NFC] Add missing include to LaneBitmask.h to fix modules build
The file was modifiedllvm/include/llvm/MC/LaneBitmask.h
Commit 2c2feebcd1274425c853e3cff7cec6ba033c3ccd by Raphael Isemann
[lldb] Fix TypeSystemClang compilation after D101777

We apparently now need to pass the DeclName of the target decl to the
constructor.
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Commit fb4e4646188cf43a1e96a0aba6b6d24d8604257c by Louis Dionne
[libc++] Simplify a few macros in __config

Several macros were guarded with a check along the lines of:

#ifndef MACRO
#  define MACRO ...
#endif

However, some of these macros are never intended to be defined by users,
so it's pointless to make this check (i.e. the first #ifndef is always
true). This commit removes those checks.

The motivation for doing this cleanup is to remove the impression that
arbitrary configurations macros can be defined by users when including
libc++ headers, which doesn't work reliably and leads to macro spaghetti.
If one needs to be able to override a knob in the __config, that's fine,
but the proper way to do that is to document the macro as being a public
facing knob in the documentation, and most likely to migrate that macro
to __config_site (depending on the nature of the macro).

Differential Revision: https://reviews.llvm.org/D103705
The file was modifiedlibcxx/include/__config
Commit 9d35c1701f264398814e7f54ae4a014ab0030bf1 by kparzysz
[docs] Set Phabricator as the tool for pre-commit reviews

Differential Revision: https://reviews.llvm.org/D103811
The file was modifiedllvm/docs/CodeReview.rst
Commit a82747fafe215862c24e690c1c7b384f4c27ad20 by jianzhouzh
[dfsan] Fix internal build errors because of more strict warning checks
The file was modifiedcompiler-rt/test/dfsan/custom.cpp
The file was modifiedcompiler-rt/test/dfsan/interceptors.c
Commit 1465e7770bcacfb67ca4edc3714cf3a7e8a2a110 by flo
[VPlan] Print successors of VPRegionBlocks.

The non-DOT printing does not include the successors of VPregionBlocks.
This patch use the same style for printing successors as for
VPBasicBlock.

I think the printing of successors could be a bit improved further, as
at the moment it is hard to ensure a check line matches all successors.
But that can be done as follow-up.

Reviewed By: a.elovikov

Differential Revision: https://reviews.llvm.org/D103515
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-printing.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
Commit fd11a26d368c5a909fb88548fef2cee7a6c2c931 by caij2003
[AArch64] handle -Wa,-march=

This fixed PR#48894 for AArch64. The issue has been fixed for Arm in
https://reviews.llvm.org/D95872

The following rules apply to -Wa,-march with this change:
  - Only compiler options apply to non assembly files
  - Compiler and assembler options apply to assembly files
  - For assembly files, we prefer the assembler option(s) if we have both kinds of option
  - Of the options that apply (or are preferred), the last value wins (it's not additive)

Reviewed By: DavidSpickett, nickdesaulniers

Differential Revision: https://reviews.llvm.org/D103184
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was addedclang/test/Driver/aarch64-target-as-march.s
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.h
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 43929ccc1296b13250965d75bd410550256d45c5 by tomasz.miasko
[Demangle][Rust] Parse instantiating crate

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103460
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 8c6bd6c22f384cc09e4a97de630ae63d7721dfd0 by craig.topper
[RISCV] Don't enable loop vectorizer interleaving if the V extension isn't enabled.

This can cause the vectorizer to generate interleaved scalar
code which might be ok for some CPUs, but definitely not all.
Disable it to restore the previous scalar behavior.

Differential Revision: https://reviews.llvm.org/D103787
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.h
Commit dc173254e754f1c363218548040642c6c53da8ed by spatel
[InstCombine] add tests for FMF propagation via -(C/X); NFC

There are bugs here as discussed in:
https://llvm.org/PR49654
The file was modifiedllvm/test/Transforms/InstCombine/fneg.ll
Commit 519e98cd9af0d4b47a2daf0899b69d1254750c13 by spatel
[InstCombine] refactor match clauses; NFC

We need to adjust the FMF propagation on at least
one of these transforms as discussed in:
https://llvm.org/PR49654
...so this should make it easier to intersect flags.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Commit 4675beaa2181b6ccb1a37fd49b51a45490023974 by spatel
[InstCombine] intersect nsz and ninf fast-math-flags (FMF) for fneg(fdiv) fold

https://alive2.llvm.org/ce/z/3KPvih

https://llvm.org/PR49654
The file was modifiedllvm/test/Transforms/InstCombine/fneg.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Commit 8e84311a84b35ced5c18c3af8a802f7d2aa5c8a0 by jasonliu
[XCOFF][AIX] Enable tooling support for 64 bit symbol table parsing

Add in the ability of parsing symbol table for 64 bit object.

Reviewed By: jhenderson, DiggerLin

Differential Revision: https://reviews.llvm.org/D85774
The file was modifiedllvm/include/llvm/Object/XCOFFObjectFile.h
The file was addedllvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description64.test
The file was modifiedllvm/tools/obj2yaml/xcoff2yaml.cpp
The file was addedllvm/test/tools/llvm-readobj/XCOFF/Inputs/file-aux-wrong64.o
The file was modifiedllvm/include/llvm/BinaryFormat/XCOFF.h
The file was addedllvm/test/tools/llvm-objdump/XCOFF/Inputs/xcoff-section-headers64.o
The file was modifiedllvm/unittests/Object/XCOFFObjectFileTest.cpp
The file was modifiedllvm/lib/Object/XCOFFObjectFile.cpp
The file was addedllvm/test/tools/llvm-readobj/XCOFF/symbols64.test
The file was modifiedllvm/tools/llvm-objdump/XCOFFDump.cpp
The file was addedllvm/test/tools/llvm-readobj/XCOFF/file-aux-wrong64.test
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp
The file was addedllvm/test/tools/llvm-readobj/XCOFF/Inputs/symbol64.o
Commit c880d5e583a389e3a665b2509915533f97dd4792 by listmail
[RS4GC] Treat inttoptr as base pointer

This is a modified version of a patch by tolziplohu with a style change, and most importantly, a revised commit message.

inttoptr for a non-integral address space is currently ill defined in the LangRef.  Figuring out exactly what the dynamic semantics of such a cast would be is hard, and not yet settled.  Despite that, we still need to go ahead and implement something in RS4GC for a couple of reasons.

First, as a simple consistency argument.  We're apparently added support for constexpr inttoptrs a while back, and even have tests which exercised them.  Having a lack of constant folding trigger a crash during lowering is non-ideal.

Second, and more fundementally, the optimizer is allowed to insert undefined constructs in unreachable code.  At the same time, we can't assume that dynamically dead code is always pruned before lowering.  As a result, we must assume that inttoptrs can occur (even if completely ill defined) along dead paths.  We need the lowering to not crash.  The stackmaps produced can be garbage (as the assumption is the code is dynamically dead), but the lowering itself can't crash.

Differential Revision: https://reviews.llvm.org/D103492
The file was addedllvm/test/Transforms/RewriteStatepointsForGC/base-inttoptr.ll
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Commit f30f8b4f12b762a054800aaa7b60461fd177fa96 by craig.topper
[RISCV] Lower i8/i16 bswap/bitreverse to grevi/greviw with Zbp.

Include known bits support so we know we don't need to zext the
output if the input was already zero extended.

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D103757
The file was modifiedllvm/test/CodeGen/RISCV/rv32zbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64zbp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 854d0edce6c6e29ee2803c1f6590dee62994419a by gh
[MLIR] Conditional Branch Argument Propagation

In an operation in the true/false dest of a branch,
one can assume that the operation itself was true/false if
only that edge can reach the operation.

Differential Revision: https://reviews.llvm.org/D101709
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Dialect/Standard/canonicalize.mlir
Commit 422544414b0dd79fef2f10a051b22c47ae5a0af1 by thakis
[lld/mac] Add a test for -reexport_library + -dead_strip_dylibs

Our behavior here already matched ld64, now we have a test for it.

(ld64 even strips the library here if you also pass -needed_library bar.dylib.
That seems wrong to me, and lld honors needed_library in that case.)

Differential Revision: https://reviews.llvm.org/D103812
The file was modifiedlld/test/MachO/dead-strip-dylibs.s
Commit 85966df3aa64513851b88f82e9b586774c6db367 by Louis Dionne
[libc++] Rename 'and' to '&&'
The file was modifiedlibcxx/include/__iterator/iterator_traits.h
Commit 00b6463b269f6815a8a110b9208f483e239ce1e2 by gh
[MLIR][GPU] Simplify memcpy of cast

Introduce a simplification that allows memcpy of a cast to simply use the underlying op

Differential Revision: https://reviews.llvm.org/D103830
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was addedmlir/test/Dialect/GPU/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Commit 38540d71c74c2f63a77993e7bfb6e52e4b0da0fc by listmail
[SCEV] Compute exit counts for unsigned IVs using mustprogress semantics

The motivation here is simple loops with unsigned induction variables w/non-one steps. A toy example would be:
for (unsigned i = 0; i < N; i += 2) { body; }

Given C/C++ semantics, we do not get the nuw flag on the induction variable. Given that lack, we currently can't compute a bound for this loop. We can do better for many cases, depending on the contents of "body".

The basic intuition behind this patch is as follows:
* A step which evenly divides the iteration space must wrap through the same numbers repeatedly. And thus, we can ignore potential cornercases where we exit after the n-th wrap through uint32_max.
* Per C++ rules, infinite loops without side effects are UB. We already have code in SCEV which relies on this.  In LLVM, this is tied to the mustprogress attribute.

Together, these let us conclude that the trip count of this loop must come before unsigned overflow unless the body would form a well defined infinite loop.

A couple notes for those reading along:
* I reused the loop properties code which is overly conservative for this case. I may follow up in another patch to generalize it for the actual UB rules.
* We could cache the n(s/u)w facts. I left that out because doing a pre-patch which cached existing inference showed a lot of diffs I had trouble fully explaining. I plan to get back to this, but I don't want it on the critical path.

Differential Revision: https://reviews.llvm.org/D103118
The file was addedllvm/test/Analysis/ScalarEvolution/lt-overflow.ll
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit f6555b917b81f0d403c30605243eb766c42ab0a4 by Matthew.Arsenault
GlobalISel: Remove unnecessary .getReg(0)s
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit dc98adfb448bdb845605185bb173e99614a17790 by Matthew.Arsenault
GlobalISel: Use MMO helper for getting the size in bits
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
Commit ccf28ea800ee07835a53c83b775ef3ec51909b1c by Matthew.Arsenault
AMDGPU: Move codegen test out of MIR test directory

This is testing an actual pass, not the MIR parser/printer.
The file was addedllvm/test/CodeGen/AMDGPU/load-store-opt-scc.mir
The file was removedllvm/test/CodeGen/MIR/AMDGPU/load-store-opt-scc.mir
Commit a1f550e052543f75acac9089b760cbc61729131f by Andrey.Churbanov
[OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type

Refactored code of dependence processing and added new inoutset dependence type.
Compiler can set dependence flag to 0x8 when call __kmpc_omp_task_with_deps.
Size of type of the dependence flag changed from 1 to 4 bytes in clang.
All dependence flags library gets so far and corresponding dependence types:
1 - IN, 2 - OUT, 3 - INOUT, 4 - MUTEXINOUTSET, 8 - INOUTSET.

Differential Revision: https://reviews.llvm.org/D97085
The file was modifiedclang/test/OpenMP/target_enter_data_depend_codegen.cpp
The file was modifiedopenmp/runtime/src/kmp_taskdeps.h
The file was modifiedopenmp/runtime/test/tasking/hidden_helper_task/common.h
The file was modifiedopenmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
The file was addedopenmp/runtime/test/tasking/omp51_task_dep_inoutset.c
The file was modifiedopenmp/runtime/test/tasking/hidden_helper_task/depend.cpp
The file was modifiedclang/test/OpenMP/task_codegen.c
The file was modifiedopenmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
The file was modifiedclang/test/OpenMP/depobj_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/target_update_depend_codegen.cpp
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/kmp_taskdeps.cpp
The file was modifiedclang/test/OpenMP/task_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_exit_data_depend_codegen.cpp
The file was modifiedopenmp/runtime/test/tasking/bug_nested_proxy_task.c
The file was modifiedclang/test/OpenMP/task_codegen.cpp
Commit d70e1f12765fd6bb644ffb561dff9a31c522308e by jonathan.l.peyton
[OpenMP][runtime] add .clang-tidy file

Use same checks as compiler-rt which removes checks for readability-*
and llvm-header style.

Differential Revision: https://reviews.llvm.org/D103711
The file was addedopenmp/runtime/.clang-tidy
Commit 8fdd7c2ff16da370e28ef1b22e400d57a541484f by nikita.ppv
[LoopUnroll] Clamp unroll count to MaxTripCount

Unrolling with more iterations than MaxTripCount is pointless, as
those iterations can never be executed. As such, we clamp ULO.Count
to MaxTripCount if it is known. This means we no longer need to
consider iterations after MaxTripCount for exit folding, and the
CompletelyUnroll flag becomes independent of ULO.TripCount.

Differential Revision: https://reviews.llvm.org/D103748
The file was modifiedllvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
The file was modifiedllvm/test/Transforms/LoopUnroll/runtime-loop5.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/multiple-exits.ll