FailedChanges

Summary

  1. [SelectionDAG] Remove repeated getOperand() call. NFC. (details)
  2. [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use (details)
  3. [libcxx testing] Stop using arbitrary timeouts in one test (details)
  4. IPDBRawSymbol.h - reduce StringRef.h include to forward declaration. NFC. (details)
  5. IPDBRawSymbol.h - remove already declared forward declarations. NFC. (details)
  6. Architecture.h - reduce includes to forward declarations. NFC. (details)
  7. ArchitectureSet.h - reduce raw_ostream.h include to forward declaration. NFC. (details)
  8. ArchitectureSet.h - add missing <tuple> include. (details)
  9. TBEHandler.h - remove unnecessary VersionTuple forward declaration. NFC. (details)
  10. [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace (details)
  11. PackedVersion.h - reduce includes to forward declarations. NFC. (details)
  12. [SelectionDAG] ComputeNumSignBits - use Valid Min/Max shift amount helpers directly. NFCI. (details)
  13. [TargetLowering] SimplifyDemandedBits - remove shift amount clamps from getValidShiftAmountConstant calls. NFC. (details)
  14. SafeStackLayout.cpp - remove includes directly defined in SafeStackLayout.h module header. NFC. (details)
  15. CriticalAntiDepBreaker.cpp - remove includes directly defined in CriticalAntiDepBreaker.h header. NFC. (details)
  16. SafeStackColoring.h - reduce Instructions.h include to forward declaration. NFC. (details)
  17. [BasicAA] Use known lower bounds for index values for size based check. (details)
  18. [lldb] Pass -fPIC flag even when DYLIB_ONLY is set (details)
  19. [DSE] Remove noop stores in MSSA. (details)
  20. [LoopUnroll] Fix build failure for allyesconfig. (details)
  21. [clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros (details)
  22. [Tests] Convert last statepoint lowering tests to bundle format (details)
  23. [LoopUnroll] Add a test case for rG7873376bb36b. (details)
  24. [X86] Factor constant pool comment printing out of the switch in X86AsmPrinter::emitInstruction. NFC (details)
  25. [X86] Minor cleanups to addShuffleComments in X86MCInstPrinter.cpp. NFCI (details)
  26. Remove some non-determinism from the `Darwin/duplicate_os_log_reports.cpp` test. (details)
  27. [Driver] Fix BooleanFFlag identifiers to use 'f' 'fno_' prefixes instead of suffixes (details)
  28. [X86] Add pseudo instructions to use MULX with a single destination when the low result isn't used. (details)
Commit 81b50a782375cb0c1a4541e6b5bac01c617fd20a by llvm-dev
[SelectionDAG] Remove repeated getOperand() call. NFC.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit bd85b7d6688725e854a694f9f3e8baa6a3077a4a by alexey.bader
[OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use

Summary:
Do not ask size of type if it is dependent. ASTContext doesn't seem expecting
this.

Reviewers: jdoerfert, ABataev, bader

Reviewed By: ABataev

Subscribers: yaxunl, guansong, ebevhan, Anastasia, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80829
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
Commit 1c4238e7a00b28043e209d0b2c0dda76ee5af82e by dave
[libcxx testing] Stop using arbitrary timeouts in one test

On a busy and/or slow system, 100ms might not be long enough. Instead,
we now use atomic variables to communicate between threads.
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp
Commit f5a59bea4ff9369c6dfcf947c7a58a9d570491b9 by llvm-dev
IPDBRawSymbol.h - reduce StringRef.h include to forward declaration. NFC.
The file was modifiedllvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
Commit f75e91fa131cd91efdb0935d163d8858390f459a by llvm-dev
IPDBRawSymbol.h - remove already declared forward declarations. NFC.

PDBTypes.h holds most PDB forward declarations already, move IPDBSession in there as well.
The file was modifiedllvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
The file was modifiedllvm/include/llvm/DebugInfo/PDB/PDBTypes.h
Commit a8eb06ccffdd3ee1b004be489cf9a970035c523c by llvm-dev
Architecture.h - reduce includes to forward declarations. NFC.

Move includes to Architecture.cpp.
The file was modifiedllvm/lib/TextAPI/MachO/Architecture.cpp
The file was modifiedllvm/include/llvm/TextAPI/MachO/Architecture.h
Commit d1765cf1974bdf298d7cec8302013f314a70a032 by llvm-dev
ArchitectureSet.h - reduce raw_ostream.h include to forward declaration. NFC.

Move raw_ostream.h include to ArchitectureSet.cpp.
The file was modifiedllvm/include/llvm/TextAPI/MachO/ArchitectureSet.h
The file was modifiedllvm/lib/TextAPI/MachO/ArchitectureSet.cpp
Commit 5a918b7e134cbaa29d272ed38c5dabcecac8aac8 by llvm-dev
ArchitectureSet.h - add missing <tuple> include.

MSVC seems to implicitly include this from <utility> but other toolchains don't
The file was modifiedllvm/include/llvm/TextAPI/MachO/ArchitectureSet.h
Commit 0f461c39df70a0b555745770a445850e39e1dff7 by llvm-dev
TBEHandler.h - remove unnecessary VersionTuple forward declaration. NFC.

We already have to include VersionTuple.h
The file was modifiedllvm/include/llvm/TextAPI/ELF/TBEHandler.h
Commit 50bdd60731130dbde81fa477ba8916c58039d73a by mydeveloperday
[clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace

Summary:
https://bugs.llvm.org/show_bug.cgi?id=46130   from Twitter https://twitter.com/ikautak/status/1265998988232159232

I have seen this myself many times.. if you have format on save and you work in an editor where you are constantly saving (:w muscle memory)

If you are in the middle of editing and somehow you've missed a { or } in your code, somewhere, often way below where you are at the bottom of your file the namespace comment fixer will have put the namespace on the previous closing brace.

This leads to you having to fix up the bottom of the file.

This revision prevents that happening by performing an initial pass of the tokens and simply counting the number of `{` and `}`  and ensuring they balance.

If they don't balance we don't do any namespace fixing as it will likely be unstable and incorrect.

Reviewed By: curdeius

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D80830
The file was modifiedclang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
The file was modifiedclang/lib/Format/NamespaceEndCommentsFixer.cpp
Commit 179f8ad08de07d52dbccd4da339103a4d03937c7 by llvm-dev
PackedVersion.h - reduce includes to forward declarations. NFC.
The file was modifiedllvm/include/llvm/TextAPI/MachO/PackedVersion.h
Commit 9d0bfcec8377acc29e8a9983e8343dba8e7e900d by llvm-dev
[SelectionDAG] ComputeNumSignBits - use Valid Min/Max shift amount helpers directly. NFCI.

We are calling getValidShiftAmountConstant first followed by getValidMinimumShiftAmountConstant/getValidMaximumShiftAmountConstant if that failed. But both are used in the same way in ComputeNumSignBits and the Min/Max variants call getValidShiftAmountConstant internally anyhow.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 63824ad94778c54c4c17210591448af746d092ad by llvm-dev
[TargetLowering] SimplifyDemandedBits - remove shift amount clamps from getValidShiftAmountConstant calls. NFC.

getValidShiftAmountConstant only returns a value if the shift amount is in range, so we don't need to check it again.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit e5bc07634d6277bd2e071511d1b826950016972c by llvm-dev
SafeStackLayout.cpp - remove includes directly defined in SafeStackLayout.h module header. NFC.
The file was modifiedllvm/lib/CodeGen/SafeStackLayout.cpp
Commit 2b881f7911d585086a92fdb57e93109c432be1fb by llvm-dev
CriticalAntiDepBreaker.cpp - remove includes directly defined in CriticalAntiDepBreaker.h header. NFC.
The file was modifiedllvm/lib/CodeGen/CriticalAntiDepBreaker.cpp
Commit e6aba43cda848f4a8cfa5ce9f174b77def10e9df by llvm-dev
SafeStackColoring.h - reduce Instructions.h include to forward declaration. NFC.

SafeStackColoring.cpp - remove includes directly defined in SafeStackColoring.h header. NFC.
The file was modifiedllvm/lib/CodeGen/SafeStackColoring.h
The file was modifiedllvm/lib/CodeGen/SafeStackColoring.cpp
Commit d99a1848c4f8ca164c0c0768e10eafc850b2a68a by flo
[BasicAA] Use known lower bounds for index values for size based check.

Currently, BasicAA does not exploit information about value ranges of
indexes. For example, consider the 2 pointers %a = %base and
%b = %base + %stride below, assuming they are used to access 4 elements.

If we know that %stride >= 4, we know the accesses do not alias. If
%stride is a constant, BasicAA currently gets that. But if the >= 4
constraint is encoded using an assume, it misses the NoAlias.

This patch extends DecomposedGEP to include an additional MinOtherOffset
field, which tracks the constant offset similar to the existing
OtherOffset, which the difference that it also includes non-negative
lower bounds on the range of the index value. When checking if the
distance between 2 accesses exceeds the access size, we can use this
improved bound.

For now this is limited to using non-negative lower bounds for indices,
as this conveniently skips cases where we do not have a useful lower
bound (because it is not constrained). We potential miss out in cases
where the lower bound is constrained but negative, but that can be
exploited in the future.

Reviewers: sanjoy, hfinkel, reames, asbirlea

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D76194
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/test/Analysis/BasicAA/bug.23626.ll
The file was modifiedllvm/test/Analysis/BasicAA/assume-index-positive.ll
Commit fd0ab3b3eb88de3fe4792c34b50084595e22d68d by Raphael Isemann
[lldb] Pass -fPIC flag even when DYLIB_ONLY is set

Summary:
It seems that when we rewrite a few rules to only build a dylib (i.e., when DYLIB_ONLY is set),
the rule for setting the CFLAGS for the dylib's object file compilation will no longer work. From what I can
see this is because in DYLIB_ONLY mode we pretend to compile the main executable so
the DYLIB_OBJECTS scope is actually never used.

This patch makes `-fPIC` unstopped if DYLIB_ONLY is set so that -fPIC actually ends up in the
CFLAGS for the dylib object file compilation.

The test for this is D80798 which only compiles on Linux with this patch.

Reviewers: friss, labath

Reviewed By: friss

Subscribers: JDevlieghere

Differential Revision: https://reviews.llvm.org/D80789
The file was modifiedlldb/packages/Python/lldbsuite/test/make/Makefile.rules
Commit 065bf124fde8fd9d37eba0a387833cdfe9e68d08 by zoecarver
[DSE] Remove noop stores in MSSA.

Adds a simple fast-path check for the pattern:
v = load ptr
store v to ptr

I took the tests from the bugzilla post, I can add more if needed (but I think these should be sufficent).

Refs: https://bugs.llvm.org/show_bug.cgi?id=45795

Differential Revision: https://reviews.llvm.org/D79391
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/atomic.ll
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was addedllvm/test/Transforms/DeadStoreElimination/MSSA/noop-stores.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple-todo.ll
Commit 7873376bb36b4f9646fbc26d6da88e2edbf796e4 by whitneyt
[LoopUnroll] Fix build failure for allyesconfig.

Differential Revision: https://reviews.llvm.org/D80477.
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
Commit 44119626dedfebe245fe6ce26487949201299d38 by n.james93
[clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros

Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42635 | readability-identifier-naming option MacroDefinitionCase should ignore macros passed as parameters. ]]

Reviewers: aaron.ballman, alexfh, gribozavr2, hokein

Reviewed By: aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80631
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
Commit dfa82f8af446380d033a1d568273e82318ecce0e by listmail
[Tests] Convert last statepoint lowering tests to bundle format
The file was modifiedllvm/test/CodeGen/X86/statepoint-invoke.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-live-in.ll
Commit 0fee91a187d98ad68d70fb42dad4451fce172a23 by whitneyt
[LoopUnroll] Add a test case for rG7873376bb36b.

rG7873376bb36b fixes a build failure for allyesconfig.

The problem happened when the single exiting block doesn't dominate the
loop latch, then the immediate dominator of the exit block should not be
the exiting block after unrolling. As the exiting block of
different unrolled iteration can branch to the exit block, and the ith
exiting block doesn't dominate (i+1)th exiting block, the immediate
dominator of the exit block should not the nearest common dominator of
the exiting block and the loop latch of the same iteration.

Differential Revision: https://reviews.llvm.org/D80477
The file was modifiedllvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
Commit 3eb430d59847b9e0091199cb63a50ab0494711dd by craig.topper
[X86] Factor constant pool comment printing out of the switch in X86AsmPrinter::emitInstruction. NFC

Pull the verbose asm check out of the cases and move it up to
the call of the new function.
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
Commit 16976cb92535b0620f46720fe3be283da904026c by craig.topper
[X86] Minor cleanups to addShuffleComments in X86MCInstPrinter.cpp. NFCI

-Replace some ifs that should be impossible with asserts.
-Use X86::AddrDisp and X86::AddrNumOperands to make code more readable
-Use X86II::isKMasked/isKMergeMasked to do some operand skipping to remove or simplify switches
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
Commit fc532c1a0dc66bf23cac60f5363f180c6cbfefbc by Dan Liew
Remove some non-determinism from the `Darwin/duplicate_os_log_reports.cpp` test.

The test read from an uninitialized buffer which could cause the output
to be unpredictable.

The test is currently disabled so this won't actually change anything
until the test is re-enabled.
The file was modifiedcompiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp
Commit 1b6d29e06b07e518025b6f06445ad3275d6f5684 by maskray
[Driver] Fix BooleanFFlag identifiers to use 'f' 'fno_' prefixes instead of suffixes
The file was modifiedclang/include/clang/Driver/Options.td
Commit 07e8a780d81bb58a0c7bd4da6cc0b9beaec3c788 by craig.topper
[X86] Add pseudo instructions to use MULX with a single destination when the low result isn't used.

The instruction is defined to only produce high result if both
destinations are the same. We can exploit this to avoid
unnecessarily clobbering a register.

In order to hide this from register allocation we use a pseudo
instruction and expand the result during MCInst creation.

Differential Revision: https://reviews.llvm.org/D80500
The file was modifiedllvm/lib/Target/X86/X86InstrArithmetic.td
The file was modifiedllvm/test/CodeGen/X86/pr35636.ll
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/i128-mul.ll
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
The file was modifiedllvm/test/CodeGen/X86/atomic-unordered.ll