[llvm] r323633 - [ThinLTO] - Stop internalizing and drop non-prevailing symbols.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 01:51:59 PST 2018


>I just noticed a possible issue with this, when trying to understand how

>aliases are prevented from being passed to convertToDeclaration, which

>would hit an llvm_unreachable. dropDeadSymbols uses a range based for

>loop over the Module, which will only iterate through the functions. The

>positive is that we avoid invoking convertToDeclaration for aliases, which

>would be problematic currently as noted earlier. The negative is that we will

>never call it for global variables. Is that desired behavior?

>In any case, a comment in dropDeadSymbols is warranted.

>
>Teresa

Hi Teresa, thanks for noticing. I do not think current behavior is desired,
opened bug: https://bugs.llvm.org/show_bug.cgi?id=36187.
I'll try to fix it.

btw, I am also trying to investigate possible issues that might be relative with aliases
currently. I noticed that in a few places of LLVM we have duplicating code that
removes global variables and functions. It is very similar to convertToDeclaration sometimes
and probably could be refactored, but issues I am going to check are a bit different and relative to
https://github.com/llvm-mirror/llvm/blob/master/tools/bugpoint/ExtractFunction.cpp#L181
Which seems used to delete aliases explicitly and it's comment also
saying "there might be an alias to an alias?".
I am going to check if we need to do the something the same to what eliminateAliases? do
and particulary if current code that marks symbols as dead works correctly with alias to alias case,
for example.

George.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/c52790a3/attachment.html>


More information about the llvm-commits mailing list