FailedChanges

Summary

  1. AMDGPU: Make HIPToolChain a subclass of AMDGPUToolChain (details)
  2. [ELF][test] Add 'REQUIRES: x86' to threads.s (details)
  3. Fix MSan false positive due to select folding. (details)
  4. [mlir][spirv] Include SPIR-V op definitions in main SPIR-V doc (details)
  5. [libomptarget][nfc] Move non-freestanding headers out of common (details)
  6. [OPENMP50]Fix size calculation for array shaping expression in the (details)
  7. [debugserver/ARM64] Make sure watchpoints hit are attributed correctly. (details)
  8. [lit] Refine adoption of argparse --version action (details)
  9. [OPENMP50]Codegen for array shaping expression in map clauses. (details)
  10. [OPENMP][DOCS]Mark array shaping as done, NFC. (details)
  11. Forward WrapperFrontendAction::shouldEraseOutputFiles() (details)
  12. Fix leak in GVNSink introduced in D72467. (details)
  13. [analyzer] Use IgnoreImpCasts() instead of reimplementing it. (details)
  14. [Support] Delete ioctl TIOCGWINSZ (details)
  15. AMDGPU/GlobalISel: Fix insert point when lowering G_FMAD (details)
  16. [VectorOps] Implement a simple folder for identity vector.transpose operations. (details)
  17. [Driver] Don't pass -fmessage-length=0 to CC1 (details)
  18. Fix diagnostics where _Atomic can't be applied (details)
  19. [Driver] Don't pass -fobjc-rumtime= for non-ObjC input (details)
  20. Fix simultaneous .gcda creation (details)
  21. [X86][MC] Disable Prefix padding after hardcode/prefix (details)
  22. [PowerPC] Don't generate ST_VSR_SCAL_INT if power8-vector is disabled (details)
  23. [RISCV] Split RISCVISelDAGToDAG.cpp to RISCVISelDAGToDAG.h and RISCVISelDAGToDAG.cpp (details)
  24. [clang][xray] Add xray attributes to functions without decls too (details)
  25. [mlir][Linalg] Introduce linalg.pooling_min/max/sum op. (details)
  26. [mlir][Linalg] Extend fusion to support WAW atm on buffers. (details)
  27. [lld][WebAssembly] Early error if output file cannot be created. (details)
Commit 175e42303bb2a4253c65126666b1ae05b32b0004 by arsenm2
AMDGPU: Make HIPToolChain a subclass of AMDGPUToolChain

This fixes some code duplication. This is also a step towards
consolidating builtin library handling.
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.h
Commit 0f44a09757f4f45e527e2bb79f15eb16967457a1 by maskray
[ELF][test] Add 'REQUIRES: x86' to threads.s
The file was modifiedlld/test/ELF/threads.s
Commit f9471b001089c744050c7a9cff39ebda2ff69011 by eugenis
Fix MSan false positive due to select folding.

Summary:
Select folding in JumpThreading can create a conditional branch on a
code patch that did not have one in the original program. This is not a
valid transformation in sanitize_memory functions.

Note that JumpThreading does select folding in 3 different places. Two
of them seem safe - they apply to a select instruction in a BB that ends
with an unconditional branch to another BB, which (in turn) ends with a
conditional branch or a switch with the same condition.

Fixes PR45220.

Reviewers: glider, dvyukov, efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76332
The file was addedllvm/test/Transforms/JumpThreading/select-unfold-msan.ll
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
Commit ee77607ca6ceaf13801bdb98307fd26c78fbc92a by antiagainst
[mlir][spirv] Include SPIR-V op definitions in main SPIR-V doc

Differential Revision: https://reviews.llvm.org/D77174
The file was modifiedmlir/docs/Dialects/SPIR-V.md
The file was modifiedmlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
Commit 09834f976125545c74b8c1161be5204352165368 by jonchesterfield
[libomptarget][nfc] Move non-freestanding headers out of common

Summary:
[libomptarget][nfc] Move non-freestanding headers out of common

Lowers the bar for building deviceRTL.
Drops math.h entirely as it wasn't used and libm is a big dependency.

Reviewers: jdoerfert, ABataev, grokos

Reviewed By: jdoerfert

Subscribers: jvesely, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D77071
The file was modifiedopenmp/libomptarget/deviceRTLs/common/omptarget.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/debug.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
Commit e094dd5adcbdd7f49226d93c3964f99bf5a25ba6 by a.bataev
[OPENMP50]Fix size calculation for array shaping expression in the
codegen.

Need to include the size of the pointee type when trying to calculate
the total size of the array shaping expression.
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/OpenMP/depobj_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/task_depend_messages.cpp
The file was modifiedclang/test/OpenMP/task_codegen.c
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 64799fbebddc9877f78c7501b0b986b7afe84d6b by ditaliano
[debugserver/ARM64] Make sure watchpoints hit are attributed correctly.

This didn't happen for arm64 if you have watches for variables
that are contigous in memory.

<rdar://problem/55135006>
The file was addedlldb/test/API/commands/watchpoints/watchpoint_count/main.c
The file was modifiedlldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
The file was addedlldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
The file was addedlldb/test/API/commands/watchpoints/watchpoint_count/Makefile
Commit a3fab31acd6b99dd70334df7fbfae22b914e3214 by julian.lettner
[lit] Refine adoption of argparse --version action

The real work for this was already done by serge-sans-paille [1].
Thanks for this!

[1] 1d4849379f71a0f5d73202a291c0b709f7cafbc5
The file was modifiedllvm/utils/lit/lit/cl_arguments.py
The file was modifiedllvm/utils/lit/lit/main.py
The file was modifiedllvm/utils/lit/tests/usage.py
The file was removedllvm/utils/lit/tests/version.py
Commit c2aa543237843fa7b7c0191b6685062b3512f245 by a.bataev
[OPENMP50]Codegen for array shaping expression in map clauses.

Added codegen support for array shaping operations in map/to/from
clauses.
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/target_update_codegen.cpp
The file was modifiedclang/test/OpenMP/target_data_ast_print.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen.cpp
The file was modifiedclang/test/OpenMP/target_map_messages.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/target_update_ast_print.cpp
Commit 39ada4688936d165adf1a3c22b250034bab8f8a3 by a.bataev
[OPENMP][DOCS]Mark array shaping as done, NFC.
The file was modifiedclang/docs/OpenMPSupport.rst
Commit c322d328aa331639f647711aee44c5dddfadd337 by blangmuir
Forward WrapperFrontendAction::shouldEraseOutputFiles()

Per the documentation, this class is supposed to forward every virtual
method, but we had missed on (shouldEraseOutputFiles). This fixes using
a wrapped frontend action over the PCH generator when using
-fallow-pch-with-compiler-errors. I do not think any upstream wrapper
actions can test this.

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

rdar://61110294
The file was modifiedclang/include/clang/Frontend/FrontendAction.h
The file was modifiedclang/lib/Frontend/FrontendAction.cpp
Commit ba4764c2cc14b0b495af539a913de10cf8268420 by efriedma
Fix leak in GVNSink introduced in D72467.
The file was modifiedllvm/lib/Transforms/Scalar/GVNSink.cpp
Commit 7ea64ae3afe4ad98e6753b9f74b30019113f719c by thakis
[analyzer] Use IgnoreImpCasts() instead of reimplementing it.

No intended behavior change.

Differential Revision: https://reviews.llvm.org/D77022
The file was modifiedclang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
Commit a3eb3d3d92d037fe3c9deaad87f6fc42fe9ea766 by maskray
[Support] Delete ioctl TIOCGWINSZ

D61326 essentially disabled `ioctl(FileID, TIOCGWINSZ, &ws)`.  Nobody
has complained for one year. So let's just delete the code.
The file was modifiedllvm/lib/Support/Unix/Process.inc
Commit 43e576593e78b1a9b7d22abdc2f6d339a116fa6b by arsenm2
AMDGPU/GlobalISel: Fix insert point when lowering G_FMAD
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-urem.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-udiv.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmad.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmad.s32.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit 855e738be250fe9dea211082a4acf668ddb4aca1 by grosul
[VectorOps] Implement a simple folder for identity vector.transpose operations.

Differential Revision: https://reviews.llvm.org/D77088
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
Commit 4805901930f27f80d3b97ccd88e4f5240b784abd by maskray
[Driver] Don't pass -fmessage-length=0 to CC1

-fmessage-length=0 is common (unless the environment variable COLUMNS
is set and exported. This simplifies a common CC1 command line.
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Driver/CC1Options.td
The file was modifiedclang/test/Frontend/source-col-map.c
The file was modifiedclang/test/Misc/unnecessary-elipses.cpp
The file was modifiedclang/test/Driver/rewrite-legacy-objc.m
The file was addedclang/test/Driver/fmessage-length.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Misc/message-length.c
The file was modifiedclang/test/Misc/diag-line-wrapping.cpp
The file was modifiedclang/test/Misc/wrong-encoding2.c
The file was modifiedclang/test/Driver/rewrite-objc.m
The file was modifiedclang/test/Misc/unprintable.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit f93aed66f22f230213a99205f8bcec975c45d8ba by rtrieu
Fix diagnostics where _Atomic can't be applied

adb290d97482aa9311ee4b4b5917a0f2ece55b30 added a new case to
err_atomic_specifier_bad_type.  The diagnostic has two %select's
controlled by the same argument, but only the first was updated to have
the new case.  Add the extra case for the second %select and add a
test case that exercises the last case.
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/SemaCXX/atomic-type.cpp
Commit 3341dc7339969d3cb1bff30b49d866db041d689b by maskray
[Driver] Don't pass -fobjc-rumtime= for non-ObjC input
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.h
The file was modifiedclang/test/Driver/darwin-objc-options.m
Commit 9180c14fe4d7f9d6f65da8bc593cd61796fdc50a by t-kawashima
Fix simultaneous .gcda creation

The intent of the `llvm_gcda_start_file` function is that only
one process create the .gcda file and initialize it to be updated
by other processes later.

Before this change, if multiple processes are started simultaneously,
some of them may initialize the file because both the first and
second `open` calls may succeed in a race condition and `new_file`
becomes 1 in those processes. This leads incorrect coverage counter
values. This often happens in MPI (Message Passing Interface) programs.
The test program added in this change is a simple reproducer.

This change ensures only one process creates/initializes the file by
using the `O_EXCL` flag.

Differential Revision: https://reviews.llvm.org/D76206
The file was modifiedcompiler-rt/lib/profile/GCDAProfiling.c
The file was addedcompiler-rt/test/profile/Posix/instrprof-gcov-parallel.test
The file was addedcompiler-rt/test/profile/Inputs/instrprof-gcov-parallel.driver.c
The file was addedcompiler-rt/test/profile/Inputs/instrprof-gcov-parallel.target.c
Commit d0efd7bfcf689c2a72664265e59dd7a3e1a52762 by shengchen.kan
[X86][MC] Disable Prefix padding after hardcode/prefix

Reviewers: reames, MaskRay, craig.topper, LuoYuanke, jyknight, eli.friedman

Reviewed By: craig.topper

Subscribers: hiraditya, llvm-commits, annita.zhang

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76475
The file was addedllvm/test/MC/X86/align-via-padding-corner.s
The file was modifiedllvm/include/llvm/MC/MCFragment.h
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Commit 8eb40e41f6ec99985a292e342ec303a0bd6f5f41 by lkail
[PowerPC] Don't generate ST_VSR_SCAL_INT if power8-vector is disabled

Summary:
In https://bugs.llvm.org/show_bug.cgi?id=45297, it fails selecting
instructions for `PPCISD::ST_VSR_SCAL_INT`. The reason it generate the
`PPCISD::ST_VSR_SCAL_INT` with `-power8-vector` in IR is PPC's
combiner checks `hasP8Altivec` rather than `hasP8Vector`. This patch
should resolve PR45297.

Differential Revision: https://reviews.llvm.org/D76773
The file was modifiedllvm/test/CodeGen/PowerPC/pr45297.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit af0cd9073c3de5655fe3078b195d34c3e6440852 by shiva0217
[RISCV] Split RISCVISelDAGToDAG.cpp to RISCVISelDAGToDAG.h and RISCVISelDAGToDAG.cpp

For the downstream RISCV maintenance, it would be easier to inherent
RISCVISelDAGToDAG by including header and only override the method that needs
to be customized for the provider non-standard ISA extension without touching
RISCVISelDAGToDAG.cpp which may cause conflict when upgrading the downstream
LLVM version.

Differential Revision: https://reviews.llvm.org/D77117
The file was addedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit bb3111cbaf7b181bcda94415456a69b2a6b767ad by ianlevesque
[clang][xray] Add xray attributes to functions without decls too

Summary: This allows instrumenting things like global initializers

Reviewers: dberris, MaskRay, smeenai

Subscribers: cfe-commits, johnislarry

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77191
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was addedclang/test/CodeGen/xray-global-init.cpp
Commit 69ddee1d2aadaa0b9ac4549f366d1bf5701a65f0 by hanchung
[mlir][Linalg] Introduce linalg.pooling_min/max/sum op.

Summary:
Performs an N-D pooling operation similarly to the description in the TF
documentation:
https://www.tensorflow.org/api_docs/python/tf/nn/pool

Different from the description, this operation doesn't perform on batch and
channel. It only takes tensors of rank `N`.

```
  output[x[0], ..., x[N-1]] =
    REDUCE_{z[0], ..., z[N-1]}
      input[
            x[0] * strides[0] - pad_before[0] + dilation_rate[0]*z[0],
            ...
            x[N-1]*strides[N-1] - pad_before[N-1] + dilation_rate[N-1]*z[N-1]
            ],
```

The required optional arguments are:
  - strides: an i64 array specifying the stride (i.e. step) for window
    loops.
  - dilations: an i64 array specifying the filter upsampling/input
    downsampling rate
  - padding: an i64 array of pairs (low, high) specifying the number of
    elements to pad along a dimension.

If strides or dilations attributes are missing then the default value is
one for each of the input dimensions. Similarly, padding values are zero
for both low and high in each of the dimensions, if not specified.

Differential Revision: https://reviews.llvm.org/D76414
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
The file was modifiedmlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
Commit 6dd696ae4fa1b1564e76e5531c268724d2c8b98f by hanchung
[mlir][Linalg] Extend fusion to support WAW atm on buffers.

Summary:
The RAW fusion happens only if the produecer block dominates the consumer block.
The WAW pattern also works with the precondition. I.e., if a producer can
dominate the consumer, they can fairly fuse together.

Since they are all tilable, we can think the pattern like this way:

Input:
```
linalg_op1 view

tile_loop
  subview_2
  linalg_op2 subview_2
```

Tile the first Linalg op as same as the second Linalg.
```
tile_loop
  subview_1
  linalg_op1 subview_1

tile_loop
  subview_2
  liangl_op2 subview_2
```

Since the first Linalg op is tilable in the same way and the computation are
independently, it's fair to fuse it with the second Linalg op.
```
tile_loop
  subview_1
  linalg_op1 subview_1
  linalg_op2 subview_2
```

In short, this patch includes:
- Handling both RAW and WAW pattern.
- Adding a interface method to get input and output buffers.
- Exposing a method to get a StringRef of a dependency type.
- Fixing existing WAW tests and add one more use case: initialize the buffer
  before conv op.

Differential Revision: https://reviews.llvm.org/D76897
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
Commit b5767010a8ea2f5e2148da5f3e37041185211370 by sbc
[lld][WebAssembly] Early error if output file cannot be created.

This matches the behaviour of the ELF driver.

Also move the `createFiles` to be `checkConfig` and report `no input
files` there.   Again this is mostly to match the structure of the ELF
linker better.

Differential Revision: https://reviews.llvm.org/D76960
The file was addedlld/test/wasm/early-exit-for-bad-paths.s
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/test/wasm/lto/opt-level.ll
The file was modifiedlld/test/wasm/responsefile.test