SuccessChanges

Summary

  1. clang-format: Fix namespace end comments for namespaces with attributes and macros. Fixes PR39247. While here, also make C++20 `namespace A::inline B::inline C` nested inline namespaced definitions work. Before: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace DEPRECATE_WOOFwoof namespace [[deprecated("meow")]] woof { void f() {} } // namespace [[deprecated("meow")]]woof namespace woof::inline bark { void f() {} } // namespace woof::inlinebark Now: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace woof namespace [[deprecated("meow")]] woof { void f() {} } // namespace woof namespace woof::inline bark { void f() {} } // namespace woof::inline bark (In addition to the fixed namespace end comments, also note the correct indent of the namespace contents.) Differential Revision: https://reviews.llvm.org/D65125
  2. [IndVars] Fix a subtle bug in optimizeLoopExits The original code failed to account for the fact that one exit can have a pointer exit count without all of them having pointer exit counts. This could cause two separate bugs: 1) We might exit the loop early, and leave optimizations undone. This is what triggered the assertion failure in the reported test case. 2) We might optimize one exit, then exit without indicating a change. This could result in an analysis invalidaton bug if no other transform is done by the rest of indvars. Note that the pointer exit counts are a really fragile concept. They show up only when we have a pointer IV w/o a datalayout to provide their size. It's really questionable to me whether the complexity implied is worth it.
  3. Improve clang-format-diff help output The description in clang-format-diff.py is more useful than the one in `clang-format-diff -h`, so use the same description in both places. Differential Revision: https://reviews.llvm.org/D64998
  4. [IR][Verifier] Allow IntToPtrInst to be !dereferenceable Summary: Allow IntToPtrInst to carry !dereferenceable metadata tag. This is valid since !dereferenceable can be only be applied to pointer type values. Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4 Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64954
  5. [RISCV][NFC] Correct RUN in rvi-pseudos-invalid.s This test should test both riscv32 and riscv64.
Revision 366831 by nico:
clang-format: Fix namespace end comments for namespaces with attributes and macros.

Fixes PR39247.

While here, also make C++20 `namespace A::inline B::inline C` nested
inline namespaced definitions work.

Before:
    #define DEPRECATE_WOOF [[deprecated("meow")]]

    namespace DEPRECATE_WOOF woof {
    void f() {}
    } // namespace DEPRECATE_WOOFwoof

    namespace [[deprecated("meow")]] woof {
      void f() {}
    } // namespace [[deprecated("meow")]]woof

    namespace woof::inline bark {
      void f() {}
    } // namespace woof::inlinebark

Now:
    #define DEPRECATE_WOOF [[deprecated("meow")]]

    namespace DEPRECATE_WOOF woof {
    void f() {}
    } // namespace woof

    namespace [[deprecated("meow")]] woof {
    void f() {}
    } // namespace woof

    namespace woof::inline bark {
    void f() {}
    } // namespace woof::inline bark

(In addition to the fixed namespace end comments, also note the correct
indent of the namespace contents.)

Differential Revision: https://reviews.llvm.org/D65125
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Format/NamespaceEndCommentsFixer.cpp (diff)clang.src/lib/Format/NamespaceEndCommentsFixer.cpp
The file was modified/cfe/trunk/lib/Format/UnwrappedLineParser.cpp (diff)clang.src/lib/Format/UnwrappedLineParser.cpp
The file was modified/cfe/trunk/unittests/Format/FormatTest.cpp (diff)clang.src/unittests/Format/FormatTest.cpp
The file was modified/cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp (diff)clang.src/unittests/Format/NamespaceEndCommentsFixerTest.cpp
Revision 366829 by reames:
[IndVars] Fix a subtle bug in optimizeLoopExits

The original code failed to account for the fact that one exit can have a pointer exit count without all of them having pointer exit counts.  This could cause two separate bugs:
1) We might exit the loop early, and leave optimizations undone.  This is what triggered the assertion failure in the reported test case.
2) We might optimize one exit, then exit without indicating a change.  This could result in an analysis invalidaton bug if no other transform is done by the rest of indvars.

Note that the pointer exit counts are a really fragile concept.  They show up only when we have a pointer IV w/o a datalayout to provide their size.  It's really questionable to me whether the complexity implied is worth it.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (diff)llvm.src/lib/Transforms/Scalar/IndVarSimplify.cpp
The file was added/llvm/trunk/test/Transforms/IndVarSimplify/eliminate-exit-no-dl.llllvm.src/test/Transforms/IndVarSimplify/eliminate-exit-no-dl.ll
Revision 366828 by nico:
Improve clang-format-diff help output

The description in clang-format-diff.py is more useful than the one
in `clang-format-diff -h`, so use the same description in both places.

Differential Revision: https://reviews.llvm.org/D64998
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/tools/clang-format/clang-format-diff.py (diff)clang.src/tools/clang-format/clang-format-diff.py
Revision 366826 by rtayl:
[IR][Verifier] Allow IntToPtrInst to be !dereferenceable

Summary:
Allow IntToPtrInst to carry !dereferenceable metadata tag.
This is valid since !dereferenceable can be only be applied to
pointer type values.

Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64954
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/lib/IR/Value.cpp (diff)llvm.src/lib/IR/Value.cpp
The file was modified/llvm/trunk/lib/IR/Verifier.cpp (diff)llvm.src/lib/IR/Verifier.cpp
The file was modified/llvm/trunk/test/Analysis/ValueTracking/memory-dereferenceable.ll (diff)llvm.src/test/Analysis/ValueTracking/memory-dereferenceable.ll
The file was added/llvm/trunk/test/Verifier/dereferenceable-md-inttoptr.llllvm.src/test/Verifier/dereferenceable-md-inttoptr.ll
The file was modified/llvm/trunk/test/Verifier/dereferenceable-md.ll (diff)llvm.src/test/Verifier/dereferenceable-md.ll
Revision 366825 by lenary:
[RISCV][NFC] Correct RUN in rvi-pseudos-invalid.s

This test should test both riscv32 and riscv64.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/MC/RISCV/rvi-pseudos-invalid.s (diff)llvm.src/test/MC/RISCV/rvi-pseudos-invalid.s