This is an archive of the discontinued LLVM Phabricator instance.

Add support for alignment annotations to the LLVM dialect to LLVM translation.
ClosedPublic

Authored by herhut on Jun 19 2020, 2:01 AM.

Details

Summary

With this change, a function argument attribute of the form
"llvm.align" = <int> will be translated to the corresponding align
attribute in LLVM by the ModuleConversion.

Diff Detail

Event Timeline

herhut created this revision.Jun 19 2020, 2:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2020, 2:01 AM
herhut updated this revision to Diff 271974.Jun 19 2020, 2:39 AM

Resolve copy and paste error...

ftynse added inline comments.Jun 19 2020, 4:19 AM
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
729

I don't see this verification. It should be somewhere in LLVMDialect::verifyRegionArgAttribute I suppose. The special handling for noalias is necessary here because we had users that would put llvm.noalias on a memref, and then have it propagated to all components of the memref descriptor. Not sure if these still exist...

734

Please add a test for the user-visible error message

herhut updated this revision to Diff 272039.Jun 19 2020, 6:03 AM

add missing changes and test.

herhut marked 2 inline comments as done.Jun 19 2020, 6:04 AM

PTAL

ftynse accepted this revision.Jun 19 2020, 6:52 AM

Thanks!

This revision is now accepted and ready to land.Jun 19 2020, 6:52 AM
This revision was automatically updated to reflect the committed changes.