This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Introduce a mapValue function in LLVMIR import (nfc).
ClosedPublic

Authored by gysit on Oct 11 2022, 12:10 AM.

Details

Summary

The revision adds a mapValue function to the Importer, which can be used
in the MLIR builders to provide controlled accesses to the result
mapping of the imported instructions. Additionally, the change allows us
to avoid accessing a private member variable of the Importer class,
which simplifies future refactorings that aim at factoring out a
conversion interface (similar to the MLIR to LLVM translation). The
revision also renames the variables used when emitting the MLIR builders
to prepare the generalization to non-intrinsic instructions. In
particular, it renames callInst to inst and it passes in the instruction
arguments using an llvmOperands array rather than accessing the call
arguments directly.

Diff Detail

Event Timeline

gysit created this revision.Oct 11 2022, 12:10 AM
gysit requested review of this revision.Oct 11 2022, 12:10 AM
ftynse accepted this revision.Oct 11 2022, 2:46 AM
This revision is now accepted and ready to land.Oct 11 2022, 2:46 AM