SuccessChanges

Summary

  1. [NFC] Fix typo in `getPreviousDecl` comment.
  2. Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName Reason: causes a test failure, will investigate and re-land with a fix.
  3. [IR] allow fast-math-flags on phi of FP values (2nd try) The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917 <https://reviews.llvm.org/D61917> As discussed there, we want to have fast-math-flags be a property of an FP value because the alternative (having them on things like fcmp) leads to logical inconsistency such as: https://bugs.llvm.org/show_bug.cgi?id=38086 The earlier patch for select made almost no practical difference because most unoptimized conditional code begins life as a phi (based on what I see in clang). Similarly, I don't expect this patch to do much on its own either because SimplifyCFG promptly drops the flags when converting to select on a minimal example like: https://bugs.llvm.org/show_bug.cgi?id=39535 But once we have this plumbing in place, we should be able to wire up the FMF propagation and start solving cases like that. The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a regression in a LoopVectorize test. We are intersecting the FMF of any FPMathOperator there, so if a phi is not properly annotated, new math instructions may not be either. Once we fix the propagation in SimplifyCFG, it may be safe to remove that hack. Differential Revision: https://reviews.llvm.org/D67564
  4. Fix analyzer TypeAttributeImpl::anchor() override. TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it.
  5. [gn build] Fix Python DeprecationWarning Summary: This fixes two issues: - DeprecationWarning: invalid escape sequence \` - ResourceWarning: unclosed file Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67753
  6. [clangd] Fix parseNamespaceEvents to parse the last token Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68020
  7. [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators. Summary: This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class. The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly. Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots. Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao Reviewed By: hliao Subscribers: hliao, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, hiraditya, llvm-commits Tags: #amdgpu, #llvm Differential Revision: https://reviews.llvm.org/D67974
  8. [SystemZ] Improve emitSelect() Merge more Select pseudo instructions in emitSelect() by allowing other instructions between them as long as they do not clobber CC. Debug value instructions are now moved down to below the new PHIs instead of erasing them. Review: Ulrich Weigand https://reviews.llvm.org/D67619
  9. Fix cppcheck variable shadow warning. NFCI.
  10. Add missing ExplicitTy default initialization to ConstantExprKeyType constructors. Fixes cppcheck uninitialized variable warnings
Revision 372884 by ymandel:
[NFC] Fix typo in `getPreviousDecl` comment.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/DeclBase.h (diff)clang.src/include/clang/AST/DeclBase.h
Revision 372880 by ibiryukov:
Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

Reason: causes a test failure, will investigate and re-land with a fix.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/Decl.h (diff)clang.src/include/clang/AST/Decl.h
The file was modified/cfe/trunk/lib/AST/Decl.cpp (diff)clang.src/lib/AST/Decl.cpp
The file was modified/cfe/trunk/unittests/AST/NamedDeclPrinterTest.cpp (diff)clang.src/unittests/AST/NamedDeclPrinterTest.cpp
Revision 372878 by spatel:
[IR] allow fast-math-flags on phi of FP values (2nd try)

The changes here are based on the corresponding diffs for allowing FMF on 'select':
D61917 <https://reviews.llvm.org/D61917>

As discussed there, we want to have fast-math-flags be a property of an FP value
because the alternative (having them on things like fcmp) leads to logical
inconsistency such as:
https://bugs.llvm.org/show_bug.cgi?id=38086

The earlier patch for select made almost no practical difference because most
unoptimized conditional code begins life as a phi (based on what I see in clang).
Similarly, I don't expect this patch to do much on its own either because
SimplifyCFG promptly drops the flags when converting to select on a minimal
example like:
https://bugs.llvm.org/show_bug.cgi?id=39535

But once we have this plumbing in place, we should be able to wire up the FMF
propagation and start solving cases like that.

The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
regression in a LoopVectorize test. We are intersecting the FMF of any
FPMathOperator there, so if a phi is not properly annotated, new math
instructions may not be either. Once we fix the propagation in SimplifyCFG, it
may be safe to remove that hack.

Differential Revision: https://reviews.llvm.org/D67564
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/LangRef.rst (diff)llvm.src/docs/LangRef.rst
The file was modified/llvm/trunk/include/llvm/IR/IRBuilder.h (diff)llvm.src/include/llvm/IR/IRBuilder.h
The file was modified/llvm/trunk/include/llvm/IR/Operator.h (diff)llvm.src/include/llvm/IR/Operator.h
The file was modified/llvm/trunk/lib/Analysis/IVDescriptors.cpp (diff)llvm.src/lib/Analysis/IVDescriptors.cpp
The file was modified/llvm/trunk/lib/AsmParser/LLParser.cpp (diff)llvm.src/lib/AsmParser/LLParser.cpp
The file was modified/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (diff)llvm.src/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modified/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (diff)llvm.src/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modified/llvm/trunk/test/Bitcode/compatibility.ll (diff)llvm.src/test/Bitcode/compatibility.ll
The file was modified/llvm/trunk/unittests/IR/InstructionsTest.cpp (diff)llvm.src/unittests/IR/InstructionsTest.cpp
Revision 372877 by rksimon:
Fix analyzer TypeAttributeImpl::anchor() override.

TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/IR/AttributeImpl.h (diff)llvm.src/lib/IR/AttributeImpl.h
Revision 372876 by mantognini:
[gn build] Fix Python DeprecationWarning

Summary:
This fixes two issues:
- DeprecationWarning: invalid escape sequence \`
- ResourceWarning: unclosed file

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67753
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/build/write_cmake_config.py (diff)llvm.src/utils/gn/build/write_cmake_config.py
Revision 372875 by kadircet:
[clangd] Fix parseNamespaceEvents to parse the last token

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68020
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/SourceCode.cpp (diff)clang-tools-extra.src/clangd/SourceCode.cpp
The file was modified/clang-tools-extra/trunk/clangd/unittests/SourceCodeTests.cpp (diff)clang-tools-extra.src/clangd/unittests/SourceCodeTests.cpp
Revision 372874 by kuhar:
[Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators.

Summary:
This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class.

The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly.

Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots.

Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao

Reviewed By: hliao

Subscribers: hliao, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, hiraditya, llvm-commits

Tags: #amdgpu, #llvm

Differential Revision: https://reviews.llvm.org/D67974
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachinePostDominators.h (diff)llvm.src/include/llvm/CodeGen/MachinePostDominators.h
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h (diff)llvm.src/include/llvm/CodeGen/MachineRegionInfo.h
The file was modified/llvm/trunk/lib/CodeGen/MachinePostDominators.cpp (diff)llvm.src/lib/CodeGen/MachinePostDominators.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/SILowerI1Copies.cpp (diff)llvm.src/lib/Target/AMDGPU/SILowerI1Copies.cpp
Revision 372873 by jonpa:
[SystemZ]  Improve emitSelect()

Merge more Select pseudo instructions in emitSelect() by allowing other
instructions between them as long as they do not clobber CC.

Debug value instructions are now moved down to below the new PHIs instead of
erasing them.

Review: Ulrich Weigand
https://reviews.llvm.org/D67619
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (diff)llvm.src/lib/Target/SystemZ/SystemZISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/SystemZ/debuginstr-02.mir (diff)llvm.src/test/CodeGen/SystemZ/debuginstr-02.mir
The file was modified/llvm/trunk/test/CodeGen/SystemZ/fp-strict-conv-10.ll (diff)llvm.src/test/CodeGen/SystemZ/fp-strict-conv-10.ll
The file was modified/llvm/trunk/test/CodeGen/SystemZ/fp-strict-conv-12.ll (diff)llvm.src/test/CodeGen/SystemZ/fp-strict-conv-12.ll
The file was modified/llvm/trunk/test/CodeGen/SystemZ/multiselect.ll (diff)llvm.src/test/CodeGen/SystemZ/multiselect.ll
Revision 372872 by rksimon:
Fix cppcheck variable shadow warning. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/IR/ConstantsContext.h (diff)llvm.src/lib/IR/ConstantsContext.h
Revision 372871 by rksimon:
Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.

Fixes cppcheck uninitialized variable warnings
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/IR/ConstantsContext.h (diff)llvm.src/lib/IR/ConstantsContext.h