diff options
| author | Alex Zinenko <zinenko@google.com> | 2019-02-06 12:04:58 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 16:18:14 -0700 |
| commit | e9493cf14deec4198a3620d734f03e7e143f91d6 (patch) | |
| tree | db7727f9524a7ef6b5c6080b36fb78720bf60158 /mlir/lib/Transforms/ViewFunctionGraph.cpp | |
| parent | 90d10b4e00cc6397a03ddc981b7be8bab43a9f38 (diff) | |
| download | bcm5719-llvm-e9493cf14deec4198a3620d734f03e7e143f91d6.tar.gz bcm5719-llvm-e9493cf14deec4198a3620d734f03e7e143f91d6.zip | |
Port alloc/dealloc LLVM IR conversion into the LLVM IR dialect lowering
Implement the lowering of memref allocation and deallocation standard
operations into the LLVM IR dialect. This largely follows the existing
mechanism in MLIR-to-LLVM-IR translation for the sake of compatibility.
A memref value is transformed into a memref descriptor value which holds the
pointer to the underlying data buffer and the dynamic memref sizes. The buffer
is allocated using `malloc` and freed using `free`. The lowering inserts
declarations of these functions if necessary. Memref descriptors are values of
the LLVM IR structure type wrapped into an MLIR LLVM dialect type. The pointer
to the buffer and the individual sizes are accessed using `extractvalue` and
`insertvalue` LLVM IR instructions.
PiperOrigin-RevId: 232719419
Diffstat (limited to 'mlir/lib/Transforms/ViewFunctionGraph.cpp')
0 files changed, 0 insertions, 0 deletions

