SuccessChanges

Summary

  1. Fix diagnostics where _Atomic can't be applied (details)
  2. [Driver] Don't pass -fobjc-rumtime= for non-ObjC input (details)
  3. Fix simultaneous .gcda creation (details)
  4. [X86][MC] Disable Prefix padding after hardcode/prefix (details)
  5. [PowerPC] Don't generate ST_VSR_SCAL_INT if power8-vector is disabled (details)
  6. [RISCV] Split RISCVISelDAGToDAG.cpp to RISCVISelDAGToDAG.h and RISCVISelDAGToDAG.cpp (details)
  7. [clang][xray] Add xray attributes to functions without decls too (details)
  8. [mlir][Linalg] Introduce linalg.pooling_min/max/sum op. (details)
  9. [mlir][Linalg] Extend fusion to support WAW atm on buffers. (details)
  10. [lld][WebAssembly] Early error if output file cannot be created. (details)
  11. [Driver] Flip the CC1 default of -fdiagnostics-show-option (details)
  12. [Frontend] Replace CC1 option -masm-verbose with -fno-verbose-asm (details)
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.h
The file was modifiedclang/test/Driver/darwin-objc-options.m
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
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.target.c
The file was addedcompiler-rt/test/profile/Inputs/instrprof-gcov-parallel.driver.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 modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
The file was modifiedllvm/include/llvm/MC/MCFragment.h
The file was addedllvm/test/MC/X86/align-via-padding-corner.s
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/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/pr45297.ll
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 modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was addedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
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/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.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/Analysis/DependenceAnalysis.h
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/IR/LinalgTraits.h
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
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/test/wasm/responsefile.test
The file was modifiedlld/test/wasm/lto/opt-level.ll
The file was modifiedlld/wasm/Driver.cpp
Commit d0d076fed9681ebf2c2aed22e18cc5b89c5ac940 by maskray
[Driver] Flip the CC1 default of -fdiagnostics-show-option

The driver enables -fdiagnostics-show-option by default, so flip the CC1
default to reduce the lengths of common CC1 command lines.

This change also makes ParseDiagnosticArgs() consistently enable
-fdiagnostics-show-option by default.
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
The file was modifiedclang/test/Sema/parentheses.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Frontend/CompilerInvocation.h
The file was modifiedclang/test/Driver/rewrite-legacy-objc.m
The file was removedclang/test/Driver/show-option-names.c
The file was modifiedclang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1-cxx11.cpp
The file was addedclang/test/Driver/fdiagnostics-show-option.c
The file was modifiedclang/test/Driver/rewrite-objc.m
The file was modifiedclang/test/Misc/show-diag-options.c
The file was modifiedclang/test/Frontend/diagnostics-option-names.c
Commit 531b3aff3094dcd2e7ffed7f72ebd932ea386baf by maskray
[Frontend] Replace CC1 option -masm-verbose with -fno-verbose-asm

Most OS✕target enable -fverbose-asm, so it makes sense to flip the CC1
option to reduce common command lines.
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/CodeGenObjC/debug-info-property5.m
The file was modifiedclang/test/CodeGenObjC/property-dbg.m
The file was modifiedclang/test/CodeGenObjC/debug-info-class-extension2.m
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/test/CodeGenObjC/debug-info-class-extension.m
The file was modifiedclang/include/clang/Driver/CC1Options.td
The file was modifiedclang/test/CodeGenObjC/debug-info-property2.m
The file was modifiedclang/test/CodeGenObjC/debug-info-property4.m
The file was modifiedclang/test/CodeGenObjC/debug-info-class-extension3.m
The file was modifiedclang/test/CodeGenObjC/debug-info-property.m
The file was modifiedclang/test/Driver/clang-translation.c
The file was modifiedclang/test/Driver/integrated-as.c