[PATCH] D43595: WIP alternative to r325686 (Implement name based structure type mapping).

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 08:57:59 PST 2018


Eugene Leviant via Phabricator <reviews at reviews.llvm.org> writes:

> evgeny777 added inline comments.
>
>
> ================
> Comment at: lib/Linker/IRMover.cpp:1459
> +    if (auto *GV = dyn_cast<GlobalValue>(&V))
> +      GV->mutateValueType(TypeMap.get(GV->getValueType()));
> +    if (auto *I = dyn_cast<GetElementPtrInst>(&V)) {
> ----------------
> You're mutating types while processing values in the module. This looks dangerous and actually triggers assertion when your patch is used to link real application (I can provide details and even test case, if you like). Can you do this in two steps instead:

What is the assert? A testcase will be much appreciated.

I will try a LTO bootstrap on my side.

Cheers,
Rafael


More information about the llvm-commits mailing list