[llvm-dev] Codegen pass configs dependent on function attributes?

James Y Knight via llvm-dev llvm-dev at lists.llvm.org
Tue May 12 13:12:02 PDT 2020


If you don't care about being able to select GlobalISel vs SDag separately
per object file, it'd be a lot simpler to just also pass a flag to the
linker, right?

On Tue, May 5, 2020 at 5:48 PM Amara Emerson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi all.
>
> I’m trying to get GlobalISel to work better with LTO. At the moment if you
> enable it via -fglobal-isel, it only adds the -mllvm -global-isel and
> related options to the cc1 invocation. With LTO, that doesn’t work as we
> need to encode codegen options into the bitcode, usually via function
> attributes.
>
> Does anyone have any ideas on how to achieve this? The only way I can see
> it working is if we have a unified codegen pipeline for both GISel and
> SelectionDAG. Then use a function attribute to tell the GISel passes to
> skip and leave it to FastISel/SelectionDAG which runs afterwards. Likewise,
> FastISel/SelectionDAG would need to skip the function if it was marked for
> GISel compilation and we didn’t trigger a fallback.
>
> Amara
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200512/4ada7510/attachment.html>


More information about the llvm-dev mailing list