[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 13:32:22 PDT 2023


https://github.com/CongzheUalberta updated https://github.com/llvm/llvm-project/pull/68027

>From 778439a6973dc01c925a88986622039116d42bfb Mon Sep 17 00:00:00 2001
From: Congzhe Cao <congzhe.cao at huawei.com>
Date: Mon, 2 Oct 2023 16:30:35 -0400
Subject: [PATCH] [DiagnosticInfo] Output full file path instead of relative
 path

llvm remark dump currently outputs relative file path if the corresponding
file name and location can be found. Arguably it would be better to output
the full path which could make it easier to locate and diagnose problems.
This patch does the change and updates test cases accordingly.
---
 llvm/lib/IR/DiagnosticInfo.cpp                |  5 ++-
 .../LoopFusion/diagnostics_analysis.ll        |  5 +--
 .../LoopFusion/diagnostics_missed.ll          | 21 ++++++++----
 .../LoopIdiom/memcpy-debugify-remarks.ll      |  3 +-
 .../LoopIdiom/memset-debugify-remarks.ll      |  3 +-
 .../Transforms/LoopUnroll/X86/call-remark.ll  |  5 +--
 .../LoopVectorize/mixed-precision-remarks.ll  | 10 +++---
 .../LowerMatrixIntrinsics/remarks-inlining.ll | 33 ++++++++++++-------
 .../LowerMatrixIntrinsics/remarks.ll          | 27 ++++++++++-----
 .../OpenMP/custom_state_machines_remarks.ll   |  9 ++---
 .../OpenMP/deduplication_remarks.ll           |  5 +--
 .../OpenMP/globalization_remarks.ll           |  5 +--
 llvm/test/Transforms/OpenMP/icv_remarks.ll    | 14 ++++----
 .../OpenMP/parallel_deletion_remarks.ll       |  7 ++--
 .../Transforms/OpenMP/remove_globalization.ll | 11 ++++---
 .../OpenMP/replace_globalization.ll           |  9 ++---
 .../OpenMP/single_threaded_execution.ll       |  5 +--
 .../Transforms/OpenMP/spmdization_remarks.ll  | 13 ++++----
 .../PhaseOrdering/openmp-opt-module.ll        |  3 +-
 .../SampleProfile/csspgo-inline-icall.ll      |  9 ++---
 .../Transforms/SampleProfile/csspgo-inline.ll | 13 ++++----
 .../Transforms/SampleProfile/misexpect.ll     |  9 ++---
 .../Transforms/Util/libcalls-opt-remarks.ll   |  3 +-
 .../trivial-auto-var-init-crash-20210521.ll   |  3 +-
 24 files changed, 141 insertions(+), 89 deletions(-)

diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp
index 342c4cbbc39d65f..3c0f5d0f6d833b4 100644
--- a/llvm/lib/IR/DiagnosticInfo.cpp
+++ b/llvm/lib/IR/DiagnosticInfo.cpp
@@ -159,7 +159,10 @@ std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
   unsigned Column = 0;
   if (isLocationAvailable())
     getLocation(Filename, Line, Column);
-  return (Filename + ":" + Twine(Line) + ":" + Twine(Column)).str();
+  return (getAbsolutePath()
+              ? getAbsolutePath()
+              : Filename + ":" + Twine(Line) + ":" + Twine(Column))
+      .str();
 }
 
 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key,
diff --git a/llvm/test/Transforms/LoopFusion/diagnostics_analysis.ll b/llvm/test/Transforms/LoopFusion/diagnostics_analysis.ll
index 92ca2c10ab0c8d3..0e3cb5f67d429c1 100644
--- a/llvm/test/Transforms/LoopFusion/diagnostics_analysis.ll
+++ b/llvm/test/Transforms/LoopFusion/diagnostics_analysis.ll
@@ -3,8 +3,9 @@
 
 @B = common global [1024 x i32] zeroinitializer, align 16
 
-; CHECK: remark: diagnostics_analysis.c:6:3: [test]: Loop is not a candidate for fusion: Loop contains a volatile access
-; CHECK: remark: diagnostics_analysis.c:10:3: [test]: Loop is not a candidate for fusion: Loop has unknown trip count
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_analysis.c:6:3: [test]: Loop is not a candidate for fusion: Loop contains a volatile access
+; CHECK: remark: {{.*}}diagnostics_analysis.c:10:3: [test]: Loop is not a candidate for fusion: Loop has unknown trip count
 define void @test(ptr %A, i32 %n) !dbg !15 {
 entry:
   %A.addr = alloca ptr, align 8
diff --git a/llvm/test/Transforms/LoopFusion/diagnostics_missed.ll b/llvm/test/Transforms/LoopFusion/diagnostics_missed.ll
index f30a070153742b1..92e6e9bddcb8c97 100644
--- a/llvm/test/Transforms/LoopFusion/diagnostics_missed.ll
+++ b/llvm/test/Transforms/LoopFusion/diagnostics_missed.ll
@@ -5,7 +5,8 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 
 @B = common global [1024 x i32] zeroinitializer, align 16, !dbg !0
 
-; CHECK: remark: diagnostics_missed.c:18:3: [non_adjacent]: entry and for.end: Loops are not adjacent
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:18:3: [non_adjacent]: entry and for.end: Loops are not adjacent
 define void @non_adjacent(ptr noalias %A) !dbg !14 {
 entry:
   br label %for.body
@@ -55,7 +56,8 @@ for.end15:                                        ; preds = %for.cond.cleanup5
   ret void
 }
 
-; CHECK: remark: diagnostics_missed.c:28:3: [different_bounds]: entry and for.end: Loop trip counts are not the same
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:28:3: [different_bounds]: entry and for.end: Loop trip counts are not the same
 define void @different_bounds(ptr noalias %A) !dbg !36 {
 entry:
   br label %for.body
@@ -105,7 +107,8 @@ for.end15:                                        ; preds = %for.cond.cleanup5
   ret void
 }
 
-; CHECK: remark: diagnostics_missed.c:38:3: [negative_dependence]: entry and for.end: Dependencies prevent fusion
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:38:3: [negative_dependence]: entry and for.end: Dependencies prevent fusion
 define void @negative_dependence(ptr noalias %A) !dbg !51 {
 entry:
   br label %for.body
@@ -144,7 +147,8 @@ for.end12:                                        ; preds = %for.inc10
   ret void, !dbg !62
 }
 
-; CHECK: remark: diagnostics_missed.c:51:3: [sumTest]: entry and for.cond2.preheader: Dependencies prevent fusion
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:51:3: [sumTest]: entry and for.cond2.preheader: Dependencies prevent fusion
 define i32 @sumTest(ptr noalias %A) !dbg !63 {
 entry:
   br label %for.body
@@ -186,7 +190,8 @@ for.end12:                                        ; preds = %for.inc10
 ; Function Attrs: nounwind readnone speculatable willreturn
 declare void @llvm.dbg.value(metadata, metadata, metadata) #0
 
-; CHECK: remark: diagnostics_missed.c:62:3: [unsafe_preheader]: for.first.preheader and for.second.preheader: Loop has a non-empty preheader with instructions that cannot be moved
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:62:3: [unsafe_preheader]: for.first.preheader and for.second.preheader: Loop has a non-empty preheader with instructions that cannot be moved
 define void @unsafe_preheader(ptr noalias %A, ptr noalias %B) {
 for.first.preheader:
   br label %for.first, !dbg !80
@@ -215,7 +220,8 @@ for.end:
   ret void
 }
 
-; CHECK: remark: diagnostics_missed.c:67:3: [unsafe_exitblock]: for.first.preheader and for.second.preheader: Candidate has a non-empty exit block with instructions that cannot be moved
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:67:3: [unsafe_exitblock]: for.first.preheader and for.second.preheader: Candidate has a non-empty exit block with instructions that cannot be moved
 define void @unsafe_exitblock(ptr noalias %A, ptr noalias %B, i64 %N) {
 for.first.guard:
   %cmp3 = icmp slt i64 0, %N
@@ -258,7 +264,8 @@ for.end:
   ret void
 }
 
-; CHECK: remark: diagnostics_missed.c:72:3: [unsafe_guardblock]: for.first.preheader and for.second.preheader: Candidate has a non-empty guard block with instructions that cannot be moved
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}diagnostics_missed.c:72:3: [unsafe_guardblock]: for.first.preheader and for.second.preheader: Candidate has a non-empty guard block with instructions that cannot be moved
 define void @unsafe_guardblock(ptr noalias %A, ptr noalias %B, i64 %N) {
 for.first.guard:
   %cmp3 = icmp slt i64 0, %N
diff --git a/llvm/test/Transforms/LoopIdiom/memcpy-debugify-remarks.ll b/llvm/test/Transforms/LoopIdiom/memcpy-debugify-remarks.ll
index 264f34dd044af3c..0c26d1bf2378fe1 100644
--- a/llvm/test/Transforms/LoopIdiom/memcpy-debugify-remarks.ll
+++ b/llvm/test/Transforms/LoopIdiom/memcpy-debugify-remarks.ll
@@ -7,7 +7,8 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; Check that everything still works when debuginfo is present, and that it is reasonably propagated.
 
-; CHECK: remark: <stdin>:6:1: Formed a call to llvm.memcpy.p0.p0.i64() intrinsic from load and store instruction in test6_dest_align function{{$}}
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}<stdin>:6:1: Formed a call to llvm.memcpy.p0.p0.i64() intrinsic from load and store instruction in test6_dest_align function{{$}}
 
 ; YAML:      --- !Passed
 ; YAML-NEXT: Pass:            loop-idiom
diff --git a/llvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll b/llvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll
index 7ff6446fb47704b..034f08360f61768 100644
--- a/llvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll
+++ b/llvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll
@@ -12,7 +12,8 @@ target triple = "x86_64-unknown-linux-gnu"
 ;     *begin = value;
 ; }
 
-; CHECK: remark: <stdin>:4:1: Transformed loop-strided store in _Z15my_basic_memsetPcS_c function into a call to llvm.memset.p0.i64() intrinsic{{$}}
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}<stdin>:4:1: Transformed loop-strided store in _Z15my_basic_memsetPcS_c function into a call to llvm.memset.p0.i64() intrinsic{{$}}
 
 ; YAML:      --- !Passed
 ; YAML-NEXT: Pass:            loop-idiom
diff --git a/llvm/test/Transforms/LoopUnroll/X86/call-remark.ll b/llvm/test/Transforms/LoopUnroll/X86/call-remark.ll
index d34acc8f716131f..f5d866620664fce 100644
--- a/llvm/test/Transforms/LoopUnroll/X86/call-remark.ll
+++ b/llvm/test/Transforms/LoopUnroll/X86/call-remark.ll
@@ -5,8 +5,9 @@
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
-; TTI: remark: <stdin>:7:1: advising against unrolling the loop because it contains a call
-; UNROLL: remark: <stdin>:14:1: unrolled loop by a factor of 8 with run-time trip count
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; TTI: remark: {{.*}}<stdin>:7:1: advising against unrolling the loop because it contains a call
+; UNROLL: remark: {{.*}}<stdin>:14:1: unrolled loop by a factor of 8 with run-time trip count
 
 define void @contains_external_call(i32 %count) {
 ; ALL-LABEL: @contains_external_call(
diff --git a/llvm/test/Transforms/LoopVectorize/mixed-precision-remarks.ll b/llvm/test/Transforms/LoopVectorize/mixed-precision-remarks.ll
index ba6852418ef29df..1833d751ceb1fac 100644
--- a/llvm/test/Transforms/LoopVectorize/mixed-precision-remarks.ll
+++ b/llvm/test/Transforms/LoopVectorize/mixed-precision-remarks.ll
@@ -1,6 +1,7 @@
 ; RUN: opt -force-vector-interleave=2 -force-vector-width=4 -passes=loop-vectorize -pass-remarks-analysis=loop-vectorize -disable-output < %s 2>&1 | FileCheck %s
 
-; CHECK: remark: mixed-precision.c:3:26: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}mixed-precision.c:3:26: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
 define void @f(ptr noalias nocapture %X, i64 %N) {
 entry:
   br label %for.body
@@ -21,9 +22,10 @@ for.body:
   br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
 }
 
-; CHECK: remark: mixed-precision.c:8:8: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
-; CHECK: remark: mixed-precision.c:7:16: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
-; CHECK-NOT: remark: mixed-precision.c:7:16: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}mixed-precision.c:8:8: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
+; CHECK: remark: {{.*}}mixed-precision.c:7:16: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
+; CHECK-NOT: remark: {{.*}}mixed-precision.c:7:16: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance.
 define void @g(ptr noalias nocapture %X, ptr noalias nocapture %Y, i64 %N) {
 entry:
   %pi = alloca double
diff --git a/llvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll b/llvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll
index aaabd18958fae68..069b41358219b53 100644
--- a/llvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll
+++ b/llvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll
@@ -47,49 +47,60 @@
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "aarch64-apple-ios"
 
-; CHECK-LABEL: remark: load.h:41:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}load.h:41:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  load(addr %A)
 
-; CHECK-LABEL: remark: load.h:41:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}load.h:41:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  column.major.load.3x5.double(addr %B, 5)
 
-; CHECK-LABEL: remark: load.h:41:11: Lowered with 0 stores, 1 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}load.h:41:11: Lowered with 0 stores, 1 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT: load(addr %D)
 
-; CHECK-LABEL: remark: assign.h:32:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}assign.h:32:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  load(addr %A)
 
-; CHECK-LABEL: remark: assign.h:32:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}assign.h:32:43: Lowered with 0 stores, 10 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  column.major.load.3x5.double(addr %B, 5)
 
-; CHECK-LABEL: remark: toplevel.c:410:0: Lowered with 10 stores, 20 loads, 10 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}toplevel.c:410:0: Lowered with 10 stores, 20 loads, 10 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   fadd(
 ; CHECK-NEXT:    load(addr %A),
 ; CHECK-NEXT:    column.major.load.3x5.double(addr %B, 5)),
 ; CHECK-NEXT:   addr %C)
 
-; CHECK-LABEL: remark: toplevel.c:510:0: Lowered with 2 stores, 1 loads, 4 compute ops, 1 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}toplevel.c:510:0: Lowered with 2 stores, 1 loads, 4 compute ops, 1 exposed transposes
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   transpose.2x1.float(load(addr %D)),
 ; CHECK-NEXT:   addr %D)
 
-; CHECK-LABEL: remark: add.h:66:11: Lowered with 0 stores, 0 loads, 10 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}add.h:66:11: Lowered with 0 stores, 0 loads, 10 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  fadd(
 ; CHECK-NEXT:   addr %A,
 ; CHECK-NEXT:   scalar)
 
-; CHECK-LABEL: remark: store.h:10:11: Lowered with 10 stores, 0 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}store.h:10:11: Lowered with 10 stores, 0 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   scalar,
 ; CHECK-NEXT:   addr %C)
 
-; CHECK-LABEL: remark: store.h:66:11: Lowered with 2 stores, 0 loads, 0 compute ops, 0 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}store.h:66:11: Lowered with 2 stores, 0 loads, 0 compute ops, 0 exposed transposes
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:  scalar,
 ; CHECK-NEXT:  addr %D)
 
-; CHECK-LABEL: remark: transpose.h:13:11: Lowered with 0 stores, 0 loads, 4 compute ops, 1 exposed transposes
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}transpose.h:13:11: Lowered with 0 stores, 0 loads, 4 compute ops, 1 exposed transposes
 ; CHECK-NEXT:  transpose.2x1.float(addr %D)
 
 define void @toplevel(ptr %A, ptr %B, ptr %C, ptr %D) !dbg !16 {
diff --git a/llvm/test/Transforms/LowerMatrixIntrinsics/remarks.ll b/llvm/test/Transforms/LowerMatrixIntrinsics/remarks.ll
index 628ff08b81679a7..62d377a9de4a253 100644
--- a/llvm/test/Transforms/LowerMatrixIntrinsics/remarks.ll
+++ b/llvm/test/Transforms/LowerMatrixIntrinsics/remarks.ll
@@ -4,7 +4,8 @@
 
 ; RUN: opt -passes=lower-matrix-intrinsics -pass-remarks=lower-matrix-intrinsics -mtriple=arm64-apple-iphoneos < %s 2>&1 | FileCheck %s
 
-; CHECK-LABEL: remark: test.h:40:20: Lowered with 6 stores, 6 loads, 24 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:40:20: Lowered with 6 stores, 6 loads, 24 compute ops
 ; CHECK-NEXT: store(
 ; CHECK-NEXT:  transpose.2x6.double(load(addr %A)),
 ; CHECK-NEXT:  addr %B)
@@ -15,7 +16,8 @@ define void @transpose(ptr %A, ptr %B) !dbg !23 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:50:20: Lowered with 2 stores, 12 loads, 22 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:50:20: Lowered with 2 stores, 12 loads, 22 compute ops
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   multiply.2x6.6x2.double(
 ; CHECK-NEXT:    load(addr %A),
@@ -29,7 +31,8 @@ define void @multiply(ptr %A, ptr %B, ptr %C) !dbg !25 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:60:20: Lowered with 6 stores, 6 loads, 0 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:60:20: Lowered with 6 stores, 6 loads, 0 compute ops
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   column.major.load.3x3.double(addr %A, 5),
 ; CHECK-NEXT:   addr %B)
@@ -39,7 +42,8 @@ define void @column.major.load(ptr %A, ptr %B) !dbg !27 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:70:20: Lowered with 6 stores, 6 loads, 0 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:70:20: Lowered with 6 stores, 6 loads, 0 compute ops
 ; CHECK-NEXT:  column.major.store.3x3.double(
 ; CHECK-NEXT:   column.major.load.3x3.double(addr %A, 5),
 ; CHECK-NEXT:   addr %B,
@@ -50,7 +54,8 @@ define void @column.major.store(ptr %A, ptr %B) !dbg !29 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:80:20: Lowered with 6 stores, 6 loads, 12 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:80:20: Lowered with 6 stores, 6 loads, 12 compute ops
 ; CHECK-NEXT:  column.major.store.3x3.double(
 ; CHECK-NEXT:   fmul(
 ; CHECK-NEXT:    fadd(
@@ -68,7 +73,8 @@ define void @binaryops(ptr %A, ptr %B) !dbg !31 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:90:20: Lowered with 6 stores, 6 loads, 12 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:90:20: Lowered with 6 stores, 6 loads, 12 compute ops
 ; CHECK-NEXT:  column.major.store.3x3.double(
 ; CHECK-NEXT:   fmul(
 ; CHECK-NEXT:    fadd(
@@ -77,7 +83,8 @@ define void @binaryops(ptr %A, ptr %B) !dbg !31 {
 ; CHECK-NEXT:    (reused) column.major.load.3x3.double(addr %A, 5)),
 ; CHECK-NEXT:   addr %B,
 ; CHECK-NEXT:   10)
-; CHECK-NEXT:  remark: test.h:90:20: Lowered with 2 stores, 12 loads, 22 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-NEXT:  remark: {{.*}}test.h:90:20: Lowered with 2 stores, 12 loads, 22 compute ops
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   multiply.2x6.6x2.double(
 ; CHECK-NEXT:    load(addr %C),
@@ -98,7 +105,8 @@ define void @multiple_expressions(ptr %A, ptr %B, ptr %C, ptr %D, ptr %E) !dbg !
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:100:20: Lowered with 6 stores, 6 loads, 12 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:100:20: Lowered with 6 stores, 6 loads, 12 compute ops
 ; CHECK-NEXT:  column.major.store.3x3.double(
 ; CHECK-NEXT:   fmul(
 ; CHECK-NEXT:    fadd(
@@ -115,7 +123,8 @@ define void @stackaddresses(ptr %A, ptr %B) !dbg !35 {
   ret void
 }
 
-; CHECK-LABEL: remark: test.h:30:20: Lowered with 10 stores, 9 loads, 30 compute ops
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-LABEL: remark: {{.*}}test.h:30:20: Lowered with 10 stores, 9 loads, 30 compute ops
 ; CHECK-NEXT:  store(
 ; CHECK-NEXT:   transpose.5x3.double(load(addr %A)),
 ; CHECK-NEXT:   stack addr %s1)
diff --git a/llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll b/llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll
index 0c542bb27f4f46c..beba550dc0ebfb3 100644
--- a/llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/custom_state_machines_remarks.ll
@@ -1,10 +1,11 @@
 ; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -pass-remarks-analysis=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
 target triple = "nvptx64"
 
-; CHECK: remark: llvm/test/Transforms/OpenMP/custom_state_machines_remarks.c:11:1: Generic-mode kernel is executed with a customized state machine that requires a fallback.
-; CHECK: remark: llvm/test/Transforms/OpenMP/custom_state_machines_remarks.c:13:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/custom_state_machines_remarks.c:15:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/custom_state_machines_remarks.c:20:1: Rewriting generic-mode kernel with a customized state machine.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}custom_state_machines_remarks.c:11:1: Generic-mode kernel is executed with a customized state machine that requires a fallback.
+; CHECK: remark: {{.*}}custom_state_machines_remarks.c:13:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
+; CHECK: remark: {{.*}}custom_state_machines_remarks.c:15:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
+; CHECK: remark: {{.*}}custom_state_machines_remarks.c:20:1: Rewriting generic-mode kernel with a customized state machine.
 
 
 ;; void unknown(void);
diff --git a/llvm/test/Transforms/OpenMP/deduplication_remarks.ll b/llvm/test/Transforms/OpenMP/deduplication_remarks.ll
index 1b0f00603ff451f..f015e9b87690264 100644
--- a/llvm/test/Transforms/OpenMP/deduplication_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/deduplication_remarks.ll
@@ -9,8 +9,9 @@ target triple = "x86_64-pc-linux-gnu"
 @0 = private unnamed_addr global %struct.ident_t { i32 0, i32 34, i32 0, i32 0, ptr @.str0 }, align 8
 @.str0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
 
-; CHECK: remark: deduplication_remarks.c:7:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
-; CHECK: remark: deduplication_remarks.c:9:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}deduplication_remarks.c:7:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
+; CHECK: remark: {{.*}}deduplication_remarks.c:9:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
 define dso_local void @deduplicate() local_unnamed_addr !dbg !14 {
   %1 = tail call i32 @__kmpc_global_thread_num(ptr nonnull @0), !dbg !21
   call void @useI32(i32 %1), !dbg !23
diff --git a/llvm/test/Transforms/OpenMP/globalization_remarks.ll b/llvm/test/Transforms/OpenMP/globalization_remarks.ll
index fdd0e41fd252585..c09e40d70d5ddc5 100644
--- a/llvm/test/Transforms/OpenMP/globalization_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/globalization_remarks.ll
@@ -4,8 +4,9 @@ source_filename = "declare_target_codegen_globalization.cpp"
 target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
 target triple = "nvptx64"
 
-; CHECK: remark: globalization_remarks.c:5:7: Could not move globalized variable to the stack. Variable is potentially captured in call. Mark parameter as `__attribute__((noescape))` to override.
-; CHECK: remark: globalization_remarks.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}globalization_remarks.c:5:7: Could not move globalized variable to the stack. Variable is potentially captured in call. Mark parameter as `__attribute__((noescape))` to override.
+; CHECK: remark: {{.*}}globalization_remarks.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization.
 
 %struct.KernelEnvironmentTy = type { %struct.ConfigurationEnvironmentTy, ptr, ptr }
 %struct.ConfigurationEnvironmentTy = type { i8, i8, i8 }
diff --git a/llvm/test/Transforms/OpenMP/icv_remarks.ll b/llvm/test/Transforms/OpenMP/icv_remarks.ll
index f76d4876a55decb..56964fe59bb445a 100644
--- a/llvm/test/Transforms/OpenMP/icv_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/icv_remarks.ll
@@ -11,9 +11,10 @@ target triple = "x86_64-unknown-linux-gnu"
 @0 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 0, ptr @.str }, align 8
 @1 = private unnamed_addr constant [26 x i8] c";icv_remarks.c;foo;18;1;;\00", align 1
 
-; CHECK-DAG: remark: icv_remarks.c:12:0: OpenMP ICV nthreads Value: IMPLEMENTATION_DEFINED
-; CHECK-DAG: remark: icv_remarks.c:12:0: OpenMP ICV active_levels Value: 0
-; CHECK-DAG: remark: icv_remarks.c:12:0: OpenMP ICV cancel Value: 0
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:12:0: OpenMP ICV nthreads Value: IMPLEMENTATION_DEFINED
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:12:0: OpenMP ICV active_levels Value: 0
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:12:0: OpenMP ICV cancel Value: 0
 define dso_local void @foo(i32 %a) local_unnamed_addr #0 !dbg !17 {
 entry:
   %.kmpc_loc.addr = alloca %struct.ident_t, align 8
@@ -35,9 +36,10 @@ declare !dbg !9 dso_local i32 @omp_get_max_threads() local_unnamed_addr #1
 
 declare !dbg !12 dso_local void @use(i32) local_unnamed_addr #2
 
-; CHECK-DAG: remark: icv_remarks.c:18:0: OpenMP ICV nthreads Value: IMPLEMENTATION_DEFINED
-; CHECK-DAG: remark: icv_remarks.c:18:0: OpenMP ICV active_levels Value: 0
-; CHECK-DAG: remark: icv_remarks.c:18:0: OpenMP ICV cancel Value: 0
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:18:0: OpenMP ICV nthreads Value: IMPLEMENTATION_DEFINED
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:18:0: OpenMP ICV active_levels Value: 0
+; CHECK-DAG: remark: {{.*}}icv_remarks.c:18:0: OpenMP ICV cancel Value: 0
 define internal void @.omp_outlined.(ptr noalias nocapture readnone %.global_tid., ptr noalias nocapture readnone %.bound_tid.) #3 !dbg !33 {
 entry:
   call void @llvm.dbg.value(metadata ptr %.global_tid., metadata !41, metadata !DIExpression()), !dbg !43
diff --git a/llvm/test/Transforms/OpenMP/parallel_deletion_remarks.ll b/llvm/test/Transforms/OpenMP/parallel_deletion_remarks.ll
index bb764c2767f4031..d5875ae33ffb349 100644
--- a/llvm/test/Transforms/OpenMP/parallel_deletion_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/parallel_deletion_remarks.ll
@@ -22,9 +22,10 @@ target triple = "x86_64-pc-linux-gnu"
 ;
 ; This will delete all but the first parallel region
 
-; CHECK: remark: parallel_deletion_remarks.c:10:1: Removing parallel region with no side-effects.
-; CHECK: remark: parallel_deletion_remarks.c:12:1: Removing parallel region with no side-effects.
-; CHECK: remark: parallel_deletion_remarks.c:14:1: Removing parallel region with no side-effects.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}parallel_deletion_remarks.c:10:1: Removing parallel region with no side-effects.
+; CHECK: remark: {{.*}}parallel_deletion_remarks.c:12:1: Removing parallel region with no side-effects.
+; CHECK: remark: {{.*}}parallel_deletion_remarks.c:14:1: Removing parallel region with no side-effects.
 define dso_local void @delete_parallel() local_unnamed_addr !dbg !15 {
   call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr nonnull @0, i32 0, ptr @.omp_outlined.), !dbg !18
   call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr nonnull @0, i32 0, ptr @.omp_outlined..2), !dbg !19
diff --git a/llvm/test/Transforms/OpenMP/remove_globalization.ll b/llvm/test/Transforms/OpenMP/remove_globalization.ll
index 232699358929965..9eaf5a70adc9d7c 100644
--- a/llvm/test/Transforms/OpenMP/remove_globalization.ll
+++ b/llvm/test/Transforms/OpenMP/remove_globalization.ll
@@ -12,11 +12,12 @@ target triple = "nvptx64"
 
 
 ; UTC_ARGS: --disable
-; CHECK-REMARKS: remark: remove_globalization.c:4:2: Could not move globalized variable to the stack. Variable is potentially captured in call. Mark parameter as `__attribute__((noescape))` to override.
-; CHECK-REMARKS: remark: remove_globalization.c:2:2: Moving globalized variable to the stack.
-; CHECK-REMARKS: remark: remove_globalization.c:4:2: Moving globalized variable to the stack.
-; CHECK-REMARKS: remark: remove_globalization.c:10:2: Moving globalized variable to the stack.
-; CHECK-REMARKS: remark: remove_globalization.c:6:2: Moving globalized variable to the stack.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-REMARKS: remark: {{.*}}remove_globalization.c:4:2: Could not move globalized variable to the stack. Variable is potentially captured in call. Mark parameter as `__attribute__((noescape))` to override.
+; CHECK-REMARKS: remark: {{.*}}remove_globalization.c:2:2: Moving globalized variable to the stack.
+; CHECK-REMARKS: remark: {{.*}}remove_globalization.c:4:2: Moving globalized variable to the stack.
+; CHECK-REMARKS: remark: {{.*}}remove_globalization.c:10:2: Moving globalized variable to the stack.
+; CHECK-REMARKS: remark: {{.*}}remove_globalization.c:6:2: Moving globalized variable to the stack.
 ; UTC_ARGS: --enable
 
 ; Make it a weak definition so we will apply custom state machine rewriting but can't use the body in the reasoning.
diff --git a/llvm/test/Transforms/OpenMP/replace_globalization.ll b/llvm/test/Transforms/OpenMP/replace_globalization.ll
index 6469558728757cc..0190a2287f75896 100644
--- a/llvm/test/Transforms/OpenMP/replace_globalization.ll
+++ b/llvm/test/Transforms/OpenMP/replace_globalization.ll
@@ -6,11 +6,12 @@ target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
 target triple = "nvptx64"
 
 ; UTC_ARGS: --disable
-; CHECK-REMARKS: remark: replace_globalization.c:5:7: Replaced globalized variable with 16 bytes of shared memory
-; CHECK-REMARKS: remark: replace_globalization.c:5:14: Replaced globalized variable with 4 bytes of shared memory
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK-REMARKS: remark: {{.*}}replace_globalization.c:5:7: Replaced globalized variable with 16 bytes of shared memory
+; CHECK-REMARKS: remark: {{.*}}replace_globalization.c:5:14: Replaced globalized variable with 4 bytes of shared memory
 ; CHECK-REMARKS-NOT: 6 bytes
-; CHECK-LIMIT: remark: replace_globalization.c:5:14: Replaced globalized variable with 4 bytes of shared memory
-; CHECK-LIMIT: remark: replace_globalization.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization
+; CHECK-LIMIT: remark: {{.*}}replace_globalization.c:5:14: Replaced globalized variable with 4 bytes of shared memory
+; CHECK-LIMIT: remark: {{.*}}replace_globalization.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization
 ; UTC_ARGS: --enable
 
 %struct.ident_t = type { i32, i32, i32, i32, ptr }
diff --git a/llvm/test/Transforms/OpenMP/single_threaded_execution.ll b/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
index 01f73714eb4869c..95e2caea124a649 100644
--- a/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
+++ b/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
@@ -43,8 +43,9 @@ entry:
   ret void
 }
 
-; REMARKS: remark: single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
-; REMARKS-NOT: remark: single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; REMARKS: remark: {{.*}}single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
+; REMARKS-NOT: remark: {{.*}}single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
 
 ; CHECK-NOT: [openmp-opt] Basic block @nvptx entry is executed by a single thread.
 ; CHECK-DAG: [openmp-opt] Basic block @nvptx if.then is executed by a single thread.
diff --git a/llvm/test/Transforms/OpenMP/spmdization_remarks.ll b/llvm/test/Transforms/OpenMP/spmdization_remarks.ll
index 08ddcfc07d50cf9..0fbee0c6127791e 100644
--- a/llvm/test/Transforms/OpenMP/spmdization_remarks.ll
+++ b/llvm/test/Transforms/OpenMP/spmdization_remarks.ll
@@ -1,12 +1,13 @@
 ; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -pass-remarks-analysis=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
 target triple = "nvptx64"
 
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:13:5: Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:15:5: Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:11:1: Generic-mode kernel is executed with a customized state machine that requires a fallback.
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:13:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:15:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
-; CHECK: remark: llvm/test/Transforms/OpenMP/spmdization_remarks.c:20:1: Transformed generic-mode kernel to SPMD-mode.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}spmdization_remarks.c:13:5: Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override.
+; CHECK: remark: {{.*}}spmdization_remarks.c:15:5: Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override.
+; CHECK: remark: {{.*}}spmdization_remarks.c:11:1: Generic-mode kernel is executed with a customized state machine that requires a fallback.
+; CHECK: remark: {{.*}}spmdization_remarks.c:13:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
+; CHECK: remark: {{.*}}spmdization_remarks.c:15:5: Call may contain unknown parallel regions. Use `__attribute__((assume("omp_no_parallelism")))` to override.
+; CHECK: remark: {{.*}}spmdization_remarks.c:20:1: Transformed generic-mode kernel to SPMD-mode.
 
 
 ;; void unknown(void);
diff --git a/llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll b/llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
index b8486ab6a6c9ec0..4604b0c333458dd 100644
--- a/llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
+++ b/llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
@@ -8,7 +8,8 @@ target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
 @S = external local_unnamed_addr global ptr
 @foo_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 1, i8 0, i8 1 }, ptr null, ptr null }
 
-; MODULE: remark: openmp_opt_module.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; MODULE: remark: {{.*}}openmp_opt_module.c:5:7: Found thread data sharing on the GPU. Expect degraded performance due to data globalization.
 
 define void @foo() "kernel" {
 entry:
diff --git a/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll b/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
index 32b47bcfc6d8491..81a6668ad28ffd8 100644
--- a/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
+++ b/llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
@@ -55,10 +55,11 @@ attributes #0 = {"use-sample-profile"}
 !11 = distinct !DISubprogram(name: "zoo", linkageName: "_Z3zoov", scope: !1, file: !1, line: 24, unit: !0)
 
 
-; ICP-ALL:      remark: test.cc:4:0: '_Z3foov' inlined into 'test'
-; ICP-ALL-NEXT: remark: test.cc:4:0: '_Z3barv' inlined into 'test'
-; ICP-ALL-NEXT: remark: test.cc:5:0: '_Z3bazv' inlined into 'test'
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; ICP-ALL:      remark: {{.*}}test.cc:4:0: '_Z3foov' inlined into 'test'
+; ICP-ALL-NEXT: remark: {{.*}}test.cc:4:0: '_Z3barv' inlined into 'test'
+; ICP-ALL-NEXT: remark: {{.*}}test.cc:5:0: '_Z3bazv' inlined into 'test'
 ; ICP-ALL-NOT: remark
 
-; ICP-HOT: remark: test.cc:4:0: '_Z3foov' inlined into 'test'
+; ICP-HOT: remark: {{.*}}test.cc:4:0: '_Z3foov' inlined into 'test'
 ; ICP-HOT-NOT: remark
diff --git a/llvm/test/Transforms/SampleProfile/csspgo-inline.ll b/llvm/test/Transforms/SampleProfile/csspgo-inline.ll
index 177329f9549792a..6fd59a895705444 100644
--- a/llvm/test/Transforms/SampleProfile/csspgo-inline.ll
+++ b/llvm/test/Transforms/SampleProfile/csspgo-inline.ll
@@ -28,17 +28,18 @@
 ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/profile-context-tracker.prof -sample-profile-inline-size -profile-summary-cutoff-hot=999990 -sample-profile-inline-limit-min=10 -sample-profile-inline-growth-limit=1 -profile-sample-accurate -S -pass-remarks=inline -o /dev/null 2>&1 | FileCheck %s --check-prefix=INLINE-NEW-LIMIT2
 
 
-; INLINE-BASE: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
-; INLINE-BASE: remark: merged.cpp:27:11: '_Z8funcLeafi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
-; INLINE-BASE: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; INLINE-BASE: remark: {{.*}}merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
+; INLINE-BASE: remark: {{.*}}merged.cpp:27:11: '_Z8funcLeafi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
+; INLINE-BASE: remark: {{.*}}merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
 
-; INLINE-NEW: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
+; INLINE-NEW: remark: {{.*}}merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
 ; INLINE-NEW-NOT: remark
 
 ; INLINE-NEW-LIMIT1-NOT: remark
 
-; INLINE-NEW-LIMIT2: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
-; INLINE-NEW-LIMIT2: remark: merged.cpp:27:11: '_Z8funcLeafi' inlined into '_Z5funcAi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11;
+; INLINE-NEW-LIMIT2: remark: {{.*}}merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
+; INLINE-NEW-LIMIT2: remark: {{.*}}merged.cpp:27:11: '_Z8funcLeafi' inlined into '_Z5funcAi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11;
 ; INLINE-NEW-LIMIT2-NOT: remark
 
 @factor = dso_local global i32 3, align 4, !dbg !0
diff --git a/llvm/test/Transforms/SampleProfile/misexpect.ll b/llvm/test/Transforms/SampleProfile/misexpect.ll
index 26f76ee5fccbf04..551d7784922f2f4 100644
--- a/llvm/test/Transforms/SampleProfile/misexpect.ll
+++ b/llvm/test/Transforms/SampleProfile/misexpect.ll
@@ -29,11 +29,12 @@
 ;   return 0;
 ; }
 
-; WARNING-DAG: warning: test.cc:9:14: 20.06%
-; WARNING-DAG: warning: test.cc:11:24: 92.74%
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; WARNING-DAG: warning: {{.*}}test.cc:9:14: 20.06%
+; WARNING-DAG: warning: {{.*}}test.cc:11:24: 92.74%
 
-; NONE-NOT: warning: test.cc:9:14: 20.06%
-; NONE-NOT: warning: test.cc:11:24: 92.74%
+; NONE-NOT: warning: {{.*}}test.cc:9:14: 20.06%
+; NONE-NOT: warning: {{.*}}test.cc:11:24: 92.74%
 
 @.str = private unnamed_addr constant [15 x i8] c"result is %lf\0A\00", align 1
 
diff --git a/llvm/test/Transforms/Util/libcalls-opt-remarks.ll b/llvm/test/Transforms/Util/libcalls-opt-remarks.ll
index 3c0130c3f099741..73d787c30e97b38 100644
--- a/llvm/test/Transforms/Util/libcalls-opt-remarks.ll
+++ b/llvm/test/Transforms/Util/libcalls-opt-remarks.ll
@@ -5,7 +5,8 @@
 ; RUN:     -pass-remarks-output=%t -S -pass-remarks=instcombine 2>&1 | FileCheck %s
 ; RUN: cat %t | FileCheck -check-prefix=YAML %s
 
-; CHECK:      remark: libcalls-opt-remarks.c:10:10: folded strlen(select) to select of constants{{$}}
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK:      remark: {{.*}}libcalls-opt-remarks.c:10:10: folded strlen(select) to select of constants{{$}}
 ; CHECK-NOT:  remark:
 
 ; YAML:      --- !Passed
diff --git a/llvm/test/Transforms/Util/trivial-auto-var-init-crash-20210521.ll b/llvm/test/Transforms/Util/trivial-auto-var-init-crash-20210521.ll
index b438b5e24b3a82f..034208ec35559e8 100644
--- a/llvm/test/Transforms/Util/trivial-auto-var-init-crash-20210521.ll
+++ b/llvm/test/Transforms/Util/trivial-auto-var-init-crash-20210521.ll
@@ -14,7 +14,8 @@ define void @spam() local_unnamed_addr #1 !dbg !3 {
 bb:
   call void @llvm.dbg.value(metadata ptr null, metadata !21, metadata !DIExpression()) #3, !dbg !28
 
-; CHECK: remark: :1:0: Call to memset inserted by -ftrivial-auto-var-init. Memory operation size: 0 bytes.
+; BISHENG: BiSheng compiler prints absolute path names for remarks
+; CHECK: remark: {{.*}}:1:0: Call to memset inserted by -ftrivial-auto-var-init. Memory operation size: 0 bytes.
   tail call void @llvm.memset.p0.i64(ptr null, i8 0, i64 0, i1 false), !annotation !33, !dbg !28
   ret void
 }



More information about the llvm-commits mailing list