SuccessChanges

Summary

  1. [mlir][OpFormatGen] Add support for eliding UnitAttr when used to anchor an optional group (details)
  2. [MemorySSA] Restrict optimizations after a PhiTranslation. (details)
  3. [flang] Make preprocessing behavior tests runnable as regression tests (details)
  4. Reland D61689 Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED) with integrated assembler (details)
  5. [SVE] Remove bad calls to VectorType::getNumElements() from PowerPC (details)
  6. [NFC][ARM] Silence unused variable in release builds (details)
  7. [UBSan] Increase robustness of tests (details)
  8. [SVE] Remove bad call to VectorType::getNumElements() from ARM (details)
  9. [SVE] Remove bad call to VectorType::getNumElements() from AMDGPU (details)
  10. [VE] Extend integer arguments and return values smaller than 64 bits (details)
  11. [MC] Fix memory leak when allocating MCInst with bump allocator (details)
  12. [flang] Handle spaces (more) correctly in REAL input (details)
  13. Remove unneeded RoundDefault enumerator, and fix spelling in comments (details)
  14. [clang-tidy][NFC] Use correct size call for reserve (details)
  15. [test] Exit with an error if no tests are run. (details)
  16. [SVE] Remove bad calls to VectorType::getNumElements() from X86 (details)
  17. [flang] Acquire file accessibility, size, positioning (details)
  18. [flang] Defer "next input record" processing until handlers established (details)
  19. Fix use-after-scope in 7209f83112db caught by the sanitizer bots (details)
Commit 8c39e70679e93da3af9f881d314940c570d5d822 by riddleriver
[mlir][OpFormatGen] Add support for eliding UnitAttr when used to anchor an optional group

Unit attributes are given meaning by their existence, and thus have no meaningful value beyond "is it present". As such, in the format of an operation unit attributes are generally used to guard the printing of other elements and aren't generally printed themselves; as the presence of the group when parsing means that the unit attribute should be added. This revision adds support to the declarative format for eliding unit attributes in situations where they anchor an optional group, but aren't the first element.

For example,
```
let assemblyFormat = "(`is_optional` $unit_attr^)? attr-dict";
```

would print `foo.op is_optional` when $unit_attr is present, instead of the current `foo.op is_optional unit`.

Differential Revision: https://reviews.llvm.org/D84577
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/docs/OpDefinitions.md
Commit 1ce82015f6d06f8026357e4faa925f900136b575 by asbirlea
[MemorySSA] Restrict optimizations after a PhiTranslation.

Merging alias results from different paths, when a path did phi
translation is not necesarily correct. Conservatively terminate such paths.
Aimed to fix PR46156.

Differential Revision: https://reviews.llvm.org/D84905
The file was modifiedllvm/include/llvm/Analysis/MemorySSA.h
The file was modifiedllvm/lib/Analysis/MemorySSA.cpp
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
Commit 089adc339e7dd6924d7e107fa362d9d12642f6e0 by pklausler
[flang] Make preprocessing behavior tests runnable as regression tests

And fix a minor bug exposed by doing so.

Differential Revision: https://reviews.llvm.org/D85164
The file was modifiedflang/test/Preprocessing/pp038.F
The file was modifiedflang/test/Preprocessing/pp009.F
The file was modifiedflang/test/Preprocessing/pp016.F
The file was modifiedflang/test/Preprocessing/pp107.F90
The file was modifiedflang/test/Preprocessing/pp029.F
The file was modifiedflang/test/Preprocessing/pp040.F
The file was modifiedflang/test/Preprocessing/pp104.F90
The file was modifiedflang/test/Preprocessing/pp044.F
The file was modifiedflang/test/Preprocessing/pp022.F
The file was modifiedflang/test/Preprocessing/pp118.F90
The file was modifiedflang/test/Preprocessing/pp123.F90
The file was modifiedflang/lib/Parser/preprocessor.h
The file was modifiedflang/test/Preprocessing/pp020.F
The file was modifiedflang/test/Preprocessing/pp124.F90
The file was modifiedflang/lib/Parser/preprocessor.cpp
The file was modifiedflang/test/Preprocessing/pp115.F90
The file was modifiedflang/test/Preprocessing/pp003.F
The file was modifiedflang/test/Preprocessing/pp024.F
The file was modifiedflang/test/Preprocessing/pp102.F90
The file was modifiedflang/test/Preprocessing/pp041.F
The file was modifiedflang/test/Preprocessing/pp027.F
The file was modifiedflang/test/Preprocessing/pp030.F
The file was modifiedflang/test/Preprocessing/pp042.F
The file was modifiedflang/test/Preprocessing/pp017.F
The file was modifiedflang/test/Preprocessing/pp023.F
The file was modifiedflang/test/Preprocessing/pp116.F90
The file was modifiedflang/test/Preprocessing/pp032.F
The file was modifiedflang/test/Preprocessing/pp037.F
The file was modifiedflang/test/Preprocessing/pp004.F
The file was modifiedflang/test/Preprocessing/pp117.F90
The file was modifiedflang/test/Preprocessing/pp103.F90
The file was modifiedflang/test/Preprocessing/pp125.F90
The file was modifiedflang/test/Preprocessing/pp018.F
The file was modifiedflang/test/Preprocessing/pp002.F
The file was modifiedflang/test/Preprocessing/pp036.F
The file was modifiedflang/test/Preprocessing/pp114.F90
The file was modifiedflang/test/Preprocessing/pp110.F90
The file was modifiedflang/test/Preprocessing/pp112.F90
The file was modifiedflang/test/Preprocessing/pp008.F
The file was modifiedflang/test/Preprocessing/pp028.F
The file was modifiedflang/test/Preprocessing/pp126.F90
The file was modifiedflang/test/Preprocessing/pp019.F
The file was modifiedflang/test/Preprocessing/pp121.F90
The file was modifiedflang/test/Preprocessing/pp025.F
The file was modifiedflang/test/Preprocessing/pp026.F
The file was modifiedflang/test/Preprocessing/pp007.F
The file was modifiedflang/test/Preprocessing/pp111.F90
The file was modifiedflang/test/Preprocessing/pp015.F
The file was modifiedflang/test/Preprocessing/pp109.F90
The file was modifiedflang/test/Preprocessing/pp001.F
The file was modifiedflang/test/Preprocessing/pp006.F
The file was modifiedflang/test/Preprocessing/pp043.F
The file was modifiedflang/test/Preprocessing/pp129.F90
The file was modifiedflang/test/Preprocessing/pp130.F90
The file was modifiedflang/test/Preprocessing/pp101.F90
The file was modifiedflang/test/Preprocessing/pp120.F90
The file was modifiedflang/test/Preprocessing/pp039.F
The file was modifiedflang/test/Preprocessing/pp113.F90
The file was removedflang/test/Preprocessing/lit.local.cfg.py
The file was modifiedflang/test/Preprocessing/pp005.F
The file was modifiedflang/test/Preprocessing/pp014.F
The file was modifiedflang/test/Preprocessing/pp012.F
The file was modifiedflang/test/Preprocessing/pp119.F90
The file was modifiedflang/test/Preprocessing/pp021.F
The file was modifiedflang/test/Preprocessing/pp031.F
The file was modifiedflang/test/Preprocessing/pp035.F
The file was modifiedflang/lib/Parser/prescan.cpp
The file was modifiedflang/test/Preprocessing/pp128.F90
The file was modifiedflang/test/Preprocessing/pp013.F
The file was modifiedflang/test/Preprocessing/pp034.F
The file was modifiedflang/test/Preprocessing/pp127.F90
The file was modifiedflang/test/Preprocessing/pp106.F90
The file was modifiedflang/test/Preprocessing/pp105.F90
The file was modifiedflang/test/Preprocessing/pp108.F90
The file was modifiedflang/test/Preprocessing/pp122.F90
The file was modifiedflang/test/Preprocessing/pp011.F
The file was modifiedflang/test/Preprocessing/pp033.F
The file was modifiedflang/test/Preprocessing/pp010.F
Commit 7cf4603faee366a6e5860b6fdbedadd91872e231 by i
Reland D61689 Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED) with integrated assembler

This fixes an inconsistency: clang -c -gz -fno-integrated-as means SHF_COMPRESSED
while clang -c -gz -fintegrated-as means zlib-gnu.

---

Since July 15, 2015 (binutils-gdb commit
19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas
--compress-debug-sections=zlib (gcc -gz) means zlib-gabi:
SHF_COMPRESSED. Before that GCC/binutils used zlib-gnu (.zdebug).

clang's -gz was introduced in rC306115 (Jun 2017) to indicate zlib-gnu. It
is 2020 now and it is not unreasonable to assume users of the new
feature to have new linkers (ld.bfd/gold >= 2.26, lld >= rLLD273661).

Change clang's default accordingly to improve standard conformance.
zlib-gnu becomes out of fashion and gets poorer toolchain support.
Its mangled names confuse tools and are more likely to cause problems.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D61689
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/tools/driver/cc1as_main.cpp
Commit b43791e7016d04c0dcc0d36bb43b8e96110608c9 by ctetreau
[SVE] Remove bad calls to VectorType::getNumElements() from PowerPC

Differential Revision: https://reviews.llvm.org/D85154
The file was modifiedllvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
Commit af3ec731d54d8ca5e5752256bee5b93a5929fa14 by rupprecht
[NFC][ARM] Silence unused variable in release builds
The file was modifiedllvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
Commit 1d7790604c0c4e189bf8d91583cae8f1e027b1fb by julian.lettner
[UBSan] Increase robustness of tests

These UBSan tests assert the absence of runtime errors via `count 0`,
which means "expect no output".  This fails the test unnecessarily in
some environments (e.g., iOS simulator in our case).  Alter the test to
be a bit more specific and "expect no error" instead of "expect no
output".

rdar://65503408

Differential Revision: https://reviews.llvm.org/D85155
The file was modifiedcompiler-rt/test/ubsan/TestCases/Misc/nullability.c
The file was modifiedcompiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp
Commit b5059b7140232559ed123cb94d4e8f75ca9a44dc by ctetreau
[SVE] Remove bad call to VectorType::getNumElements() from ARM

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D85152
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Commit 3b92db4c846ef3c7295444fa0b554905de0774b2 by ctetreau
[SVE] Remove bad call to VectorType::getNumElements() from AMDGPU

Differential Revision: https://reviews.llvm.org/D85151
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
Commit 045e79e77c252f2c73c640e820e977ef52836d50 by marukawa
[VE] Extend integer arguments and return values smaller than 64 bits

In order to follow NEC Aurora SX VE ABI correctly, change to sign/zero
extend integer arguments and return values smaller than 64 bits in clang.
Also update regression test.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D85071
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/test/CodeGen/ve-abi.c
Commit 509f5c4ec2dbae99713ac6292c3a6bd7ba50027c by hgreving
[MC] Fix memory leak when allocating MCInst with bump allocator

Adds the function createMCInst() to MCContext that creates a MCInst using
a typed bump alloctor.

MCInst contains a SmallVector<MCOperand, 8>. The SmallVector is POD only
for <= 8 operands. The default untyped bump pointer allocator of MCContext
does not delete the MCInst, so if the SmallVector grows, it's a leak.

This fixes https://bugs.llvm.org/show_bug.cgi?id=46900.
The file was modifiedllvm/lib/MC/MCContext.cpp
The file was modifiedllvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp
The file was modifiedllvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
The file was modifiedllvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonMCInstLower.cpp
The file was modifiedllvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCContext.h
Commit 7c5630fe9908a8bf10be2e9d26054406fac8de87 by pklausler
[flang] Handle spaces (more) correctly in REAL input

Fixes problems in FCVS test fm110.f.
Add more comments, too.

Differential Revision: https://reviews.llvm.org/D85163
The file was modifiedflang/runtime/edit-input.cpp
Commit 49bbb8b60e451d173c7dd42993592e8aa4d95f24 by pklausler
Remove unneeded RoundDefault enumerator, and fix spelling in comments
The file was modifiedflang/lib/Decimal/binary-to-decimal.cpp
The file was modifiedflang/lib/Decimal/big-radix-floating-point.h
The file was modifiedflang/lib/Decimal/decimal-to-binary.cpp
The file was modifiedflang/include/flang/Decimal/decimal.h
The file was modifiedflang/lib/Evaluate/host.h
Commit 3b44b6c900d1b71e6a6590e376d11dc303ac5159 by n.james93
[clang-tidy][NFC] Use correct size call for reserve
The file was modifiedclang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
Commit adb5c23f8c0d60eeec41dcbe21d1b26184e1c97d by rupprecht
[test] Exit with an error if no tests are run.

If the test suite is misconfigured when it's run (a bad regexp, wrong test directory, etc.), the test suite may not discover any tests. When this happens, the test runner exits happily because no tests failed:

```
Ran 0 tests in 0.000s
RESULT: PASSED (0 passes, 0 failures, 0 errors, 0 skipped, 0 expected failures, 0 unexpected successes)
```

Change this to return an error so the misconfiguration can be more easily detected. Verified that `lldb-dotest -p TestDoesNotExist.py` successfully fails.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D85169
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py
Commit c9e6887f837933aa7e2bb2511a6f883739e30faa by ctetreau
[SVE] Remove bad calls to VectorType::getNumElements() from X86

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D85156
The file was modifiedllvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
Commit d8334c43606a08dc13a69d0993dc7a52d5c0fe56 by pklausler
[flang] Acquire file accessibility, size, positioning

Extend the raw file wrapper to get accessibility, positioning,
and size information.  This is needed for INQUIRE (to follow).

Differential Revision: https://reviews.llvm.org/D85160
The file was modifiedflang/runtime/file.cpp
The file was modifiedflang/runtime/file.h
Commit d879ac8a6eef683392a02dd0aa62c69d61b894eb by pklausler
[flang] Defer "next input record" processing until handlers established

External input was detecting "end of file" conditions in
BeginExternal...Input() and BeginUnformattedInput() routines
before EnableHandlers() could have been called.  Defer the
"start next record" processing to the input data item
handlers (and EndIoStatement() for when there are no data
items).

Differential Revision: https://reviews.llvm.org/D85161
The file was modifiedflang/runtime/io-stmt.cpp
The file was modifiedflang/runtime/io-stmt.h
The file was modifiedflang/runtime/io-api.cpp
Commit 1beb00db1f5197efb73f839da681b8e439f37628 by daniel_l_sanders
Fix use-after-scope in 7209f83112db caught by the sanitizer bots
The file was modifiedclang/lib/Driver/Driver.cpp