[llvm-dev] [RFC] Heterogeneous LLVM-IR Modules

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 30 08:01:32 PDT 2020


On Thu, 30 Jul 2020 at 15:09, Johannes Doerfert
<johannesdoerfert at gmail.com> wrote:
> At this point I ask myself if it wouldn't be better to make the target
> cpu, features, and other "hidden parameters" explicit in the module itself.
> (I suggested part of that recently anyway[0].) That way we could create the
> proper target info from the IR, which seems to me like something
> valuable even in the current single-target setting.

This is still not enough. Other driver flags exist, which have to do
with OS and environment issues (incl. user flags) that are not part of
the target description and can affect optimisation, codegen and even
ABI.

Some of those options apply to some targets and not others. If they
apply to all targets you have, the user might want to apply to some
but not all, and then how will this work at cmdline side?

I don't know the extent of what you can combine from all of the
existing global options into IR annotations, but my wild guess is that
it would explode the number of attributes, which is not a good thing.

--renato


More information about the llvm-dev mailing list