Skip to content
Commit a428b5af authored by Fabian Mora's avatar Fabian Mora
Browse files

[mlir][target][LLVMIR] Change translation order to translate non-LLVM ops before function bodies.

Convert function bodies after all other operations, breaking possible declaration-reference issues between top non-LLVM Ops and non-LLVM ops inside function bodies.

Example:
```
mydialect.global @myglobal : i32
llvm.func @bar(...) {
...
%address = mydialect.global_address @myglobal : llvm.ptr
...
}
```
With the previous scheme `mydialect.global_address` always got translated before `mydialect.global`, this change ensures `mydialect.global` gets translated first.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D156284
parent 3984a3dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment