This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Generate large code model relocations when mcmodel=medium on AIX
ClosedPublic

Authored by anjankgk on Jul 20 2021, 8:44 AM.

Details

Summary

This patch makes the changes in the driver that converts the medium code model to large.

Diff Detail

Event Timeline

anjankgk requested review of this revision.Jul 20 2021, 8:44 AM
anjankgk created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2021, 8:44 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

LGTM with minor nit; thanks.

clang/lib/Driver/ToolChains/Clang.cpp
5140

Add braces to the else block when adding braces to the if block: The coding guidelines have been updated for some time to discourage mixed bracing on if/else chains (see example

// Use braces for the `if` block to keep it uniform with the else block.

).

This revision is now accepted and ready to land.Jul 20 2021, 5:36 PM
anjankgk updated this revision to Diff 360443.Jul 21 2021, 7:14 AM

Added braces for else-block.

LGTM with minor nit; thanks.

Done. @hubert.reinterpretcast Hubert, could you pls help me commit this?
Thanks!

Anjan Kumar Guttahalli Krishna <anjankumar.g.k@ca.ibm.com>

Thank you!

Anjan Kumar Guttahalli Krishna <anjankumar.g.k@ca.ibm.com>

Thank you!

I running a build with this now -- I'll check its status in the morning.

xgupta added a subscriber: xgupta.Jul 22 2021, 3:35 AM

Anjan Kumar Guttahalli Krishna <anjankumar.g.k@ca.ibm.com>

Thank you!

Seems you are contributing with an official mail, I think you can ask for commit access, if you want to continue contributing, bar is quite low in LLVM community.
May follow:
https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access

Since Hubert is busy, I have requested Shimin to commit this in.
Thanks Shimin!

This revision was landed with ongoing or failed builds.Jul 22 2021, 12:47 PM
This revision was automatically updated to reflect the committed changes.
MaskRay added inline comments.
clang/test/Driver/mcmodel.c
15

Is it intentional that -mcmodel=medium is changed to large for 32-bit systems? Is this AIX specific?

In GCC, I believe in general only 64-bit architectures support -mcmodel= with some exceptions like nds32.

Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2023, 1:39 PM