[PATCH] D112745: Point replay file to non-existent dummy

Steven Wan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 12:10:21 PDT 2021


stevewan created this revision.
Herald added a subscriber: wenlei.
stevewan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Operating systems such as AIX allow open and read on directories, passing in a direcotry as the replay file triggers `Invalid remark format`
instead of `Could not open remarks file: Is a directory`. This patch substitutes the directory with a non-existent filename. The current filecheck should
still work as-is.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112745

Files:
  llvm/test/Transforms/Inline/cgscc-inline-replay.ll
  llvm/test/Transforms/SampleProfile/inline-replay.ll


Index: llvm/test/Transforms/SampleProfile/inline-replay.ll
===================================================================
--- llvm/test/Transforms/SampleProfile/inline-replay.ll
+++ llvm/test/Transforms/SampleProfile/inline-replay.ll
@@ -15,7 +15,7 @@
 ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline-topdown-inline-all.prof -sample-profile-inline-replay=%S/Inputs/inline-replay-function-scope.txt -sample-profile-inline-replay-scope=Function -sample-profile-merge-inlinee -sample-profile-top-down-load -pass-remarks=inline -S 2>&1 | FileCheck -check-prefix=REPLAY-ALL-FUNCTION %s
 
 ;; Check behavior on non-existent replay file
-; RUN: not opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline-topdown.prof -sample-profile-inline-replay=%S -sample-profile-merge-inlinee -sample-profile-top-down-load -pass-remarks=inline -S 2>&1 | FileCheck -check-prefix=REPLAY-ERROR %s
+; RUN: not opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline-topdown.prof -sample-profile-inline-replay=%S/non-existent-dummy.txt -sample-profile-merge-inlinee -sample-profile-top-down-load -pass-remarks=inline -S 2>&1 | FileCheck -check-prefix=REPLAY-ERROR %s
 
 ;; Check scope inlining errors out on non <Module|Function> inputs
 ; RUN: not opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/inline-topdown.prof -sample-profile-inline-replay=%S/Inputs/inline-replay.txt -sample-profile-inline-replay-scope=function -sample-profile-merge-inlinee -sample-profile-top-down-load -pass-remarks=inline -S 2>&1 | FileCheck -check-prefix=REPLAY-ERROR-SCOPE %s
Index: llvm/test/Transforms/Inline/cgscc-inline-replay.ll
===================================================================
--- llvm/test/Transforms/Inline/cgscc-inline-replay.ll
+++ llvm/test/Transforms/Inline/cgscc-inline-replay.ll
@@ -10,7 +10,7 @@
 ; RUN: opt < %s -passes=inline -cgscc-inline-replay=%S/Inputs/cgscc-inline-replay.txt -cgscc-inline-replay-scope=Function -pass-remarks=inline --disable-output 2>&1 | FileCheck -check-prefix=REPLAY-FUNCTION %s
 
 ;; Check behavior on non-existent replay file
-; RUN: not opt < %s -passes=inline -cgscc-inline-replay=%S -pass-remarks=inline --disable-output 2>&1 | FileCheck -check-prefix=REPLAY-ERROR %s
+; RUN: not opt < %s -passes=inline -cgscc-inline-replay=%S/non-existent-dummy.txt -pass-remarks=inline --disable-output 2>&1 | FileCheck -check-prefix=REPLAY-ERROR %s
 
 ;; Check scope inlining errors out on non <Module|Function> inputs
 ; RUN: not opt < %s -passes=inline -cgscc-inline-replay=%S/Inputs/cgscc-inline-replay.txt -cgscc-inline-replay-scope=function -pass-remarks=inline --disable-output 2>&1 | FileCheck -check-prefix=REPLAY-ERROR-SCOPE %s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112745.383113.patch
Type: text/x-patch
Size: 2725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/3b675843/attachment.bin>


More information about the llvm-commits mailing list