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

Evgeny Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 09:09:10 PST 2018


"mapping to a source type" in IRMover.cpp.
I'll try to prepare test case on Monday, when I get back to work.
________________________________________
От: Rafael Avila de Espindola <rafael.espindola at gmail.com>
Отправлено: 22 февраля 2018 г. 19:57
Кому: reviews+D43595+public+92424468aa83fedf at reviews.llvm.org; rafael.espindola+phab at gmail.com; tejohnson at google.com; peter at pcc.me.uk; dblaikie at gmail.com; Evgeny Leviant
Копия: llvm-commits at lists.llvm.org; mgorny at gentoo.org
Тема: Re: [PATCH] D43595: WIP alternative to r325686 (Implement name based structure type mapping).

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