[PATCH] D43199: [IRMover] Implement name based structure type mapping
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 15:53:08 PST 2018
Eugene Leviant via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> +%struct.Bar = type { i64, i64 }
> +%struct.S = type { %struct.Foo* }
> +%struct.Foo = type { i64, i64 }
OK, I am starting to get this. The issue only happens when the destination
module has two identical types before the linker even starts, correct?
These two types are merged if we run "llvm-link %s -o - ".
I wonder if we could
* Make module movable (implement Module(Module &&Other)).
* Have the function import pass use an empty module to start the
IRMover.
* Link in DestModule.
* Replace the original module:
DestModule = std::move(Mover.takeModule())
There may be some performance problems with that. It also seems a big
detour if we are to get non cyclic types at some point.
Cheers,
Rafael
More information about the llvm-commits
mailing list