[compiler-rt] r367858 - compiler-rt: Rename remaining cc files in test/profile to cpp

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 06:42:31 PDT 2019


Author: nico
Date: Mon Aug  5 06:42:31 2019
New Revision: 367858

URL: http://llvm.org/viewvc/llvm-project?rev=367858&view=rev
Log:
compiler-rt: Rename remaining cc files in test/profile to cpp

See r367803 and similar other changes.

Added:
    compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cpp
      - copied, changed from r367857, compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc
    compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cpp
      - copied unchanged from r367857, compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc
    compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cpp
      - copied unchanged from r367857, compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc
    compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cpp
      - copied unchanged from r367857, compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc
Removed:
    compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc
    compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc
    compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc
    compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc
Modified:
    compiler-rt/trunk/test/profile/Linux/comdat_rename.test
    compiler-rt/trunk/test/profile/instrprof-icall-promo.test
    compiler-rt/trunk/test/profile/lit.cfg.py

Removed: compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc?rev=367857&view=auto
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc (original)
+++ compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc (removed)
@@ -1,33 +0,0 @@
-#include "comdat_rename.h"
-// callee's out-of-line instance profile data -- it comes
-// from external calls to it from comdat_rename_2.cc.
-// Its inline instance copy's profile data is different and
-// is collected in 'caller''s context. 
-int FOO::callee() {
-  // CHECK-LABEL: define {{.*}}callee{{.*}}
-  // CHECK-NOT: br i1 {{.*}}
-  // CHECK: br {{.*}}label{{.*}}, label %[[BB1:.*]], !prof ![[PD1:[0-9]+]]
-  // CHECK: {{.*}}[[BB1]]: 
-  if (b != 0)
-    return a / b;
-  if (a != 0)
-    return 10 / a;
-  return 0;
-}
-
-// This is the 'caller''s comdat copy (after renaming) in this module.
-// The profile counters include a copy of counters from 'callee':
-//
-// CHECK-LABEL: define {{.*}}caller{{.*}}
-// CHECK-NOT: br i1 {{.*}}
-// CHECK: br {{.*}}label{{.*}}, label %[[BB2:.*]], !prof ![[PD2:[0-9]+]]
-// CHECK: {{.*}}[[BB2]]: 
-// CHECK: br {{.*}}label{{.*}}, label %{{.*}}, !prof !{{.*}}
-// CHECK: br {{.*}}label %[[BB3:.*]], label %{{.*}} !prof ![[PD3:[0-9]+]]
-// CHECK: {{.*}}[[BB3]]: 
-//
-// CHECK:![[PD1]] = !{!"branch_weights", i32 0, i32 1}
-// CHECK:![[PD2]] = !{!"branch_weights", i32 1, i32 0}
-// CHECK:![[PD3]] = !{!"branch_weights", i32 {{.*}}, i32 0}
-
-void test(FOO *foo) { foo->caller(10); }

Copied: compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cpp (from r367857, compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cpp?p2=compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cpp&p1=compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc&r1=367857&r2=367858&rev=367858&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cc (original)
+++ compiler-rt/trunk/test/profile/Inputs/comdat_rename_1.cpp Mon Aug  5 06:42:31 2019
@@ -1,6 +1,6 @@
 #include "comdat_rename.h"
 // callee's out-of-line instance profile data -- it comes
-// from external calls to it from comdat_rename_2.cc.
+// from external calls to it from comdat_rename_2.cpp.
 // Its inline instance copy's profile data is different and
 // is collected in 'caller''s context. 
 int FOO::callee() {

Removed: compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc?rev=367857&view=auto
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc (original)
+++ compiler-rt/trunk/test/profile/Inputs/comdat_rename_2.cc (removed)
@@ -1,18 +0,0 @@
-#include "comdat_rename.h"
-extern void test(FOO *);
-FOO foo;
-int main() {
-  test(&foo);
-  foo.caller(20);
-  return 0;
-}
-
-// The copy of 'caller' defined in this module -- it has
-// 'callee' call remaining.
-//
-// CHECK-LABEL: define {{.*}}caller{{.*}}
-// CHECK: {{.*}} call {{.*}}
-// CHECK-NOT: br i1 {{.*}}
-// CHECK: br {{.*}}label %[[BB1:.*]], label{{.*}}!prof ![[PD1:[0-9]+]]
-// CHECK: {{.*}}[[BB1]]: 
-// CHECK:![[PD1]] = !{!"branch_weights", i32 0, i32 1}

Removed: compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc?rev=367857&view=auto
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_1.cc (removed)
@@ -1,7 +0,0 @@
-#include "instrprof-icall-promo.h"
-
-A a;
-
-A* ap = &a;
-
-int ref(A* ap) { return ap->A::foo(); }

Removed: compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc?rev=367857&view=auto
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-icall-promo_2.cc (removed)
@@ -1,15 +0,0 @@
-#include "instrprof-icall-promo.h"
-extern int ref(A *);
-
-int A::bar() { return 2; }
-
-extern A *ap;
-int test() {
-  for (int i = 0; i < 10000; i++) ap->foo();
-  return ref(ap);
-}
-
-int main() {
-  test();
-  return 0;
-}

Modified: compiler-rt/trunk/test/profile/Linux/comdat_rename.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/comdat_rename.test?rev=367858&r1=367857&r2=367858&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/comdat_rename.test (original)
+++ compiler-rt/trunk/test/profile/Linux/comdat_rename.test Mon Aug  5 06:42:31 2019
@@ -1,6 +1,6 @@
 // RUN: rm -fr %t.prof
-// RUN: %clangxx_pgogen=%t.prof/ -o %t.gen -mllvm -do-comdat-renaming=true -O2 %S/../Inputs/comdat_rename_1.cc %S/../Inputs/comdat_rename_2.cc
+// RUN: %clangxx_pgogen=%t.prof/ -o %t.gen -mllvm -do-comdat-renaming=true -O2 %S/../Inputs/comdat_rename_1.cpp %S/../Inputs/comdat_rename_2.cpp
 // RUN: %run %t.gen
 // RUN: llvm-profdata merge -o %t.profdata %t.prof/
-// RUN: %clangxx_profuse=%t.profdata  -O2 -mllvm -do-comdat-renaming=true -emit-llvm -S %S/../Inputs/comdat_rename_1.cc -o - | FileCheck %S/../Inputs/comdat_rename_1.cc
-// RUN: %clangxx_profuse=%t.profdata  -O2 -mllvm -do-comdat-renaming=true -emit-llvm -S %S/../Inputs/comdat_rename_2.cc -o - | FileCheck %S/../Inputs/comdat_rename_2.cc
+// RUN: %clangxx_profuse=%t.profdata  -O2 -mllvm -do-comdat-renaming=true -emit-llvm -S %S/../Inputs/comdat_rename_1.cpp -o - | FileCheck %S/../Inputs/comdat_rename_1.cpp
+// RUN: %clangxx_profuse=%t.profdata  -O2 -mllvm -do-comdat-renaming=true -emit-llvm -S %S/../Inputs/comdat_rename_2.cpp -o - | FileCheck %S/../Inputs/comdat_rename_2.cpp

Modified: compiler-rt/trunk/test/profile/instrprof-icall-promo.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-icall-promo.test?rev=367858&r1=367857&r2=367858&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-icall-promo.test (original)
+++ compiler-rt/trunk/test/profile/instrprof-icall-promo.test Mon Aug  5 06:42:31 2019
@@ -1,16 +1,16 @@
 # IR based instrumentation
-RUN: %clangxx_pgogen -O2  -c -o %t.1.o  %S/Inputs/instrprof-icall-promo_1.cc 
-RUN: %clangxx_pgogen -O2 -c -o %t.2.o  %S/Inputs/instrprof-icall-promo_2.cc 
+RUN: %clangxx_pgogen -O2  -c -o %t.1.o  %S/Inputs/instrprof-icall-promo_1.cpp
+RUN: %clangxx_pgogen -O2 -c -o %t.2.o  %S/Inputs/instrprof-icall-promo_2.cpp
 
 RUN: %clangxx_pgogen -O2 %t.2.o %t.1.o -o %t.gen.1
 RUN: env LLVM_PROFILE_FILE=%t-icall.profraw %run %t.gen.1
 RUN: llvm-profdata merge -o %t-icall.profdata %t-icall.profraw
-RUN: %clangxx_profuse=%t-icall.profdata -O2 -Rpass=pgo-icall-prom  -c -o %t.2.use.o  %S/Inputs/instrprof-icall-promo_2.cc  2>&1 | FileCheck %s
+RUN: %clangxx_profuse=%t-icall.profdata -O2 -Rpass=pgo-icall-prom  -c -o %t.2.use.o  %S/Inputs/instrprof-icall-promo_2.cpp 2>&1 | FileCheck %s
 
 RUN: %clangxx_pgogen -O2 %t.1.o %t.2.o -o %t.gen.2
 RUN: env LLVM_PROFILE_FILE=%t-icall2.profraw %run %t.gen.2
 RUN: llvm-profdata merge -o %t-icall2.profdata %t-icall2.profraw
-RUN: %clangxx_profuse=%t-icall2.profdata -O2 -Rpass=pgo-icall-prom  -c -o %t.2.use.o  %S/Inputs/instrprof-icall-promo_2.cc  2>&1 | FileCheck %s
+RUN: %clangxx_profuse=%t-icall2.profdata -O2 -Rpass=pgo-icall-prom  -c -o %t.2.use.o  %S/Inputs/instrprof-icall-promo_2.cpp 2>&1 | FileCheck %s
 
 FIXME: Relies on vtable layout
 XFAIL: msvc

Modified: compiler-rt/trunk/test/profile/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/lit.cfg.py?rev=367858&r1=367857&r2=367858&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/lit.cfg.py (original)
+++ compiler-rt/trunk/test/profile/lit.cfg.py Mon Aug  5 06:42:31 2019
@@ -32,7 +32,7 @@ else:
   extra_link_flags = []
 
 # Test suffixes.
-config.suffixes = ['.c', '.cc', '.cpp', '.m', '.mm', '.ll', '.test']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll', '.test']
 
 # What to exclude.
 config.excludes = ['Inputs']




More information about the llvm-commits mailing list