Skip to content

Commit 0acf751

Browse files
committed
Fix comments
1 parent 7c05f1f commit 0acf751

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def DLTI_DataLayoutSpecAttr :
9292
/// Returns the stack alignment identifier.
9393
StringAttr getStackAlignmentIdentifier(MLIRContext *context) const;
9494

95-
/// Returns the function poinrter alignment identifier.
95+
/// Returns the function pointer alignment identifier.
9696
StringAttr getFunctionPointerAlignmentIdentifier(MLIRContext *context) const;
9797

9898
/// Returns the attribute associated with the key.

mlir/include/mlir/Interfaces/DataLayoutInterfaces.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,7 @@ class DataLayout {
263263
/// unspecified.
264264
uint64_t getStackAlignment() const;
265265

266-
/// Returns the natural alignment of the stack in bits. Alignment promotion of
267-
/// stack variables should be limited to the natural stack alignment to
268-
/// prevent dynamic stack alignment. Returns zero if the stack alignment is
269-
/// unspecified.
266+
/// Returns function pointer alignment.
270267
Attribute getFunctionPointerAlignment() const;
271268

272269
/// Returns the value of the specified property if the property is defined for

mlir/lib/Target/LLVMIR/DataLayoutImporter.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,12 @@ LogicalResult DataLayoutImporter::tryToEmplaceFunctionPointerAlignmentEntry(
228228
if (keyEntries.count(key))
229229
return success();
230230

231-
// i: The alignment of function pointers is independent of the alignment of
232-
// functions, and is a multiple of <abi>.
233-
// n: The alignment of function pointers is a multiple of the explicit
234-
// alignment specified on the function, and is a multiple of <abi>.
231+
// The data layout entry for "F<type><abi>". <abi> is the aligment value,
232+
// preceded by one of the two possible <types>:
233+
// "i": The alignment of function pointers is independent of the alignment of
234+
// functions, and is a multiple of <abi>.
235+
// "n": The alignment of function pointers is a multiple of the explicit
236+
// alignment specified on the function, and is a multiple of <abi>.
235237
bool functionDependent = false;
236238
if (fnPtrString == "n")
237239
functionDependent = true;

0 commit comments

Comments
 (0)