This is an archive of the discontinued LLVM Phabricator instance.

[XCOFF] ignore the cold attribute.
ClosedPublic

Authored by Esme on Aug 9 2022, 2:04 AM.

Details

Reviewers
DiggerLin
shchenz
daltenty
Group Reviewers
Restricted Project
Commits
rG7a70e6e224cd: [XCOFF] ignore the cold attribute.
Summary

AIX assembly doesn't support the cold feature.
While it shouldn't be a function error when XCOFF catching the cold attribute.
As with the behavior of other formats, we just ignore the attribute for now.

Diff Detail

Event Timeline

Esme created this revision.Aug 9 2022, 2:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2022, 2:04 AM
Esme requested review of this revision.Aug 9 2022, 2:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2022, 2:04 AM
DiggerLin added inline comments.Aug 9 2022, 2:03 PM
llvm/lib/MC/MCXCOFFStreamer.cpp
40

prefer to add comment here .
MCXCOFFStreamer will be called when generate the xcoff object file.
so "AIX XCOFF doesn't support the cold feature" instead of AIX "assembly doesn't support the cold feature." ?

Esme updated this revision to Diff 451337.Aug 9 2022, 7:34 PM
Esme marked an inline comment as done.
Esme added inline comments.
llvm/lib/MC/MCXCOFFStreamer.cpp
40

Addressed. Thanks.

DiggerLin accepted this revision.Aug 10 2022, 6:46 AM

LGTM

llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll
10

nit: delete the last line ? for the last line not related to the cold attribute, and deleting the line will make the test case more simple and readable.

This revision is now accepted and ready to land.Aug 10 2022, 6:46 AM
This revision was automatically updated to reflect the committed changes.
Esme marked an inline comment as done.