Skip to content

Commit e4441fb

Browse files
author
Artem Gindinson
committed
Address comments by improving comments
Signed-off-by: Artem Gindinson <artem.gindinson@intel.com>
1 parent d51a518 commit e4441fb

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

clang/lib/CodeGen/CGLoopInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,12 @@ EmitIVDepLoopMetadata(LLVMContext &Ctx,
476476
LoopProperties.push_back(MDNode::get(Ctx, MD));
477477
}
478478

479-
/// Setting the legacy LLVM IR representation of the ivdep attribute
479+
/// Setting the legacy LLVM IR representation of the ivdep attribute.
480480
static void EmitLegacyIVDepLoopMetadata(
481481
LLVMContext &Ctx, llvm::SmallVectorImpl<llvm::Metadata *> &LoopProperties,
482482
const LoopAttributes::SYCLIVDepInfo &I) {
483-
// Emit "enable" metadata upon the infinite safelen specification
483+
// Only emit the "enable" metadata if the safelen is set to 0, implying
484+
// infinite safe length.
484485
if (I.SafeLen == 0) {
485486
Metadata *EnableMDs[] = {MDString::get(Ctx, "llvm.loop.ivdep.enable")};
486487
LoopProperties.push_back(MDNode::get(Ctx, EnableMDs));

clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ int main() {
186186
// CHECK-DAG: ![[IVDEP_MUL_ARR_VAL]] = !{!"llvm.loop.parallel_access_indices", ![[IDX_GROUP_A_MUL_ARR]], ![[IDX_GROUP_B_MUL_ARR]], i32 5}
187187
// CHECK-DAG: ![[IVDEP_MUL_ARR_INF]] = !{!"llvm.loop.parallel_access_indices", ![[IDX_GROUP_C_MUL_ARR]], ![[IDX_GROUP_D_MUL_ARR]]}
188188

189-
// Find the single instance of a legacy "IVDep enable" MD node
189+
// Find the single instance of a legacy "IVDep enable" MD node.
190190
// CHECK-DAG: ![[IVDEP_LEGACY_ENABLE:[0-9]+]] = !{!"llvm.loop.ivdep.enable"}
191191

192192
/// Global INF safelen and specific array INF safelen

clang/test/CodeGenSYCL/intel-fpga-ivdep-embedded-loops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ int main() {
164164
return 0;
165165
}
166166

167-
// Find the single instance of a legacy "IVDep enable" MD node
167+
// Find the single instance of a legacy "IVDep enable" MD node.
168168
// CHECK-DAG: ![[IVDEP_LEGACY_ENABLE:[0-9]+]] = !{!"llvm.loop.ivdep.enable"}
169169

170170
/// Accesses from the inner loop only, various global safelens for the outer and the inner loops.

clang/test/CodeGenSYCL/intel-fpga-ivdep-global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int main() {
9494
return 0;
9595
}
9696

97-
// Find recurring instances of legacy "IVDep enable/safelen" MD nodes
97+
// Find recurring instances of legacy "IVDep enable/safelen" MD nodes.
9898
// CHECK-DAG: ![[IVDEP_LEGACY_ENABLE:[0-9]+]] = !{!"llvm.loop.ivdep.enable"}
9999
// CHECK-DAG: ![[IVDEP_LEGACY_SAFELEN_5:[0-9]+]] = !{!"llvm.loop.ivdep.safelen", i32 5}
100100

0 commit comments

Comments
 (0)