This is an archive of the discontinued LLVM Phabricator instance.

[XCOFF][AIX] Use TE storage mapping class when large code model is enabled
ClosedPublic

Authored by jasonliu on Aug 6 2020, 11:15 AM.

Details

Summary

Use TE SMC instead of TC SMC in large code model mode,
so that large code model TOC entries could get placed after all
the small code model TOC entries, which reduces the chance of TOC overflow.

Diff Detail

Event Timeline

jasonliu created this revision.Aug 6 2020, 11:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 11:15 AM
jasonliu requested review of this revision.Aug 6 2020, 11:15 AM

so that code compiled with large code model TOC reference would not
take up spaces from the normal small code model TOC reference.

Probably we need to rephrase the description here.
As my understanding, TE SMC entry is possible to take spaces from the normal small code model TOC reference? But it would let TC SMC entry take up those space first and TE then follows.

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
2212

Slightly prefer inline IsLarge since it's used once and also not too long.

jasonliu edited the summary of this revision. (Show Details)Aug 7 2020, 1:26 PM
jasonliu updated this revision to Diff 284026.Aug 7 2020, 1:40 PM
jasonliu marked an inline comment as done.

Address comment.

Xiangling_L accepted this revision.Aug 7 2020, 2:22 PM

LGTM. thanks.

This revision is now accepted and ready to land.Aug 7 2020, 2:22 PM