<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 8, 2021 at 3:55 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">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.<br></div></blockquote><div><br></div><div>Good suggestion, adding a few folks here.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>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 supporting after-coroutines-are-lowered.</div></blockquote><div><br></div><div>Right: but can you feed the IR post-lowering and reprocess it through the coroutine lowering passes? I would expect this to be idempotent somehow.</div><div><br></div><div>Even if it isn't the case, I assume that adding support for the -fcoroutines-ts option when processing IR files should be fine: the IR post-lowering can just not use the flag.</div><div><br></div><div>Thanks,</div><div><br></div><div>-- </div><div>Mehdi</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 8, 2021 at 3:23 PM Mehdi AMINI via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 2, 2021 at 10:25 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm trying to figure out how to use clang to compile some piece of IR in a .ll generated with coroutines.</div><div><br></div><div>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. </div><div><br></div><div>What's the best way here? I could add support in CompilerInvocation::ParseLangArgs:</div><div><br></div><div>@@ -3547,6 +3546,9 @@ bool CompilerInvocation::ParseLangArgs(L<br>     parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),<br>                         Diags, Opts.Sanitize);<br> <br>+    // Allows to use -fcoroutine-ts with IR input.<br>+    Opts.Coroutines = Args.hasArg(OPT_fcoroutines_ts);<br>+<br>     return Diags.getNumErrors() == NumErrorsBefore;<br>   }<br></div><div><br></div><div><br></div><div>But I still need to figure out how to have the driver propagate the option to cc1, any pointer?</div><div>Is it expected to silently discard it here by the way? It is quite surprising to me).<br></div></div></blockquote><div><br></div><div>Ping on these questions? Anyone want to chime in?</div><div><br></div><div>Cheers,</div><div><br></div><div>-- </div><div>Mehdi </div></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>
</blockquote></div></div>
</div>