[PATCH] D119370: [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef

2022-02-09 Thread Greg Miller via Phabricator via cfe-commits
devjgm updated this revision to Diff 407300.
devjgm added a comment.

- accepted ymandel's suggestion


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119370/new/

https://reviews.llvm.org/D119370

Files:
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
  clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
  
clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp

Index: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
@@ -0,0 +1,80 @@
+// RUN: %check_clang_tidy %s performance-move-const-arg %t \
+// RUN: -config='{CheckOptions: \
+// RUN:  [{key: performance-move-const-arg.CheckMoveToConstRef, value: false}]}'
+
+namespace std {
+template 
+struct remove_reference;
+
+template 
+struct remove_reference {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &> {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &&> {
+  typedef _Tp type;
+};
+
+template 
+constexpr typename std::remove_reference<_Tp>::type &(_Tp &&__t) {
+  return static_cast::type &&>(__t);
+}
+
+template 
+constexpr _Tp &&
+forward(typename remove_reference<_Tp>::type &__t) noexcept {
+  return static_cast<_Tp &&>(__t);
+}
+
+} // namespace std
+
+struct TriviallyCopyable {
+  int i;
+};
+
+void f(TriviallyCopyable) {}
+
+void g() {
+  TriviallyCopyable obj;
+  // Some basic test to ensure that other warnings from
+  // performance-move-const-arg are still working and enabled.
+  f(std::move(obj));
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move() [performance-move-const-arg]
+  // CHECK-FIXES: f(obj);
+}
+
+class NoMoveSemantics {
+public:
+  NoMoveSemantics();
+  NoMoveSemantics(const NoMoveSemantics &);
+  NoMoveSemantics =(const NoMoveSemantics &);
+};
+
+class MoveSemantics {
+public:
+  MoveSemantics();
+  MoveSemantics(MoveSemantics &&);
+
+  MoveSemantics =(MoveSemantics &&);
+};
+
+void callByConstRef1(const NoMoveSemantics &);
+void callByConstRef2(const MoveSemantics &);
+
+void moveToConstReferencePositives() {
+  NoMoveSemantics a;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef1(std::move(a));
+
+  MoveSemantics b;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef2(std::move(b));
+}
Index: clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
===
--- clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
+++ clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
@@ -35,3 +35,8 @@
 
If `true`, enables detection of trivially copyable types that do not
have a move constructor. Default is `true`.
+
+.. option:: CheckMoveToConstRef
+
+   If `true`, enables detection of `std::move()` passed as a const
+   reference argument. Default is `true`.
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
@@ -18,16 +18,18 @@
 
 /// Find casts of calculation results to bigger type. Typically from int to
 ///
-/// There is one option:
+/// The options are
 ///
 ///   - `CheckTriviallyCopyableMove`: Whether to check for trivially-copyable
 //  types as their objects are not moved but copied. Enabled by default.
+//- `CheckMoveToConstRef`: Whether to check if a `std::move()` is passed
+//  as a const reference argument.
 class MoveConstArgCheck : public ClangTidyCheck {
 public:
   MoveConstArgCheck(StringRef Name, ClangTidyContext *Context)
-  : ClangTidyCheck(Name, Context),
-CheckTriviallyCopyableMove(
-Options.get("CheckTriviallyCopyableMove", true)) {}
+  : ClangTidyCheck(Name, Context), CheckTriviallyCopyableMove(Options.get(
+   "CheckTriviallyCopyableMove", true)),
+CheckMoveToConstRef(Options.get("CheckMoveToConstRef", true)) {}
   bool isLanguageVersionSupported(const LangOptions ) const override {
 return LangOpts.CPlusPlus;
   }
@@ -37,6 +39,7 @@
 
 private:
   const bool CheckTriviallyCopyableMove;
+  const bool CheckMoveToConstRef;
   llvm::DenseSet AlreadyCheckedMoves;
 };
 
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ 

[PATCH] D119370: [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef

2022-02-09 Thread Greg Miller via Phabricator via cfe-commits
devjgm updated this revision to Diff 407288.
devjgm added a comment.

Accepted ymandel's suggestion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119370/new/

https://reviews.llvm.org/D119370

Files:
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp


Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
@@ -194,8 +194,8 @@
   << (InvocationParm->getFunctionScopeIndex() + 1) << FunctionName
   << *InvocationParmType << ExpectParmTypeName;
 }
-  } else if (ReceivingExpr) {
-if ((*InvocationParmType)->isRValueReferenceType() || !CheckMoveToConstRef)
+  } else if (ReceivingExpr && CheckMoveToConstRef) {
+if ((*InvocationParmType)->isRValueReferenceType())
   return;
 
 auto Diag = diag(FileMoveRange.getBegin(),


Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
@@ -194,8 +194,8 @@
   << (InvocationParm->getFunctionScopeIndex() + 1) << FunctionName
   << *InvocationParmType << ExpectParmTypeName;
 }
-  } else if (ReceivingExpr) {
-if ((*InvocationParmType)->isRValueReferenceType() || !CheckMoveToConstRef)
+  } else if (ReceivingExpr && CheckMoveToConstRef) {
+if ((*InvocationParmType)->isRValueReferenceType())
   return;
 
 auto Diag = diag(FileMoveRange.getBegin(),
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D119370: feat: add option performance-move-const-arg.CheckMoveToConstRef

2022-02-09 Thread Greg Miller via Phabricator via cfe-commits
devjgm updated this revision to Diff 407267.
devjgm added a comment.

Here is also updated the documentation to include the new option.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119370/new/

https://reviews.llvm.org/D119370

Files:
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
  clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
  
clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp

Index: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
@@ -0,0 +1,80 @@
+// RUN: %check_clang_tidy %s performance-move-const-arg %t \
+// RUN: -config='{CheckOptions: \
+// RUN:  [{key: performance-move-const-arg.CheckMoveToConstRef, value: false}]}'
+
+namespace std {
+template 
+struct remove_reference;
+
+template 
+struct remove_reference {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &> {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &&> {
+  typedef _Tp type;
+};
+
+template 
+constexpr typename std::remove_reference<_Tp>::type &(_Tp &&__t) {
+  return static_cast::type &&>(__t);
+}
+
+template 
+constexpr _Tp &&
+forward(typename remove_reference<_Tp>::type &__t) noexcept {
+  return static_cast<_Tp &&>(__t);
+}
+
+} // namespace std
+
+struct TriviallyCopyable {
+  int i;
+};
+
+void f(TriviallyCopyable) {}
+
+void g() {
+  TriviallyCopyable obj;
+  // Some basic test to ensure that other warnings from
+  // performance-move-const-arg are still working and enabled.
+  f(std::move(obj));
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move() [performance-move-const-arg]
+  // CHECK-FIXES: f(obj);
+}
+
+class NoMoveSemantics {
+public:
+  NoMoveSemantics();
+  NoMoveSemantics(const NoMoveSemantics &);
+  NoMoveSemantics =(const NoMoveSemantics &);
+};
+
+class MoveSemantics {
+public:
+  MoveSemantics();
+  MoveSemantics(MoveSemantics &&);
+
+  MoveSemantics =(MoveSemantics &&);
+};
+
+void callByConstRef1(const NoMoveSemantics &);
+void callByConstRef2(const MoveSemantics &);
+
+void moveToConstReferencePositives() {
+  NoMoveSemantics a;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef1(std::move(a));
+
+  MoveSemantics b;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef2(std::move(b));
+}
Index: clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
===
--- clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
+++ clang-tools-extra/docs/clang-tidy/checks/performance-move-const-arg.rst
@@ -35,3 +35,8 @@
 
If `true`, enables detection of trivially copyable types that do not
have a move constructor. Default is `true`.
+
+.. option:: CheckMoveToConstRef
+
+   If `true`, enables detection of `std::move()` passed as a const
+   reference argument. Default is `true`.
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
@@ -18,16 +18,18 @@
 
 /// Find casts of calculation results to bigger type. Typically from int to
 ///
-/// There is one option:
+/// The options are
 ///
 ///   - `CheckTriviallyCopyableMove`: Whether to check for trivially-copyable
 //  types as their objects are not moved but copied. Enabled by default.
+//- `CheckMoveToConstRef`: Whether to check if a `std::move()` is passed
+//  as a const reference argument.
 class MoveConstArgCheck : public ClangTidyCheck {
 public:
   MoveConstArgCheck(StringRef Name, ClangTidyContext *Context)
-  : ClangTidyCheck(Name, Context),
-CheckTriviallyCopyableMove(
-Options.get("CheckTriviallyCopyableMove", true)) {}
+  : ClangTidyCheck(Name, Context), CheckTriviallyCopyableMove(Options.get(
+   "CheckTriviallyCopyableMove", true)),
+CheckMoveToConstRef(Options.get("CheckMoveToConstRef", true)) {}
   bool isLanguageVersionSupported(const LangOptions ) const override {
 return LangOpts.CPlusPlus;
   }
@@ -37,6 +39,7 @@
 
 private:
   const bool CheckTriviallyCopyableMove;
+  const bool CheckMoveToConstRef;
   llvm::DenseSet AlreadyCheckedMoves;
 };
 
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ 

[PATCH] D119370: feat: add option performance-move-const-arg.CheckMoveToConstRef

2022-02-09 Thread Greg Miller via Phabricator via cfe-commits
devjgm created this revision.
Herald added a subscriber: carlosgalvezp.
devjgm requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

This option allows callers to disable the warning from
https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html
that would warn on the following

  cc
  void f(const string );
  string s;
  f(std::move(s));  // ALLOWED if
  performance-move-const-arg.CheckMoveToConstRef=false

The reason people might want to disable this check, is because it allows
callers to use `std::move()` or not based on local reasoning about the
argument, and without having to care about how the function `f` accepts
the argument. Indeed, `f` might accept the argument by const-ref today,
but change to by-value tomorrow, and if the caller had moved the
argument that they were finished with, the code would work as
efficiently as possible regardless of how `f` accepted the parameter.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119370

Files:
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
  clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
  
clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp

Index: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
===
--- /dev/null
+++ clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg-const-ref.cpp
@@ -0,0 +1,80 @@
+// RUN: %check_clang_tidy %s performance-move-const-arg %t \
+// RUN: -config='{CheckOptions: \
+// RUN:  [{key: performance-move-const-arg.CheckMoveToConstRef, value: false}]}'
+
+namespace std {
+template 
+struct remove_reference;
+
+template 
+struct remove_reference {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &> {
+  typedef _Tp type;
+};
+
+template 
+struct remove_reference<_Tp &&> {
+  typedef _Tp type;
+};
+
+template 
+constexpr typename std::remove_reference<_Tp>::type &(_Tp &&__t) {
+  return static_cast::type &&>(__t);
+}
+
+template 
+constexpr _Tp &&
+forward(typename remove_reference<_Tp>::type &__t) noexcept {
+  return static_cast<_Tp &&>(__t);
+}
+
+} // namespace std
+
+struct TriviallyCopyable {
+  int i;
+};
+
+void f(TriviallyCopyable) {}
+
+void g() {
+  TriviallyCopyable obj;
+  // Some basic test to ensure that other warnings from
+  // performance-move-const-arg are still working and enabled.
+  f(std::move(obj));
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move() [performance-move-const-arg]
+  // CHECK-FIXES: f(obj);
+}
+
+class NoMoveSemantics {
+public:
+  NoMoveSemantics();
+  NoMoveSemantics(const NoMoveSemantics &);
+  NoMoveSemantics =(const NoMoveSemantics &);
+};
+
+class MoveSemantics {
+public:
+  MoveSemantics();
+  MoveSemantics(MoveSemantics &&);
+
+  MoveSemantics =(MoveSemantics &&);
+};
+
+void callByConstRef1(const NoMoveSemantics &);
+void callByConstRef2(const MoveSemantics &);
+
+void moveToConstReferencePositives() {
+  NoMoveSemantics a;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef1(std::move(a));
+
+  MoveSemantics b;
+
+  // This call is now allowed since CheckMoveToConstRef is false.
+  callByConstRef2(std::move(b));
+}
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
@@ -25,9 +25,9 @@
 class MoveConstArgCheck : public ClangTidyCheck {
 public:
   MoveConstArgCheck(StringRef Name, ClangTidyContext *Context)
-  : ClangTidyCheck(Name, Context),
-CheckTriviallyCopyableMove(
-Options.get("CheckTriviallyCopyableMove", true)) {}
+  : ClangTidyCheck(Name, Context), CheckTriviallyCopyableMove(Options.get(
+   "CheckTriviallyCopyableMove", true)),
+CheckMoveToConstRef(Options.get("CheckMoveToConstRef", true)) {}
   bool isLanguageVersionSupported(const LangOptions ) const override {
 return LangOpts.CPlusPlus;
   }
@@ -37,6 +37,7 @@
 
 private:
   const bool CheckTriviallyCopyableMove;
+  const bool CheckMoveToConstRef;
   llvm::DenseSet AlreadyCheckedMoves;
 };
 
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
@@ -37,6 +37,7 @@
 
 void MoveConstArgCheck::storeOptions(ClangTidyOptions::OptionMap ) {
   Options.store(Opts, "CheckTriviallyCopyableMove", CheckTriviallyCopyableMove);
+  Options.store(Opts, "CheckMoveToConstRef", 

[PATCH] D109234: [PGO] Change ThinLTO test for targets with loop unrolling disabled

2021-09-17 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

The test patch worked and test is now passing again.  Thanks for the quick help 
on this!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109234/new/

https://reviews.llvm.org/D109234

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D109234: [PGO] Change ThinLTO test for targets with loop unrolling disabled

2021-09-16 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

Hello, 
We are maintaining a downstream version of the monorepo based on the LLVM main 
branch. We have not transitioned to the new PM yet. In a recent attempt to 
merge the latest upstream commits into our monorepo we came across the 
following test failures after your commit.



FAIL: llvm_regressions :: Clang/CodeGen/pgo-sample-thinlto-summary.c


Script:
---

: 'RUN: at line 1';   
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/clang -cc1 
-internal-isystem 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/lib/clang/14.0.0/include
 -nostdsysteminc -mllvm -debug-pass=Structure -O2 
-fno-experimental-new-pass-manager 
-fprofile-sample-use=/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -emit-llvm -o - 2>&1 | 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/FileCheck 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -check-prefix=SAMPLEPGO-OLDPM
: 'RUN: at line 2';   
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/clang -cc1 
-internal-isystem 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/lib/clang/14.0.0/include
 -nostdsysteminc -mllvm -debug-pass=Structure -O2 
-fno-experimental-new-pass-manager 
-fprofile-sample-use=/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -emit-llvm -flto=thin -o - 2>&1 | 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/FileCheck 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -check-prefix=THINLTO-OLDPM
: 'RUN: at line 3';   
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/clang -cc1 
-internal-isystem 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/lib/clang/14.0.0/include
 -nostdsysteminc -fdebug-pass-manager -O2 
-fprofile-sample-use=/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -emit-llvm -o - 2>&1 | 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/FileCheck 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -check-prefix=SAMPLEPGO

: 'RUN: at line 4';   
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/clang -cc1 
-internal-isystem 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/lib/clang/14.0.0/include
 -nostdsysteminc -fdebug-pass-manager -O2 
-fprofile-sample-use=/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -emit-llvm -flto=thin -o - 2>&1 | 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/FileCheck 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -check-prefix=THINLTO
-

Exit Code: 1

Command Output (stderr):


+ : 'RUN: at line 1'
+ /scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/clang -cc1 
-internal-isystem 
/scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/lib/clang/14.0.0/include
 -nostdsysteminc -mllvm -debug-pass=Structure -O2 
-fno-experimental-new-pass-manager 
-fprofile-sample-use=/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -emit-llvm -o -
+ /scratch/gmiller/tools5/llvm_cgt/arm-llvm/RelWithAsserts/llvm/bin/FileCheck 
/scratch/gmiller/tools5/llvm_cgt/llvm-project/clang/test/CodeGen/pgo-sample-thinlto-summary.c
 -check-prefix=SAMPLEPGO-OLDPM
+ : 'RUN: at line 2'
+ 

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-10 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

In D101030#2746957 , @jdoerfert wrote:

> In D101030#2746770 , @gregmiller 
> wrote:
>
>> In D101030#2745513 , @jdoerfert 
>> wrote:
>>
>>> In D101030#2745429 , @gregmiller 
>>> wrote:
>>>
 Hello, We are maintaining a downstream version of the monorepo based on 
 the LLVM main branch. We have not transitioned to the new PM yet. In a 
 recent attempt to merge the latest upstream commits into our monorepo we 
 came across the following test failures after your commit.
 F16720091: failed_report.txt 
 For below test cases:

   remarks_parallel_in_multiple_target_state_machines.c
   remarks_parallel_in_target_state_machine.c

 Thanks
 greg
>>>
>>> Can you add (and if you want upstream) a change that forces the use of the 
>>> new pass manager for those tests?
>>
>> Since the old pass manager is still supported upstream, I think it would 
>> make more sense for you to update your changes to the failing tests instead.
>
> Sure. I'll do that when I find a minute.
> Given that you have a setup with the old PM set as default I figured it might 
> be easier for you to test the minimal change to the run lines but I am happy 
> to do it myself next chance I get to setup everything and such.

Thanks.  That would be much appreciated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101030/new/

https://reviews.llvm.org/D101030

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-09 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

In D101030#2745513 , @jdoerfert wrote:

> In D101030#2745429 , @gregmiller 
> wrote:
>
>> Hello, We are maintaining a downstream version of the monorepo based on the 
>> LLVM main branch. We have not transitioned to the new PM yet. In a recent 
>> attempt to merge the latest upstream commits into our monorepo we came 
>> across the following test failures after your commit.
>> F16720091: failed_report.txt 
>> For below test cases:
>>
>>   remarks_parallel_in_multiple_target_state_machines.c
>>   remarks_parallel_in_target_state_machine.c
>>
>> Thanks
>> greg
>
> Can you add (and if you want upstream) a change that forces the use of the 
> new pass manager for those tests?

Since the old pass manager is still supported upstream, I think it would make 
more sense for you to update your changes to the failing tests instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101030/new/

https://reviews.llvm.org/D101030

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-07 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

Hello, We are maintaining a downstream version of the monorepo based on the 
LLVM main branch. We have not transitioned to the new PM yet. In a recent 
attempt to merge the latest upstream commits into our monorepo we came across 
the following test failures after your commit.
F16720091: failed_report.txt 
For below test cases:

  remarks_parallel_in_multiple_target_state_machines.c
  remarks_parallel_in_target_state_machine.c

Thanks
greg


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101030/new/

https://reviews.llvm.org/D101030

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95753: [Coverage] Store compilation dir separately in coverage mapping

2021-02-22 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

Hello, we are seeing failures like below:

Note: Google Test filter = 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0
[==] Running 1 test from 1 test case.
[--] Global test environment set-up.
[--] 1 test from ParameterizedCovMapTest/CoverageMappingTest
[ RUN ] 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0
/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/llvm-project/llvm/unittests/ProfileData/CoverageMappingTest.cpp:889:
 Failure
Expected: 3U
Which is: 3
To be equal to: NumFuncs
Which is: 5
[ FAILED ] 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0, 
where GetParam() = (false, false) (0 ms)

Do you have any suggestions on why we would start seeing above failures after 
your commit? Was passing before.

Thanks
Greg


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95753/new/

https://reviews.llvm.org/D95753

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D96865: [Driver] Honor "-gdwarf-N" at any position for assembler sources

2021-02-19 Thread greg miller via Phabricator via cfe-commits
gregmiller added a comment.

Hello,

We are seeing failures like below:
--

Note: Google Test filter = 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0
[==] Running 1 test from 1 test case.
[--] Global test environment set-up.
[--] 1 test from ParameterizedCovMapTest/CoverageMappingTest
[ RUN  ] 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0
/scratch/build_jenkins/workspace/Downstream_Changes/llvm_cgt/llvm-project/llvm/unittests/ProfileData/CoverageMappingTest.cpp:889:
 Failure
Expected: 3U
Which is: 3
To be equal to: NumFuncs
Which is: 5
[  FAILED  ] 
ParameterizedCovMapTest/CoverageMappingTest.skip_duplicate_function_record/0, 
where GetParam() = (false, false) (0 ms)

Do you have any suggestions on why we would start seeing above failures after 
you commit?  Was passing before.

Thanks
Greg


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96865/new/

https://reviews.llvm.org/D96865

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits