This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add stack alignment to the data layout dialect.
ClosedPublic

Authored by gysit on Mar 31 2023, 8:02 AM.

Details

Summary

The revision adds the stack alignment to the
data layout dialect and it extends the LLVM dialect
import and export to support the new data layout
entry.

One possible use case for the flag is the LLVM dialect
inliner. The LLVM inliner queries the flag to
determine if it is safe to update the alignment of an
existing alloca. We may want to perform the same
optimization inside of MLIR.

Diff Detail

Event Timeline

gysit created this revision.Mar 31 2023, 8:02 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Mar 31 2023, 8:02 AM
Dinistro accepted this revision.Mar 31 2023, 8:20 AM

LGMT!

mlir/test/Dialect/LLVMIR/layout.mlir
76

Ultra nit: As you are already touching this file, could you indent this line correctly?

This revision is now accepted and ready to land.Mar 31 2023, 8:20 AM
gysit updated this revision to Diff 510049.Mar 31 2023, 8:26 AM

Address review comment.

This revision was automatically updated to reflect the committed changes.