FailedChanges

Summary

  1. [clang-scan-deps] Support clang-cl (details)
  2. [libc++] Consistently replace `::new(__p) T` with `::new ((void*)__p) T`. NFCI. (details)
  3. [libc++] ADL-proof <functional> by adding _VSTD:: qualification on calls. (details)
  4. [NFC][SimplifyCFG] Add another miscompiled test for PR48450 (details)
  5. [NFC][SimplifyCFG] FoldBranchToCommonDest(): pull out 'common successor' into a variable (details)
  6. [SimplifyCFG] FoldBranchToCommonDest(): temporairly put back restrictions on liveout uses of bonus instructions (PR48450) (details)
  7. [ASTImporter] Fix import of a typedef that has an attribute (details)
  8. [MLIR][SPIRV] Refactoring serialization and deserialization (details)
  9. [PowerPC] Restore stack ptr from frame ptr with setjmp (details)
  10. lld/ELF: Parse MSP430 BFD/emulation names (details)
  11. [TableGen] Fixed 64-bit filters being sliced to 32 bits in FixedLenDecoderEmitter (details)
  12. [NFC] Remove trailing whitespace in llvm/CMakeLists.txt (details)
  13. [NFCI][Thumb2] Regenerate MVE tests i missed in 59560e85897afc50090b6c3d920bacfd28b49d06 (details)
  14. [amdgpu] Fix a crash case when `V_CNDMASK` could be simplified. (details)
Commit 640ad769110f76d3391667249478ece88c835529 by sylvain.audi
[clang-scan-deps] Support clang-cl

clang-scan-deps contains some command line parsing and modifications.
This patch adds support for clang-cl command options.

Differential Revision: https://reviews.llvm.org/D92191
The file was modifiedclang/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json
The file was modifiedclang/test/ClangScanDeps/modules-full.cpp
The file was modifiedclang/test/ClangScanDeps/no-werror.cpp
The file was addedclang/test/ClangScanDeps/Inputs/modules_cdb_clangcl.json
The file was modifiedclang/test/ClangScanDeps/error.cpp
The file was modifiedclang/test/ClangScanDeps/Inputs/headerwithdirnamefollowedbyinclude.json
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp
The file was modifiedclang/test/ClangScanDeps/Inputs/static-analyzer-cdb.json
The file was modifiedclang/test/ClangScanDeps/Inputs/strip_diag_serialize.json
The file was modifiedclang/test/ClangScanDeps/Inputs/no-werror.json
The file was modifiedclang/test/ClangScanDeps/vfsoverlay.cpp
The file was modifiedclang/test/ClangScanDeps/modules.cpp
The file was addedclang/test/ClangScanDeps/Inputs/regular_cdb_clangcl.json
The file was modifiedclang/test/ClangScanDeps/Inputs/target-filename-cdb.json
The file was modifiedclang/test/ClangScanDeps/static-analyzer.c
The file was modifiedclang/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json
The file was modifiedclang/test/ClangScanDeps/Inputs/headerwithdirname.json
The file was modifiedclang/test/ClangScanDeps/headerwithdirname.cpp
The file was modifiedclang/test/ClangScanDeps/regular_cdb.cpp
The file was modifiedclang/test/ClangScanDeps/target-filename.cpp
The file was modifiedclang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp
The file was modifiedclang/test/ClangScanDeps/has_include_if_elif.cpp
The file was modifiedclang/test/ClangScanDeps/strip_diag_serialize.cpp
The file was modifiedclang/test/ClangScanDeps/header_stat_before_open.m
The file was modifiedclang/test/ClangScanDeps/Inputs/has_include_if_elif.json
Commit be4c657b010c3fd850ca5cfcee0f96b464740523 by arthur.j.odwyer
[libc++] Consistently replace `::new(__p) T` with `::new ((void*)__p) T`. NFCI.

Everywhere, normalize the whitespace to `::new (EXPR) T`.
Everywhere, normalize the spelling of the cast to `(void*)EXPR`.

Without the cast to `(void*)`, the expression triggers ADL on GCC.
(I think this is a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98249)
Even if it doesn't trigger ADL, it still seems incorrect to use any argument
that's not exactly `(void*)` because that opens the possibility of overload
resolution picking a user-defined overload of `operator new`, which would be
wrong.

Differential Revision: https://reviews.llvm.org/D93153
The file was modifiedlibcxx/include/future
The file was modifiedlibcxx/include/optional
The file was modifiedlibcxx/include/__debug
The file was addedlibcxx/test/std/algorithms/robust_against_adl_on_new.pass.cpp
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/include/functional
The file was modifiedlibcxx/include/memory
The file was modifiedlibcxx/include/__functional_03
The file was modifiedlibcxx/include/valarray
Commit 3c8e31e17b85c3d24ade9053d56c1998b4dd28cd by arthur.j.odwyer
[libc++] ADL-proof <functional> by adding _VSTD:: qualification on calls.

- std::reference_wrapper
- std::function
- std::mem_fn

While I'm here, remove _VSTD:: qualification from calls to `declval`
because it takes no arguments and thus isn't susceptible to ADL.

Differential Revision: https://reviews.llvm.org/D92884
The file was modifiedlibcxx/include/__functional_base_03
The file was addedlibcxx/test/std/utilities/function.objects/func.memfn/robust_against_adl.pass.cpp
The file was addedlibcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/robust_against_adl.pass.cpp
The file was modifiedlibcxx/include/functional
The file was addedlibcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/robust_against_adl.pass.cpp
The file was modifiedlibcxx/include/__functional_base
Commit effbbdec6e954798b8ae6a5f3c5cd45995a0a2eb by lebedev.ri
[NFC][SimplifyCFG] Add another miscompiled test for PR48450
The file was modifiedllvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
Commit e8360a8e1e78edded1f6e95a7fdbac55fe42285f by lebedev.ri
[NFC][SimplifyCFG] FoldBranchToCommonDest(): pull out 'common successor' into a variable

Makes it easier to use it elsewhere
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 59560e85897afc50090b6c3d920bacfd28b49d06 by lebedev.ri
[SimplifyCFG] FoldBranchToCommonDest(): temporairly put back restrictions on liveout uses of bonus instructions (PR48450)

Even though d38205144febf4dc42c9270c6aa3d978f1ef65e1 was mostly a correct
fix for the external non-PHI users, it's not a *generally* correct fix,
because the 'placeholder' values in those trivial PHI's we create
shouldn't be *always* 'undef', but the PHI itself for the backedges,
else we end up with wrong value, as the `@pr48450_2` test shows.

But we can't just do that, because we can't check that the PHI
can be it's own incoming value when coming from certain predecessor,
because we don't have a dominator tree.

So until we can address this correctness problem properly,
ensure that we don't perform the transformation
if there are such problematic external uses.

Making dominator tree available there is going to be involved,
since `-simplifycfg` pass currently does not preserve/update domtree...
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/LoopUnroll/peel-loop-inner.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
Commit 68f53960e17d93c3a2727164dac4e54140bd98ba by gabor.marton
[ASTImporter] Fix import of a typedef that has an attribute

The import of a typedefs with an attribute uses clang::Decl::setAttrs().
But that needs the ASTContext which we can get only from the
TranslationUnitDecl. But we can get the TUDecl only thourgh the
DeclContext, which is not set by the time of the setAttrs call.

Fix: import the attributes only after the DC is surely imported.
Btw, having the attribute import initiated from GetImportedOrCreateDecl was
fundamentally flawed. Now that is implicitly fixed.

Differential Revision: https://reviews.llvm.org/D92962
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit ecab63894bb5aebcbbe694839779f346e6fbe9e2 by antiagainst
[MLIR][SPIRV] Refactoring serialization and deserialization

This commit splits SPIR-V's serialization and deserialization code
into separate libraries. The motiviation being that the serializer
is used more often the deserializer and therefore lumping them
together unnecessarily increases binary size for the most common
case.

This commit also moves these libraries into the Target/ directory
to follow MLIR convention.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D91548
The file was addedmlir/lib/Target/SPIRV/Serialization.cpp
The file was removedmlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
The file was addedmlir/lib/Target/SPIRV/TranslateRegistration.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was addedmlir/lib/Target/SPIRV/Deserialization.cpp
The file was removedmlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
The file was removedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/CMakeLists.txt
The file was addedmlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
The file was removedmlir/include/mlir/Dialect/SPIRV/Serialization.h
The file was addedmlir/include/mlir/Target/SPIRV/Deserialization.h
The file was removedmlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
The file was modifiedmlir/lib/Target/CMakeLists.txt
The file was removedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was addedmlir/include/mlir/Target/SPIRV/Serialization.h
The file was removedmlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
The file was addedmlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
Commit bfdc19e77868b849b5c636bf0512970264aef571 by nemanja.i.ibm
[PowerPC] Restore stack ptr from frame ptr with setjmp

If a function happens to:

- call setjmp
- do a 16-byte stack allocation
- call a function that sets up a stack frame and longjmp's back

The stack pointer that is restores by setjmp will no longer point to a valid
back chain. According to the ABI, stack accesses in such a function are to be
frame pointer based - so it is an error (quite obviously) to restore the stack
from the back chain.
We already restore the stack from the frame pointer when there are calls to
fast_cc functions. We just need to also do that when there are calls to setjmp.
This patch simply does that.

This was pointed out by the Julia team.

Differential revision: https://reviews.llvm.org/D92906
The file was modifiedllvm/lib/Target/PowerPC/PPCFrameLowering.cpp
The file was addedllvm/test/CodeGen/PowerPC/stack-restore-with-setjmp.ll
Commit 92c6141ce6a954aa866bba8e53850e7dd9d9abb6 by i
lld/ELF: Parse MSP430 BFD/emulation names

Follow the naming set by TI's own GCC-based toolchain.
Also, force the `osabi` field to `ELFOSABI_STANDALONE`, this matches GNU LD's output (the patching is done in `elf32_msp430_post_process_headers`).

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D92931
The file was addedlld/test/ELF/emulation-msp430.s
The file was modifiedlld/ELF/ScriptParser.cpp
The file was modifiedlld/ELF/Driver.cpp
Commit d784845de1f0c97a053aab281985fa4be40fcc87 by Cameron.Desrochers
[TableGen] Fixed 64-bit filters being sliced to 32 bits in FixedLenDecoderEmitter

When using the FixedLenDecoderEmitter, llvm-tblgen emits tables with (OPC_ExtractField, OPC_ExtractFilterValue) opcode sequences to match the contiguous fixed bits of a given instruction's encoding. This encoding is represented in a 64-bit integer. However, the filter values were represented in a 32-bit integer. As such, instructions with fixed 64-bit encodings resulted in a table with an OPC_ExtractField for all 64 bits, followed by an OPC_ExtractFilterValue containing just the low 32 bits of their encoding, causing the filter never to match.

The exact point at which the slicing occurred was during the map insertion at line 630.

Differential Revision: https://reviews.llvm.org/D92423
The file was modifiedllvm/utils/TableGen/FixedLenDecoderEmitter.cpp
Commit 90b951dd6801f981a8130b7d743b667066fc0ff5 by Tony.Tye
[NFC] Remove trailing whitespace in llvm/CMakeLists.txt

Differential Revision: https://reviews.llvm.org/D93234
The file was modifiedllvm/CMakeLists.txt
Commit cae2d871c05ac5dcf15f0a8429dd730c1551cdbc by lebedev.ri
[NFCI][Thumb2] Regenerate MVE tests i missed in 59560e85897afc50090b6c3d920bacfd28b49d06
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float16regloops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float32regloops.ll
Commit 1fd1f638b68ca4a9cf3bd071a7cba0bac0b189c6 by michael.hliao
[amdgpu] Fix a crash case when `V_CNDMASK` could be simplified.

- Once an instruction is simplified, foldable candidates from it should
  be invalidated or skipped as the operand index is no longer valid.

Differential Revision: https://reviews.llvm.org/D93174
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
The file was addedllvm/test/CodeGen/AMDGPU/fold-cndmask-wave32.mir