[cfe-dev] Compile .ll file with coroutines intrinsics
David Blaikie via cfe-dev
cfe-dev at lists.llvm.org
Thu Jul 8 15:54:52 PDT 2021
Guessing you might need to cc/to this to some folks who worked
on/implemented the features - lots of folks don't read the -dev lists
terribly much these days, unfortunately.
My guess would be: It's difficult because we've essentially fragmented the
IR and now we have before-coroutines-are-lowered IR and
after-coroutines-are-lowered IR and no way to tell the difference & I guess
the support for IR inputs in clang is currently (probably by accident) only
On Thu, Jul 8, 2021 at 3:23 PM Mehdi AMINI via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> On Fri, Jul 2, 2021 at 10:25 PM Mehdi AMINI <joker.eph at gmail.com> wrote:
>> Hi all,
>> I'm trying to figure out how to use clang to compile some piece of IR in
>> a .ll generated with coroutines.
>> I tried to use the `-fcoroutines-ts`, but it isn't even forwarded by the
>> driver to CC1. And even if I use -Xclang to forward it manually it is then
>> ignored because LLVM IR input is shortcut
>> by CompilerInvocation::ParseLangArgs.
>> What's the best way here? I could add support
>> in CompilerInvocation::ParseLangArgs:
>> @@ -3547,6 +3546,9 @@ bool CompilerInvocation::ParseLangArgs(L
>> Diags, Opts.Sanitize);
>> + // Allows to use -fcoroutine-ts with IR input.
>> + Opts.Coroutines = Args.hasArg(OPT_fcoroutines_ts);
>> return Diags.getNumErrors() == NumErrorsBefore;
>> But I still need to figure out how to have the driver propagate the
>> option to cc1, any pointer?
>> Is it expected to silently discard it here by the way? It is
>> quite surprising to me).
> Ping on these questions? Anyone want to chime in?
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev