[llvm-dev] LTO and intrinsics mangling

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 20 12:06:52 PDT 2016


> The name of the struct is used in forming the arbitrary (unique) suffix.
> It's essentially a hash(types) with a hash function intended to be somewhat
> human readable.  :)

But if it is really an arbitrary suffix, why does it have to be
updated in any fancy way? That is, given a module with

declare <4 x %struct.foo*> @llvm.masked.load.arbitrary_suffix1(<4 x
%struct.foo*>*, i32, <4 x i1>, <4 x %struct.foo*>)

and another with

declare <4 x %struct.bar*> @llvm.masked.load.arbitrary_suffix2(<4 x
%struct.bar*>*, i32, <4 x i1>, <4 x %struct.bar*>)

and given that the linker managed to merge struct.foo and struct.bar,
couldn't we just keep

declare <4 x %struct.foo*> @llvm.masked.load.arbitrary_suffix1(<4 x
%struct.foo*>*, i32, <4 x i1>, <4 x %struct.foo*>)

declare <4 x %struct.foo*> @llvm.masked.load.arbitrary_suffix2(<4 x
%struct.foo*>*, i32, <4 x i1>, <4 x %struct.foo*>)

in the merged module? That is, we would have two declarations that
will be codegened the same.

Cheers,
Rafael


More information about the llvm-dev mailing list