[llvm-dev] [RFC] Heterogeneous LLVM-IR Modules
Renato Golin via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 30 06:48:12 PDT 2020
On Thu, 30 Jul 2020 at 13:59, Johannes Doerfert via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> FWIW, I would expect that we split the module *before* the codegen stage
> such that the back end doesn't have to deal with heterogeneous models
> (right now).
Indeed. Even if the multiple targets are all supported by the same
back-end (ex. different Arm families), the target info decisions are
too ingrained in how we created the back-ends to be easy (or even
possible) to split.
> I'm not sure about cost models and such though. As far as I know, we
> don't do global decisions anywhere but I might be wrong. Put
> differently, I hope we don't do global decisions as it seems quite easy
> to disturb the result with unrelated code changes.
Target info (ex. TTI) are dependent on triple + hidden parameters
(passed down from the driver as target options), which are global.
As I said before, having multiple target triples in the source will
not change that, and we'll have to create multiple groups of driver
flags, applicable to different triples. Or we'll need to merge modules
from different front-ends, in which case this looks more and more like
LTO.
This will not be trivial to map and the data layout does not reflect
any of that.
cheers,
--renato
More information about the llvm-dev
mailing list