This is an archive of the discontinued LLVM Phabricator instance.

[mlir] sret and byval now require a type argument when constructed
ClosedPublic

Authored by schweitz on Jan 25 2021, 10:42 AM.

Details

Summary

Fix for change in the argument attributes in LLVM IR. This is prep work for getting FIR's code gen upstreamed.

Diff Detail

Event Timeline

schweitz created this revision.Jan 25 2021, 10:42 AM
schweitz requested review of this revision.Jan 25 2021, 10:42 AM

Is there a test for this?

Is there a test for this?

I'm not aware of tests that check the LLVM IR produced, but I didn't look super hard. Have you added them?

You can search in mlir/test for test that invoke mlir-translate with -mlir-to-llvmir

There are tests in mlir/test/Target/llvmir.mlir. I vaguely remember asking for tests when these attributes were introduced as I'm definitely not the one who added them.

There are tests in mlir/test/Target/llvmir.mlir. I vaguely remember asking for tests when these attributes were introduced as I'm definitely not the one who added them.

And the tests asked for were added. (Reference: https://reviews.llvm.org/D94052)

But there was never an LLVM code gen test associated with these attributes, hence the question.

I'll look again.

schweitz updated this revision to Diff 319336.Jan 26 2021, 10:13 AM

Add missing LLVM tests.

ftynse accepted this revision.Jan 26 2021, 10:14 AM
This revision is now accepted and ready to land.Jan 26 2021, 10:14 AM