@@ -167,8 +167,8 @@ BasicBlockSectionsProfileReader::getPrefetchHintsForFunction(
167167// instruct the compiler to emit a prefetch symbol for the given target.
168168// A prefetch target is specified by a pair "<bbid>,<subblock_index>" where
169169// bbid specifies the target basic block and subblock_index is a zero-based
170- // index. Subblock 0 refers to the region at the beginning of the block up to
171- // the first callsite. Subblock `i > 0` refers to the region immediately after
170+ // index. Callsite 0 refers to the region at the beginning of the block up to
171+ // the first callsite. Callsite `i > 0` refers to the region immediately after
172172// the `i`-th callsite up to the `i+1`-th callsite (or the end of the block).
173173// The prefetch target is always emitted at the beginning of the subblock.
174174// This is the beginning of the basic block for `i = 0` and immediately after
@@ -180,15 +180,15 @@ BasicBlockSectionsProfileReader::getPrefetchHintsForFunction(
180180// subblock.
181181//
182182// +----------------------------------+
183- // | __llvm_prefetch_target_foo_10_0: | <- Subblock 0 (before call_A)
183+ // | __llvm_prefetch_target_foo_10_0: | <- Callsite 0 (before call_A)
184184// | Instruction 1 |
185185// | Instruction 2 |
186186// | call_A (Callsite 0) |
187- // | __llvm_prefetch_target_foo_10_1: | <--- Subblock 1 (after call_A,
187+ // | __llvm_prefetch_target_foo_10_1: | <--- Callsite 1 (after call_A,
188188// | | before call_B)
189189// | Instruction 3 |
190190// | call_B (Callsite 1) |
191- // | __llvm_prefetch_target_foo_10_2: | <--- Subblock 2 (after call_B,
191+ // | __llvm_prefetch_target_foo_10_2: | <--- Callsite 2 (after call_B,
192192// | | before call_C)
193193// | Instruction 4 |
194194// +----------------------------------+
@@ -368,8 +368,8 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
368368 auto SiteBBID = parseUniqueBBID (PrefetchSiteStr[0 ]);
369369 if (!SiteBBID)
370370 return SiteBBID.takeError ();
371- unsigned long long SiteSubblockIndex ;
372- if (getAsUnsignedInteger (PrefetchSiteStr[1 ], 10 , SiteSubblockIndex ))
371+ unsigned long long SiteCallsiteIndex ;
372+ if (getAsUnsignedInteger (PrefetchSiteStr[1 ], 10 , SiteCallsiteIndex ))
373373 return createProfileParseError (Twine (" unsigned integer expected: '" ) +
374374 PrefetchSiteStr[1 ]);
375375
@@ -381,14 +381,14 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
381381 auto TargetBBID = parseUniqueBBID (PrefetchTargetStr[1 ]);
382382 if (!TargetBBID)
383383 return TargetBBID.takeError ();
384- unsigned long long TargetSubblockIndex ;
385- if (getAsUnsignedInteger (PrefetchTargetStr[2 ], 10 , TargetSubblockIndex ))
384+ unsigned long long TargetCallsiteIndex ;
385+ if (getAsUnsignedInteger (PrefetchTargetStr[2 ], 10 , TargetCallsiteIndex ))
386386 return createProfileParseError (Twine (" unsigned integer expected: '" ) +
387387 PrefetchTargetStr[2 ]);
388388 FI->second .PrefetchHints .push_back (PrefetchHint{
389- SubblockID {*SiteBBID, static_cast <unsigned >(SiteSubblockIndex )},
389+ CallsiteID {*SiteBBID, static_cast <unsigned >(SiteCallsiteIndex )},
390390 PrefetchTargetStr[0 ],
391- SubblockID {*TargetBBID, static_cast <unsigned >(TargetSubblockIndex )}});
391+ CallsiteID {*TargetBBID, static_cast <unsigned >(TargetCallsiteIndex )}});
392392 continue ;
393393 }
394394 case ' t' : { // Prefetch target specifier.
@@ -399,7 +399,6 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
399399 SmallVector<StringRef, 2 > PrefetchTargetStr;
400400 if (Values.size () != 1 )
401401 return createProfileParseError (Twine (" Prefetch target expected: " ) + S);
402- SmallVector<StringRef, 2 > PrefetchTargetStr;
403402 Values[0 ].split (PrefetchTargetStr, ' ,' );
404403 if (PrefetchTargetStr.size () != 2 )
405404 return createProfileParseError (Twine (" Prefetch target expected: " ) +
0 commit comments