[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
Please register or sign in to comment