This is an archive of the discontinued LLVM Phabricator instance.

[mlir] error out on unsupported attribute kinds in LLVM global translation
ClosedPublic

Authored by ftynse on Mar 2 2020, 6:19 AM.

Details

Summary

Some attribute kinds are not supported as "value" attributes of
llvm.mlir.constant when translating to LLVM IR. We were correctly reporting
an error, but continuing the translation using an "undef" value instead,
leading to a surprising mix of error messages and output IR. Abort the
translation after the error is reported.

Diff Detail

Event Timeline

ftynse created this revision.Mar 2 2020, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2020, 6:19 AM
rriddle accepted this revision.Mar 2 2020, 9:15 AM
rriddle added inline comments.
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
435

nit: merge the if into the else

This revision is now accepted and ready to land.Mar 2 2020, 9:15 AM
ftynse marked an inline comment as done.Mar 3 2020, 8:07 AM
This revision was automatically updated to reflect the committed changes.