SuccessChanges

Summary

  1. [ADT][Support] Fix C4146 error from MSVC (details)
  2. [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument (details)
  3. Revert "[WebAssembly] MC layer writes table symbols to object files" (details)
  4. Revert "[WebAssembly] Add support for table linking to wasm-ld" (details)
  5. hwasan: Update register-dump-read.c test to reserve x23 instead of x20. (details)
  6. [NFC] Disallow unused prefixes under MC/RISCV (details)
  7. [flang] Create names to allow access to inaccessible specifics (details)
  8. [mlir][NFC] Move helper substWithMin into Affine utils (details)
  9. [mlir][AsmPrinter] Properly escape strings when printing locations (details)
  10. [mlir] Fixing potential build break in my previous commit (details)
  11. [debugserver] Fix inverted if block that resulted in us using the private entitlements (details)
Commit 76f5c5a7b059929f0e0352ad4ff5ec1b78511868 by dblaikie
[ADT][Support] Fix C4146 error from MSVC

Unary minus operator applied to unsigned type, result still unsigned.

Use `~0U` instead of `-1U` and `1 + ~VAL` instead of `-VAL`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94417
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
The file was modifiedllvm/include/llvm/Support/MathExtras.h
Commit a1500105ee6074f992f376c916dcfa3a54acb717 by Dávid Bolvanský
[SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument

Example:

```
__attribute__((nonnull,noinline)) char * pinc(char *p)  {
  return ++p;
}

char * foo(bool b, char *a) {
       return pinc(b ? 0 : a);

}
```

optimize to

```
char * foo(bool b, char *a) {
       return pinc(a);

}
```

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94180
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Commit e65b9b04cdeff17fbcdae8d2bb268da832e4a267 by dschuff
Revert "[WebAssembly] MC layer writes table symbols to object files"

This reverts commit e9f1ed2306b1b3aedcb1acef2b50e252a77a04b9.

Reverting because it depends on 38dfce706f
The file was modifiedllvm/test/MC/WebAssembly/type-index.s
The file was modifiedllvm/test/MC/WebAssembly/weak-alias.s
The file was modifiedllvm/test/MC/WebAssembly/debug-info.ll
The file was modifiedllvm/test/MC/WebAssembly/debug-info64.ll
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedllvm/test/MC/WebAssembly/reloc-pic.s
The file was modifiedllvm/test/MC/WebAssembly/global-ctor-dtor.ll
The file was modifiedllvm/test/MC/WebAssembly/function-alias.ll
Commit 187d771d27ed9059675b53e92e8fb8aeee9c43d8 by dschuff
Revert "[WebAssembly] Add support for table linking to wasm-ld"

This reverts commit 38dfce706f796dc109ea495dd69a8cb4c8fa819d.
CI discovered a bug where the table is exported twice: see
D91870
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/test/wasm/stack-pointer.ll
The file was modifiedlld/wasm/SymbolTable.h
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/test/wasm/weak-alias.ll
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/test/wasm/pie.ll
The file was modifiedlld/wasm/SymbolTable.cpp
The file was modifiedlld/wasm/SyntheticSections.h
The file was modifiedlld/test/wasm/init-fini.ll
The file was modifiedlld/test/wasm/local-symbols.ll
The file was modifiedlld/test/wasm/shared.ll
The file was modifiedlld/test/wasm/signature-mismatch.ll
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/wasm/MarkLive.cpp
The file was modifiedlld/test/wasm/alias.s
The file was modifiedlld/test/wasm/section-symbol-relocs.yaml
The file was modifiedlld/wasm/InputFiles.h
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/locals-duplicate.test
Commit d302398ff05f6d2bfbcb5c4fdafccf8a0e3b9875 by peter
hwasan: Update register-dump-read.c test to reserve x23 instead of x20.

D90422 changed this test to write a fixed value into register x23
instead of x20, but it did not update the list of reserved registers.
This meant that x23 may have been live across the register write,
although this happens to not be the case with the current compiler.
Fix the problem by updating the reserved register list.
The file was modifiedcompiler-rt/test/hwasan/TestCases/register-dump-read.c
Commit aa3d4d9939595295d19969c62077cc09e4823f58 by mtrofin
[NFC] Disallow unused prefixes under MC/RISCV

Differential Revision: https://reviews.llvm.org/D94836
The file was modifiedllvm/test/MC/RISCV/rv32c-only-valid.s
The file was modifiedllvm/test/MC/RISCV/rv64zfh-valid.s
The file was modifiedllvm/test/MC/RISCV/rv32zfh-valid.s
The file was modifiedllvm/test/MC/RISCV/lit.local.cfg
Commit 1bd083b5d6d0619f532a7310e72887ea6d2e87eb by pklausler
[flang] Create names to allow access to inaccessible specifics

When a reference to a generic interface occurs in a specification
expression that must be emitted to a module file, we have a problem
when the generic resolves to a function whose name is inaccessible
due to being PRIVATE or due to a conflict with another use of the
same name in the scope.  In these cases, construct a new name for
the specific procedure and emit a renaming USE to the module file.
Also, relax enforcement of PRIVATE when analyzing module files.

Differential Revision: https://reviews.llvm.org/D94815
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/include/flang/Semantics/semantics.h
The file was addedflang/test/Semantics/modfile39.f90
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/lib/Evaluate/check-expression.cpp
The file was modifiedflang/lib/Semantics/semantics.cpp
The file was modifiedflang/include/flang/Semantics/tools.h
The file was modifiedflang/lib/Semantics/tools.cpp
The file was modifiedflang/include/flang/Semantics/expression.h
Commit 3afbfb4145bea3796f1137c377774848093c3435 by thomasraoux
[mlir][NFC] Move helper substWithMin into Affine utils

This allow using this helper outside of the linalg canonicalization.

Differential Revision: https://reviews.llvm.org/D94826
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Utils.h
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
Commit 2a27a9819a1e3371e3e08d7fbad6235cf50d336d by riddleriver
[mlir][AsmPrinter] Properly escape strings when printing locations

This fixes errors when location strings contains newlines, or other non-ascii characters.

Differential Revision: https://reviews.llvm.org/D94847
The file was modifiedmlir/test/IR/locations.mlir
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit fd2083d73c2d229e80c1091a0399f7e1076e8c52 by thomasraoux
[mlir] Fixing potential build break in my previous commit
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
Commit 999f5da6b3088fa4c0bb9d05b358d015ca74c71f by Jonas Devlieghere
[debugserver] Fix inverted if block that resulted in us using the private entitlements
The file was modifiedlldb/tools/debugserver/source/CMakeLists.txt