FailedChanges

Summary

  1. [clang-tidy] Silence unused variable warning in Release builds. NFCI. (details)
  2. Make sure Objective-C category support in IncludeSorter handles top-level imports (details)
  3. [ARM][SchedModels] Move IsLDMBaseRegInListPred to ARMSchedule.td. NFC (details)
  4. Add release tarballs for libclc (details)
  5. SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef (details)
  6. [clangd] Add back dependency on proto generated targets (details)
  7. Fix SROA with a PHI mergig values from a same block (details)
  8. [BitCode] decode nossp fn attr (details)
  9. llvm-reduce: Test reduction for D88684 ( ee6e25e4391a6d3ac0a3c89615474e512f44cda6 ) (details)
  10. [GWP-ASan] Refactor memory mapping functions (details)
  11. [libc++] NFC: Minor refactoring in filesystem_test_helper.h to ease readability (details)
  12. [InstCombine] reduce code duplication in icmp intrinsic folds; NFC (details)
  13. [InstCombine] add tests for ctpop at bitwidth limit; NFC (details)
  14. [InstCombine] add folds for icmp+ctpop (details)
  15. [AIX] Also error on -G for link-only step (details)
  16. [MemProf] Decouple memprof build from COMPILER_RT_BUILD_SANITIZERS (details)
  17. [libc++] Get rid of <iostream> in a filesystem test (details)
  18. Avoid unnecessary uses of `MDNode::getTemporary`, NFC (details)
  19. Test to check backtraces with machine function splitting. (details)
  20. [NFC] Remove max_align.c LIT testcase (details)
  21. [libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows (details)
  22. Prepend "__uniq" to symbol names hash with -funique-internal-linkage-names. (details)
  23. Run test only if X86 target is available (details)
  24. [AMDGPU] Use flat scratch instructions where available (details)
Commit 26750a1264b3df114a1efae7cde6f0784206b2ce by benny.kra
[clang-tidy] Silence unused variable warning in Release builds. NFCI.

ExpandModularHeadersPPCallbacks.cpp:55:15: warning: unused variable 'FileEntry'
    for (auto FileEntry : FilesToRecord)
              ^
The file was modifiedclang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
Commit 1e076a8d8099a6c179c8773f2e621f9408ee2402 by joeturner
Make sure Objective-C category support in IncludeSorter handles top-level imports

Currently, this would not correctly associate a category with the related include if it was top-level (i.e. no slashes in the path). This ensures that we explicitly think about that case.

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D89608
The file was modifiedclang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
The file was modifiedclang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp
Commit a28388f95beb029241b4ab221b279698a5559f82 by eleviant
[ARM][SchedModels] Move IsLDMBaseRegInListPred to ARMSchedule.td. NFC

This predicate is not specific to cortex-a57 and can be used in other processor
models as well.
The file was modifiedllvm/lib/Target/ARM/ARMSchedule.td
The file was modifiedllvm/lib/Target/ARM/ARMScheduleA57.td
Commit 139785dc98ae94717eebaed083eeaad5d775b495 by aaronpuchert
Add release tarballs for libclc

Fixes PR47917.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D90100
The file was modifiedllvm/utils/release/export.sh
Commit 22e6b1863e74136908842d71b4f942313d89b273 by Duncan P. N. Exon Smith
SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

4dc5573acc0d2e7c59d8bac2543eb25cb4b32984 added `FileEntryRef` in order to
help enable sharing of a `FileManager` between `CompilerInstance`s.

It also added a `StringRef` with the filename on `FileInfo`. This
doubled `sizeof(FileInfo)`, bloating `sizeof(SLocEntry)`, of which we
have one for each (loaded and unloaded) file and macro expansion. This
causes a memory regression in modules builds.

Move the filename down into the `ContentCache`, which is a side data
structure for `FileInfo` that does not impact `sizeof(SLocEntry)`. Once
`FileEntryRef` is used for `ContentCache::OrigEntry` this can go away.

Differential Revision: https://reviews.llvm.org/D89580
Radar-Id: rdar://59908826
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
Commit d071bba9a4477290d0b164a2d338fb22ad2d3c3d by kbobyrev
[clangd] Add back dependency on proto generated targets

Previous attempts:

* 15f6bad6d74a993e366c8fc93a9c91f213ac6bc3
* 58d0ef2d0466a893ab400f6a9829057b9d851038

The combination results in both link- and build-time dependency which is
the desired behavior.
The file was modifiedclang-tools-extra/clangd/index/remote/CMakeLists.txt
Commit 00928a1956a1618f394ffe99fc63b0d81e1f88c7 by Stanislav.Mekhanoshin
Fix SROA with a PHI mergig values from a same block

This fixes the bug 47945. It is legal to have a PHI with values
from from the same block, but values must stay the same. In this
case it is illegal to merge different values.

Differential Revision: https://reviews.llvm.org/D89978
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was modifiedllvm/test/Transforms/SROA/phi-gep.ll
Commit 0b11d018cc2f2c6bea5dac8dc72140cdb502ca02 by ndesaulniers
[BitCode] decode nossp fn attr

I missed this in https://reviews.llvm.org/D87956.

Reviewed By: void

Differential Revision: https://reviews.llvm.org/D90177
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/test/Bitcode/attributes.ll
Commit 56a5b4b1bfafa27dcc0fe48a3095ebc19ac26256 by dblaikie
llvm-reduce: Test reduction for D88684 ( ee6e25e4391a6d3ac0a3c89615474e512f44cda6 )
The file was modifiedllvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll
Commit 612e02ee8c3e8f204378796af2eb526cf5e348f0 by kostyak
[GWP-ASan] Refactor memory mapping functions

In preparation for Fuchsia support, this CL refactors the memory
mapping functions.

The new functions are as follows:
- for Freeslots and Metadata:
  `void *map(size_t Size, const char *Name) const;`
  `void unmap(void *Ptr, size_t Size) const;`
- for the Pool:
  `void *reservePool(size_t Size);`
  `void commitPool(void *Ptr, size_t Size) const;`
  `void decommitPool(void *Ptr, size_t Size) const;`
  `void unreservePool();`
  Note that those don't need a `Name` parameter as those are fixed per
  function. `{reserve,unreserve}Pool` are not `const` because they will
  modify platform specific class member on Fuchsia.

I added a plethora of `assert()` as the initial code was not enforcing
page alignment for sizes and addresses, which caused problem in the
initial Fuchsia draft. All sizes should now be properly rounded up to
a page.

Differential Revision: https://reviews.llvm.org/D89993
The file was modifiedcompiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.h
Commit b03ea054db1bcf9452b3a70e21d3372b6e58759a by Louis Dionne
[libc++] NFC: Minor refactoring in filesystem_test_helper.h to ease readability

The variable declarations interleaved with logic was really difficult
to read. Instead, simply have two different implementations for _WIN32
and others.
The file was modifiedlibcxx/test/support/filesystem_test_helper.h
Commit 437d7551c50d6ea60264b7971bd61b7fd308618b by spatel
[InstCombine] reduce code duplication in icmp intrinsic folds; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 05f011b2b6e5992b1637bf306a7f61c17fde83b0 by spatel
[InstCombine] add tests for ctpop at bitwidth limit; NFC
The file was modifiedllvm/test/Transforms/InstCombine/cmp-intrinsic.ll
Commit 5a6e66ec72382d370046e04c415f8c3cb7e8b68d by spatel
[InstCombine] add folds for icmp+ctpop

https://alive2.llvm.org/ce/z/XjFPQJ

  define void @src(i64 %value) {
    %t0 = call i64 @llvm.ctpop.i64(i64 %value)
    %gt = icmp ugt i64 %t0, 63
    %lt = icmp ult i64 %t0, 64
    call void @use(i1 %gt, i1 %lt)
    ret void
  }

  define void @tgt(i64 %value) {
    %eq = icmp eq i64 %value, -1
    %ne = icmp ne i64 %value, -1
    call void @use(i1 %eq, i1 %ne)
    ret void
  }

  declare i64 @llvm.ctpop.i64(i64) #1
  declare void @use(i1, i1)
The file was modifiedllvm/test/Transforms/InstCombine/cmp-intrinsic.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 3d4aebbb9d99642fcc277c8bd199ead400de2703 by Xiangling.Liao
[AIX] Also error on -G for link-only step

Error on -G on AIX for all modes(preprocess, assemble, compile, link).

Differential Revision: https://reviews.llvm.org/D90063
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/aix-err-options.c
Commit ba71a0746f31a2f5f9af992f569a9418133a9a38 by tejohnson
[MemProf] Decouple memprof build from COMPILER_RT_BUILD_SANITIZERS

The MemProf compiler-rt support relies on some of the support only built
when COMPILER_RT_BUILD_SANITIZERS was enabled. This showed up in some
initial bot failures, and I addressed those by making the memprof
runtime build also conditional on COMPILER_RT_BUILD_SANITIZERS
(3ed77ecd0a5d5e5c33770f0f9d3d75cf2f80c80b). However, this resulted in
another inconsistency with how the tests were set up that was hit by
Chromium:
  https://bugs.chromium.org/p/chromium/issues/detail?id=1142191

Undo the original bot fix and address this with a more comprehensive fix
that enables memprof to be built even when COMPILER_RT_BUILD_SANITIZERS
is disabled, by also building the necessary pieces under
COMPILER_RT_BUILD_MEMPROF.

Tested by configuring with a similar command as to what was used in the
failing Chromium configure. I reproduced the Chromium failure, as well
as the original bot failure I tried to fix in
3ed77ecd0a5d5e5c33770f0f9d3d75cf2f80c80b, with that fix reverted.
Confirmed it now works.

Differential Revision: https://reviews.llvm.org/D90190
The file was modifiedcompiler-rt/lib/CMakeLists.txt
The file was modifiedcompiler-rt/include/CMakeLists.txt
Commit 89ec5091cc95e062712f544167abd692c9092f7f by Louis Dionne
[libc++] Get rid of <iostream> in a filesystem test
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
Commit d4c667c9af0335ac20015decce204c43f03a6cee by Duncan P. N. Exon Smith
Avoid unnecessary uses of `MDNode::getTemporary`, NFC

This is a long-delayed follow-up to
5e5b85098dbeaea2cfa5d01695b5d2982634d7dd.

`TempMDNode` includes a bunch of machinery for RAUW, and should only be
used when necessary. RAUW wasn't being used in any of these cases... it
was just a placeholder for a self-reference.

Where the real node was using `MDNode::getDistinct`, just replace the
temporary argument with `nullptr`.

Where the real node was using `MDNode::get`, the `replaceOperandWith`
call was "promoting" the node to a distinct one implicitly due to
self-reference detection in `MDNode::handleChangedOperand`. The
`TempMDNode` was serving a purpose by delaying uniquing, but it's way
simpler to just call `MDNode::getDistinct` in the first place.

Note that using a self-reference at all in these places is a hold-over
from before `distinct` metadata existed. It was an old trick to create
distinct nodes. It would be intrusive to change, including bitcode
upgrades, etc., and it's harmless so I'm not sure there's much value in
removing it from existing schemas. After this commit it still has a tiny
memory cost (in the extra metadata operand) but no more overhead in
construction.

Differential Revision: https://reviews.llvm.org/D90079
The file was modifiedllvm/lib/Analysis/LoopInfo.cpp
The file was modifiedclang/lib/CodeGen/CGLoopInfo.cpp
The file was modifiedllvm/lib/IR/MDBuilder.cpp
The file was modifiedpolly/lib/CodeGen/IRBuilder.cpp
Commit 9aa7a721ce3dc84d0ad2d987af72cf14ff76d8a7 by tmsriram
Test to check backtraces with machine function splitting.

clang supports option -fsplit-machine-functions and this test checks if the
backtraces are sane when functions are split.

With -fsplit-machine-functions, a function with profiles can get split into 2
parts, the original function containing hot code and a cold part as determined
by the profile info and the cold cutoff threshold.. The cold part gets the
".cold" suffix to disambiguate its symbol from the hot part and can be placed
arbitrarily in the address space.

This test checks if the back-trace looks correct when the cold part is executed.

Differential Revision: https://reviews.llvm.org/D90081
The file was addedlldb/test/Shell/Unwind/Inputs/split-machine-functions.ll
The file was addedlldb/test/Shell/Unwind/split-machine-functions.test
Commit 357715ce97d0bc937301b0b006d145c24a9d23aa by Xiangling.Liao
[NFC] Remove max_align.c LIT testcase

Since we fixed the definition of `SuitableAlign`[https://reviews.llvm.org/D88659],
`max_align_t` and `__BIGGEST_ALIGNMENT__` are not necessarily the same always.

The original testcase was added here: https://reviews.llvm.org/D59048

Differential Revision: https://reviews.llvm.org/D90187
The file was removedclang/test/Headers/max_align.c
Commit df6d2e8ab1a4212284e4763724a2211df2c7394a by martin
[libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows

It's not worth trying to fix these warnings within libunwind, instead
silence them.

Differential Revision: https://reviews.llvm.org/D90075
The file was modifiedlibunwind/CMakeLists.txt
Commit ad1b9daa4bf40c1907794fd5de7807aad1f0553c by tmsriram
Prepend "__uniq" to symbol names hash with -funique-internal-linkage-names.

Prepend the module name hash with a fixed string ".__uniq." which helps tools
that consume sampled profiles and attribute it to functions to understand
that this symbol belongs to a unique internal linkage type symbol.

Symbols with suffixes can result from various optimizations in the compiler.
Function Multiversioning, function splitting, parameter constant propogation,
unique internal linkage names.

External tools like sampled profile aggregators combine profiles from multiple
runs of a binary. They use various heuristics with symbols that have suffixes
to try and attribute the profile to the right function instance. For instance
multi-versioned symbols like foo.avx, foo.sse4.2, etc even though different
should be attributed to the same source function if a single function is
versioned, using attribute target_clones (supported in GCC but yet to land in
LLVM). Similarly, functions that are split (split part having a .cold suffix)
could have profiles for both the original and split symbols but would be
aggregated and attributed to the original function that was split.

Unique internal linkage functions however have different source instances and
the aggregator must not put them together but attribute it to the appropriate
function instance. To be sure that we are dealing with a symbol of a unique
internal linkage function, we would like to prepend the hash with a known
string ".__uniq." which these tools can check to understand the suffix type.

Differential Revision: https://reviews.llvm.org/D89617
The file was modifiedclang/test/CodeGen/unique-internal-linkage-names.cpp
The file was modifiedllvm/test/Transforms/UniqueInternalLinkageNames/unique_symbol_names.ll
The file was modifiedllvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp
Commit c551ba0e90bd2b49ef501d591f8362ba44e5484d by kiran.chandramohan
Run test only if X86 target is available

This fixes failures in AArch64 buildbots by running the
clang/test/CodeGen/X86/att-inline-asm-prefix.c only when the X86
target is available.
The file was modifiedclang/test/CodeGen/X86/att-inline-asm-prefix.c
Commit 038d884a50a4e72d3f65a315d28d35bda024cb4a by Stanislav.Mekhanoshin
[AMDGPU] Use flat scratch instructions where available

The support is disabled by default. So far there is instruction
selection, spilling, and frame elimination. It also changes SP
from unswizzled to swizzled as used by flat scratch instructions,
so it cannot be mixed with MUBUF stack access.

At the very least missing:

- GlobalISel;
- Some optimizations in frame elimination in between vector
  and scalar ALU;
- It shall finally allow to always materialize frame index
  as an SGPR, but that is not implemented and frame elimination
  cannot handle it yet;
- Unaligned and/or multidword flat scratch shall work, but it
  is legalized now for MUBUF;
- Operand folding cannot optimize FI like with MUBUF yet;
- It will need scaling the value of the SP/FP in the DWARF
  expression to recover the unswizzled scratch address;

Differential Revision: https://reviews.llvm.org/D89170
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/load-lo16.ll
The file was addedllvm/test/CodeGen/AMDGPU/flat-scratch.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/load-hi16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/multi-dword-vgpr-spill.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/lib/Target/AMDGPU/FLATInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr-gfx9.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.td
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.h
The file was modifiedllvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/frame-index-elimination.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-hi16.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/scratch-simple.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memcpy-fixed-align.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sgpr-spill.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.h
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-scavenge-vgpr-spill.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/call-preserved-registers.ll