This is an archive of the discontinued LLVM Phabricator instance.

[XCOFF][AIX] Fix for missing of undefined symbols from symbol table
ClosedPublic

Authored by jasonliu on Dec 18 2019, 9:24 AM.

Details

Summary

When we use undefined symbol with its qualname, we are not able to generate that symbol because of the logic of early "continue" that skip the qualname symbol. This patch fixes it.

Diff Detail

Event Timeline

jasonliu created this revision.Dec 18 2019, 9:24 AM
jasonliu retitled this revision from [XCOFF][AIX] Fix for some undefined symbol are not generated issue to [XCOFF][AIX] Fix for missing of undefined symbols from symbol table.Dec 18 2019, 11:17 AM
This revision is now accepted and ready to land.Dec 18 2019, 12:19 PM

Looks fine here as well. Not sure if other reviewers would have comments though.

DiggerLin added inline comments.Dec 19 2019, 7:04 AM
llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
0–1

minor: change to -mcpu=pwr4 ?

daltenty added inline comments.Dec 19 2019, 1:20 PM
llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
73–151

My only concern here is that maybe these don't belong in this testcase. This test case tests exclusively TOC related functionality currently. Perhaps adding an undef test would be better (and possibly folding some of the undef function tests into it).

This revision was automatically updated to reflect the committed changes.
jasonliu marked 2 inline comments as done.Dec 19 2019, 1:42 PM
jasonliu added inline comments.
llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
0–1

Addressed when landed. Thanks.

73–151

I thought about making a separate test case. But I figure I would write out similar llvm IR in order to trigger a undefined variable and undefined function descriptor generation.
So I think it's actually a good fit to put them together. In fact, it is precisely lack of those tests in this file so that we didn't find this bug in the first place.

jasonliu marked an inline comment as done.Dec 19 2019, 2:02 PM
jasonliu added inline comments.
llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
73–151

As discussed offline, I will put comments in this unit test to indicate what we are testing here.