FailedChanges

Summary

  1. [NFC][StackSafety] Avoid assert in getBaseObjec (details)
  2. [StackSafety] Fix union which produces wrapped sets (details)
  3. Improve modeling of variable template specializations with dependent (details)
  4. [NFC][Attributor] Add missing override (details)
  5. [NFC][StackSafety] Count dataflow inputs (details)
  6. More cleanup after removing the ability to reference a dependent (details)
  7. [NFC][StackSafety] Add a couple of early returns (details)
  8. [clang] Allow DynTypedNode to store a TemplateArgumentLoc (details)
  9. [Concepts] Dump template arguments for immediately declared constraint. (details)
  10. [clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` was undefined after definition. (details)
  11. AMDGPU/GlobalISel: Lower G_FREM (details)
  12. Free the memory allocated by mlirOperationStateAddXXX methods in mlirOperationCreate. (details)
  13. [DebugInfo] Fix initialization of DwarfCompileUnit::LabelBegin. (details)
  14. [lldb][NFC] Remove dead code in BreakpointResolverAddress (details)
  15. [ScalarizeMaskedMemIntrin] Scalarize constant mask expandload as shuffle(build_vector,pass_through) (details)
  16. [ScalarizeMaskedMemIntrin][X86] Refresh missed transform test cases from rGc0c3b9a25fee (details)
  17. [PowerPC] Add intrinsic to read or set FPSCR register (details)
  18. [SyntaxTree] Implement the List construct. (details)
  19. [LoopInterchange] Form LCSSA phis for values in orig outer loop header. (details)
  20. [LoopInterchange] Move instructions from preheader to outer loop header. (details)
  21. [DebugInfo] Don't error for zero-length arange entries (details)
  22. [clangd] Fix the background index is not disabled when using remote-index. (details)
  23. [InstCombine] rearrange code for readability; NFC (details)
  24. [clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` is not a literal. (details)
Commit a6feeb1c6b614ff17ee65a78e0525561adf514af by Vitaly Buka
[NFC][StackSafety] Avoid assert in getBaseObjec
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
Commit dee812a297c2a5810be7674680314ba9150fe50c by Vitaly Buka
[StackSafety] Fix union which produces wrapped sets
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/local.ll (diff)
Commit 617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9 by richard
Improve modeling of variable template specializations with dependent
arguments.

Don't build a variable template specialization declaration until its
scope and template arguments are non-dependent.

No functionality change intended, but the AST representation is now more
consistent with how we model other templates.
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td (diff)
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp (diff)
The file was modifiedclang/lib/Sema/SemaTemplate.cpp (diff)
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/lib/Sema/SemaExprMember.cpp (diff)
Commit fbd33baa27f8acce24ea58013fda0c2421c928f9 by Vitaly Buka
[NFC][Attributor] Add missing override
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h (diff)
Commit 8d91ce8f589c0ab62bd782fd314cecdc979556f7 by Vitaly Buka
[NFC][StackSafety] Count dataflow inputs
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
Commit a4ca710d9ca9a779a97050149a483f7a5b24dd02 by richard
More cleanup after removing the ability to reference a dependent
VarTemplateSpecializationDecl.
The file was modifiedclang/lib/Sema/SemaExpr.cpp (diff)
Commit 1970eefb17e9790ed8a1087805ac2a05a7f36727 by Vitaly Buka
[NFC][StackSafety] Add a couple of early returns
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
Commit b1c7f84643ffa63e72733b7089cea89723b82afc by zeratul976
[clang] Allow DynTypedNode to store a TemplateArgumentLoc

The patch also adds a templateArgumentLoc() AST matcher.

Differential Revision: https://reviews.llvm.org/D85621
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h (diff)
The file was modifiedclang/docs/LibASTMatchersReference.html (diff)
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h (diff)
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp (diff)
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h (diff)
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchFinder.h (diff)
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp (diff)
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp (diff)
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp (diff)
Commit 626d0f5818b223f04904c510eaa682db7a41c2dd by hokein.wu
[Concepts] Dump template arguments for immediately declared constraint.

The template arguments were dumped as part of the TemplateTypeParmDecl, which
was incorrect.

Differential Revision: https://reviews.llvm.org/D85282
The file was modifiedclang/include/clang/AST/ASTNodeTraverser.h (diff)
The file was modifiedclang/test/AST/ast-dump-concepts.cpp (diff)
The file was modifiedclang/lib/AST/TextNodeDumper.cpp (diff)
Commit 5965fbf81b25217c40b09b48bd808a8f4a5d4e89 by platonov.aleksandr
[clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` was undefined after definition.

PP->getMacroInfo() returns nullptr for undefined macro, so we need to check this return value before dereference.
Stack dump:
```
#0 0x0000000002185e6a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x2185e6a)
#1 0x0000000002183e8c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x2183e8c)
#2 0x0000000002183ff3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x2183ff3)
#3 0x00007f37df9b1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x000000000052054e clang::tidy::bugprone::NotNullTerminatedResultCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x52054e)
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D85523
The file was modifiedclang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp (diff)
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-not-null-terminated-result-undef-stdc-want-lib-ext1.c
Commit 0d58d9e8fb937b422baaf96dc7c60e7c3a128302 by petar.avramovic
AMDGPU/GlobalISel: Lower G_FREM

Add custom lower for G_FREM.

Differential Revision: https://reviews.llvm.org/D84324
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h (diff)
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp (diff)
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/frem.ll
Commit 69eb7e36aa3c71997811054bb31d4546b08bfff0 by zinenko
Free the memory allocated by mlirOperationStateAddXXX methods in mlirOperationCreate.

Previously, the memory leaks on heap. Since the MlirOperationState is not intended to be used again after mlirOperationCreate, the patch simplify frees the memory in mlirOperationCreate instead of creating any new API.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D85629
The file was modifiedmlir/lib/CAPI/IR/IR.cpp (diff)
Commit d400606f8cb2474a436df42d7d6c897ba6c9c4ee by ikudrin
[DebugInfo] Fix initialization of DwarfCompileUnit::LabelBegin.

This also fixes the condition in the assertion in
DwarfCompileUnit::getLabelBegin() because it checked something unrelated
to the returned value.

Differential Revision: https://reviews.llvm.org/D85437
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (diff)
Commit 8119d6c14695b436adb66f0d891863eeea9e62ad by Raphael Isemann
[lldb][NFC] Remove dead code in BreakpointResolverAddress
The file was modifiedlldb/source/Breakpoint/BreakpointResolverAddress.cpp (diff)
Commit c0c3b9a25feec84e739cc3a2b30e1ac336648799 by llvm-dev
[ScalarizeMaskedMemIntrin] Scalarize constant mask expandload as shuffle(build_vector,pass_through)

As noticed on D66004, scalarization of an expandload with a constant mask as a chain of irregular loads+inserts makes it tricky to optimize before lowering, resulting in difficulties in merging loads etc.

This patch instead scalarizes the expansion to a build_vector(load0, load1, undef, load2,....) style pattern and then performs a blend shuffle with the pass through vector. This allows us to more easily make use of all the build_vector combines, merging of consecutive loads etc.

Differential Revision: https://reviews.llvm.org/D85416
The file was modifiedllvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/masked_expandload.ll (diff)
Commit 0b26c9eddc4f0112f18f75f64c0fb4e5839a6795 by llvm-dev
[ScalarizeMaskedMemIntrin][X86] Refresh missed transform test cases from rGc0c3b9a25fee

Differential Revision: https://reviews.llvm.org/D85416
The file was modifiedllvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/expand-masked-expandload.ll (diff)
Commit dbcfbffc7ae46cc7b84257787681676144a1bd5f by qiucofan
[PowerPC] Add intrinsic to read or set FPSCR register

This patch introduces two intrinsics: llvm.ppc.setflm and
llvm.ppc.readflm. They read from or write to FPSCR register
(floating-point status & control) which contains rounding mode and
exception status.

To ensure correctness of program, we need to prevent FP operations from
being moved across these intrinsics (mffs/mtfsf instruction), so here I
set them as scheduling boundaries. We can relax such restriction if
FPSCR is modeled well in the future.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D84914
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp (diff)
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/2008-10-28-f128-i32.ll (diff)
The file was addedllvm/test/CodeGen/PowerPC/read-set-flm.ll
Commit a90c78ac52615d256142ecd64fbedabb612dc73f by ecaldas
[SyntaxTree] Implement the List construct.

We defined a List construct to help with the implementation of list-like
grammar rules. This is a first implementation of this API.

Differential Revision: https://reviews.llvm.org/D85295
The file was modifiedclang/lib/Tooling/Syntax/Nodes.cpp (diff)
The file was modifiedclang/include/clang/Tooling/Syntax/Tree.h (diff)
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp (diff)
The file was modifiedclang/include/clang/Tooling/Syntax/Nodes.h (diff)
Commit 54cb552b962097d0e3ef7306b69a3c82cc7fff37 by flo
[LoopInterchange] Form LCSSA phis for values in orig outer loop header.

Values defined in the outer loop header could be used in the inner loop
latch. In that case, we need to create LCSSA phis for them, because after
interchanging they will be defined in the new inner loop and used in the
new outer loop.
The file was modifiedllvm/lib/Transforms/Scalar/LoopInterchange.cpp (diff)
The file was modifiedllvm/test/Transforms/LoopInterchange/lcssa-preheader.ll (diff)
Commit 8393b9fd1f36d9273fa0720872e3996495aacc1c by flo
[LoopInterchange] Move instructions from preheader to outer loop header.

Instructions defined in the original inner loop preheader may depend on
values defined in the outer loop header, but the inner loop header will
become the entry block in the loop nest. Move the instructions from the
preheader to the outer loop header, so we do not break dominance. We
also have to check for unsafe instructions in the preheader. If there
are no unsafe instructions, all instructions should be movable.

Currently we move all instructions except the terminator and rely on
LICM to hoist out invariant instructions later.

Fixes PR45743
The file was addedllvm/test/Transforms/LoopInterchange/pr45743-move-from-inner-preheader.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopInterchange.cpp (diff)
The file was modifiedllvm/test/Transforms/LoopInterchange/lcssa-preheader.ll (diff)
Commit cb3a598c87db2db997401b82dfb3f7f80707194e by james.henderson
[DebugInfo] Don't error for zero-length arange entries

Although the DWARF specification states that .debug_aranges entries
can't have length zero, these can occur in the wild. There's no
particular reason to enforce this part of the spec, since functionally
they have no impact. The patch removes the error and introduces a new
warning for premature terminator entries which does not stop parsing.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46805. See also
https://reviews.llvm.org/D71932 which originally introduced the error.

Reviewed by: ikudrin, dblaikie

Differential Revision: https://reviews.llvm.org/D85313
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp (diff)
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp (diff)
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h (diff)
The file was modifiedllvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp (diff)
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFContext.cpp (diff)
Commit 3d2cf72943295d167062b54e663e2f5236df2c5d by hokein.wu
[clangd] Fix the background index is not disabled when using remote-index.

Differential Revision: https://reviews.llvm.org/D85637
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp (diff)
Commit bebca662d4ff77a69f5f492dc7b14dcc5208840a by spatel
[InstCombine] rearrange code for readability; NFC

The code comment refers to the path where we change the
size of the integer type, so handle that first, otherwise
deal with the general case.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp (diff)
Commit dcb8d3b72234ea557df2af1141ad30bf1670a03a by platonov.aleksandr
[clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` is not a literal.

If `__STDC_WANT_LIB_EXT1__` is not a literal (e.g. `#define __STDC_WANT_LIB_EXT1__ ((unsigned)1)`) bugprone-not-null-terminated-result check crashes.
Stack dump:
```
#0 0x0000000002185e6a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x2185e6a)
#1 0x0000000002183e8c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x2183e8c)
#2 0x0000000002183ff3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x2183ff3)
#3 0x00007f08d91b1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00000000021338bb llvm::StringRef::getAsInteger(unsigned int, llvm::APInt&) const (/llvm-project/build/bin/clang-tidy+0x21338bb)
#5 0x000000000052051c clang::tidy::bugprone::NotNullTerminatedResultCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x52051c)
```

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D85525
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-not-null-terminated-result-stdc-want-lib-ext1-not-a-literal.c
The file was modifiedclang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp (diff)