[mlir] Delay adding the __resume function
authorChristian Sigg <csigg@google.com>
Tue, 2 Feb 2021 14:42:16 +0000 (15:42 +0100)
committerChristian Sigg <csigg@google.com>
Tue, 2 Feb 2021 19:02:54 +0000 (20:02 +0100)
commit5b3881691f3375344c1b4c3d594b5958948851d7
treeba7db932b1a7a02df560463b4b0fd953c2e83fa2
parentbb0212929e36732585f0b43f9b0301af51953667
[mlir] Delay adding the __resume function

The __resume function trips up LLVM's 'X86 DAG->DAG Instruction Selection' unless optimizations are disabled.

Only adding the __resume function when it's needed allows lowering through AsyncToLLVM and LLVM without '-O0' as long as the coroutine functionality is not used.

Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D95868
mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp