Skip to content

Commit 1ec1b83

Browse files
committed
Change prefetch directive format to use , instead of @
1 parent 90be932 commit 1ec1b83

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,11 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
320320
// past-the-end element.
321321
if (FI == ProgramPathAndClusterInfo.end())
322322
continue;
323-
assert(Values.size() == 1);
324323
SmallVector<StringRef, 2> PrefetchTargetStr;
325-
Values[0].split(PrefetchTargetStr, '@');
326-
assert(PrefetchTargetStr.size() == 2);
324+
Values[0].split(PrefetchTargetStr, ',');
325+
if (PrefetchTargetStr.size() != 2)
326+
return createProfileParseError(
327+
Twine("Prefetch target target expected: ") + Value);
327328
auto TargetBBID = parseUniqueBBID(PrefetchTargetStr[0]);
328329
if (!TargetBBID)
329330
return TargetBBID.takeError();

llvm/test/CodeGen/X86/basic-block-sections-code-prefetch.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
;; Specify the bb sections profile:
44
; RUN: echo 'v1' > %t
55
; RUN: echo 'f _Z3foob' >> %t
6-
; RUN: echo 't 0@0' >> %t
7-
; RUN: echo 't 1@0' >> %t
8-
; RUN: echo 't 1@1' >> %t
9-
; RUN: echo 't 2@1' >> %t
6+
; RUN: echo 't 0,0' >> %t
7+
; RUN: echo 't 1,0' >> %t
8+
; RUN: echo 't 1,1' >> %t
9+
; RUN: echo 't 2,1' >> %t
1010
; RUN: echo 'f _Z3barv' >> %t
11-
; RUN: echo 't 0@0' >> %t
12-
; RUN: echo 't 21@1' >> %t
11+
; RUN: echo 't 0,0' >> %t
12+
; RUN: echo 't 21,1' >> %t
1313
;;
1414
; RUN: llc < %s -mtriple=x86_64-pc-linux -asm-verbose=false -function-sections -basic-block-sections=%t | FileCheck %s
1515

0 commit comments

Comments
 (0)