SuccessChanges

Summary

  1. [lld-macho][nfc] Remove unnecessary use of Optional<T*> (details)
  2. [various] Remove or use variables which are unused but set. (details)
  3. [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable (details)
  4. [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia (details)
  5. [lld/mac] Make -t work correctly with -flat_namespace (details)
  6. [test] Precommit test for D101103 (details)
  7. [InstSimplify] Treat invariant group insts as bitcasts for load operands (details)
  8. [mlir-reduce] Reducer refactor. (details)
  9. [OpaquePtr] Create API to make a copy of a PointerType with some address space (details)
Commit 8f89c054afa115e4e45dbc76f7efa2e7f485d227 by vyng
[lld-macho][nfc] Remove unnecessary use of Optional<T*>

In all of these cases, the functions could simply return a nullptr instead of {}.
There is no case where Optional<nullptr> has a special meaning.

Differential Revision: https://reviews.llvm.org/D103489
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/Driver.h
The file was modifiedlld/MachO/InputFiles.cpp
Commit 00d19c6704f421157ae3de3623aca5f58f6c366d by George Burgess IV
[various] Remove or use variables which are unused but set.

This is in preparation for the -Wunused-but-set-variable warning.

Differential Revision: https://reviews.llvm.org/D102942
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
The file was modifiedllvm/utils/benchmark/src/complexity.cc
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCBranchSelector.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedlldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
The file was modifiedllvm/lib/Target/X86/X86FloatingPoint.cpp
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
Commit cf49cae278b4e972cd2547d72f9ee7d9d69a3af4 by George Burgess IV
[Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

These are intended to mimic warnings available in gcc.

Differential Revision: https://reviews.llvm.org/D100581
The file was modifiedclang/test/CodeGen/X86/x86_64-xsave.c
The file was addedclang/test/SemaCXX/warn-unused-but-set-variables-cpp.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/test/CodeGen/builtins-arm.c
The file was modifiedclang/test/CodeGen/builtins-riscv.c
The file was addedclang/test/Sema/warn-unused-but-set-variables.c
The file was modifiedclang/test/SemaObjC/foreach.m
The file was modifiedclang/test/CodeGen/2007-10-30-Volatile.c
The file was addedclang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp
The file was modifiedclang/test/Sema/vector-gcc-compat.c
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/Sema/vector-gcc-compat.cpp
The file was addedclang/test/Sema/warn-unused-but-set-parameters.c
The file was modifiedclang/test/FixIt/fixit.cpp
The file was modifiedclang/test/Misc/warning-wall.c
The file was modifiedclang/test/SemaCXX/sizeless-1.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/SemaCXX/shift.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp
The file was modifiedclang/test/CodeGen/X86/x86_32-xsave.c
The file was modifiedclang/test/SemaCXX/goto.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/Sema/shift.c
Commit e6f88dc01a7208b6f4671c4fcb5d9e68d0808a34 by leonardchan
[clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

All fuchsia targets will now use the relative-vtables ABI by default.
Also remove -fexperimental-relative-c++-abi-vtables from test RUNs targeting fuchsia.

Differential Revision: https://reviews.llvm.org/D102374
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/virtual-function-call.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/diamond-virtual-inheritance.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/thunk-mangling.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/vbase-offset.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/diamond-inheritance.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Basic/TargetCXXABI.h
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/multiple-inheritance.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/available_externally-vtable.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/type-info.cpp
The file was modifiedclang/test/CodeGenCXX/constructor-destructor-return-this.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp
Commit 222a88a24371b8a1db2c2cedd1918a5f90758b75 by thakis
[lld/mac] Make -t work correctly with -flat_namespace

We used to not print dylibs referenced by other dylibs in `-t` mode. This
affected reexports, and with `-flat_namespace` also just dylibs loaded by
dylibs. Now we print them.

Fixes PR49514.

Differential Revision: https://reviews.llvm.org/D103428
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/test/MachO/flat-namespace.s
Commit 3aa943070cc1235c5b8d738dbeb0ca38cb7c6920 by aeubanks
[test] Precommit test for D101103
The file was addedllvm/test/Transforms/InstSimplify/invariant.group-load.ll
Commit 26044c6a54de3e03c73c5515702b95acdb0b7f22 by aeubanks
[InstSimplify] Treat invariant group insts as bitcasts for load operands

We can look through invariant group intrinsics for the purposes of
simplifying the result of a load.

Since intrinsics can't be constants, but we also don't want to
completely rewrite load constant folding, we convert the load operand to
a constant. For GEPs and bitcasts we just treat them as constants. For
invariant group intrinsics, we treat them as a bitcast.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D101103
The file was modifiedllvm/test/Transforms/InstSimplify/invariant.group-load.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit c484c7dd9d2382f07216ae9142ceb76272e21dc4 by chiahungduan
[mlir-reduce] Reducer refactor.

* A Reducer is a kind of RewritePattern, so it's just the same as
writing graph rewrite.
* ReductionTreePass operates on Operation rather than ModuleOp, so that
* we are able to reduce a nested structure(e.g., module in module) by
* self-nesting.

Reviewed By: jpienaar, rriddle

Differential Revision: https://reviews.llvm.org/D101046
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was removedmlir/tools/mlir-reduce/ReductionTreePass.cpp
The file was modifiedmlir/include/mlir/Reducer/Passes.td
The file was modifiedmlir/include/mlir/Reducer/Passes.h
The file was addedmlir/lib/Reducer/ReductionTreePass.cpp
The file was addedmlir/include/mlir/Reducer/ReductionPatternInterface.h
The file was modifiedmlir/test/mlir-reduce/multiple-function.mlir
The file was modifiedmlir/test/mlir-reduce/simple-test.mlir
The file was modifiedmlir/tools/mlir-reduce/CMakeLists.txt
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.h
The file was modifiedmlir/include/mlir/Reducer/ReductionNode.h
The file was modifiedmlir/test/mlir-reduce/dce-test.mlir
The file was modifiedmlir/lib/Reducer/CMakeLists.txt
The file was modifiedmlir/test/lib/Dialect/Test/CMakeLists.txt
The file was removedmlir/include/mlir/Reducer/ReductionTreePass.h
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was addedmlir/lib/Reducer/OptReductionPass.cpp
The file was addedmlir/lib/Reducer/ReductionNode.cpp
The file was removedmlir/tools/mlir-reduce/OptReductionPass.cpp
The file was modifiedmlir/test/mlir-reduce/single-function.mlir
The file was modifiedmlir/lib/Reducer/Tester.cpp
The file was modifiedmlir/tools/mlir-reduce/mlir-reduce.cpp
The file was removedmlir/include/mlir/Reducer/Passes/OpReducer.h
The file was modifiedmlir/test/lib/Reducer/MLIRTestReducer.cpp
The file was removedmlir/include/mlir/Reducer/OptReductionPass.h
The file was removedmlir/tools/mlir-reduce/ReductionNode.cpp
The file was addedmlir/test/mlir-reduce/crashop-reduction.mlir
Commit 89612938516b3623ecc038267539f2a4b69312d2 by aeubanks
[OpaquePtr] Create API to make a copy of a PointerType with some address space

Some existing places use getPointerElementType() to create a copy of a
pointer type with some new address space.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103429
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
The file was modifiedllvm/include/llvm/IR/DerivedTypes.h
The file was modifiedllvm/unittests/IR/TypesTest.cpp
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp