Skip to content

[PowerPC] Move __ehinfo TOC entries to the end of the TOC section #73586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

maryammo
Copy link
Contributor

On AIX, the __ehinfo toc-entry is never referenced directly using instructions, therefore we can allocate them with the TE storage mapping class to move them to the end of TOC.

@@ -2459,6 +2459,7 @@ void PPCAIXAsmPrinter::emitTracebackTable() {
auto &Ctx = OutStreamer->getContext();
MCSymbol *EHInfoSym =
TargetLoweringObjectFileXCOFF::getEHInfoTableSymbol(MF);
cast<MCSymbolXCOFF>(EHInfoSym)->setEHInfo();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in getEHInfoTableSymbol instead?

@maryammo maryammo requested a review from mandlebug December 5, 2023 23:06
Copy link
Member

@mandlebug mandlebug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. I think all we are missing is a test where we compile to an object file using the integrated assembler and then dump the symbol information to show the toc entries for any eh infos have the large code model storage mapping class. Once we have that I think the patch is ready to land.

@maryammo maryammo requested a review from mandlebug December 7, 2023 20:30
Copy link
Member

@mandlebug mandlebug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@maryammo maryammo merged commit 8f6f5ec into llvm:main Dec 8, 2023
@maryammo maryammo deleted the ehinfo branch December 8, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants