Page MenuHomePhabricator

[mlir][LLVM] Revert bareptr calling convention handling as an argument materialization.

Authored by nicolasvasilache on Jul 21 2021, 2:00 PM.



Type conversion and argument materialization are context-free: there is no available information on which op / branch is currently being converted.
As a consequence, bare ptr convention cannot be handled as an argument materialization: it would apply irrespectively of the parent op.
This doesn't typecheck in the case of non-funcOp and we would see cases where a memref descriptor would be inserted in place of the pointer in another memref descriptor.

For now the proper behavior is to revert to a specific BarePtrFunc implementation and drop the blanket argument materialization logic.

This reverts the relevant piece of the conversion to LLVM to what it was before and adds a relevant test and documentation to avoid the mistake by whomever attempts this again in the future.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jul 21 2021, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 2:00 PM
arpith-jacob accepted this revision.Jul 21 2021, 2:20 PM
This revision is now accepted and ready to land.Jul 21 2021, 2:20 PM
This revision was landed with ongoing or failed builds.Jul 21 2021, 3:07 PM
This revision was automatically updated to reflect the committed changes.