This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][XCOFF] Add assembly support for zero initalized global values.
ClosedPublic

Authored by sfertile on Oct 28 2019, 1:20 PM.

Diff Detail

Event Timeline

sfertile created this revision.Oct 28 2019, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2019, 1:20 PM
jasonliu added a comment.EditedOct 28 2019, 2:56 PM

This patch is going to have conflict with D67125. Depending on which patch is going to go land first, the test case is likely need to get modified.

I would propose to let D67125 be the parent and add object file generation test in this patch.

This patch is going to have conflict with D67125. Depending on which patch is going to go land first, the test case is likely need to get modified.

I would propose to let D67125 be the parent and add object file generation test in this patch.

Sure. That is pretty reasonable.

sfertile updated this revision to Diff 226897.Oct 29 2019, 7:26 AM

Rebased to pick up test changes from D67125

This revision is now accepted and ready to land.Nov 1 2019, 12:14 PM
DiggerLin added inline comments.Nov 5 2019, 2:14 PM
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
1861

how about the Kind.isBSSExternal() ?

DiggerLin added inline comments.Nov 8 2019, 8:13 AM
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
1861

I read the code again, the Kind.isBSS() include the BSSExternal
bool isBSS() const { return K == BSS || K == BSSLocal || K == BSSExtern; }

DiggerLin added inline comments.Nov 8 2019, 8:49 AM
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
1861

The BSSLocal will be put in the .bss section.

Here I think it maybe better(more clear) to change to
if (Kind.isBSS() && !kind.isBSSLocal())

keep current code, it is OK, for the code in the line 1842 , it deal with the Kind.isBSSLocal() first before it go to line 1861.
if (Kind.isBSSLocal() || Kind.isCommon()) {

Test file aix-xcoff-data.ll needs a rebase.

This revision was automatically updated to reflect the committed changes.