Page MenuHomePhabricator

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

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

Diff Detail

Event Timeline

sfertile created this revision.Mon, Oct 28, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Oct 28, 1:20 PM
jasonliu added a comment.EditedMon, Oct 28, 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.Tue, Oct 29, 7:26 AM

Rebased to pick up test changes from D67125

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

how about the Kind.isBSSExternal() ?

DiggerLin added inline comments.Fri, Nov 8, 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.Fri, Nov 8, 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.