This is an archive of the discontinued LLVM Phabricator instance.

[mips] Don't propagate -mfpxx by default if soft/single float were also set.
ClosedPublic

Authored by tomatabacu on Jun 11 2015, 6:41 AM.

Details

Summary

If the driver is only given -msoft-float/-mfloat-abi=soft or -msingle-float,
we should refrain from propagating -mfpxx, unless it was explicitly given on the
command line.

Diff Detail

Event Timeline

tomatabacu updated this revision to Diff 27501.Jun 11 2015, 6:41 AM
tomatabacu retitled this revision from to [mips] Don't propagate -mfpxx by default if soft/single float were also set..
tomatabacu updated this object.
tomatabacu edited the test plan for this revision. (Show Details)
tomatabacu added reviewers: dsanders, atanasyan.
tomatabacu added subscribers: mpf, Unknown Object (MLST).
dsanders accepted this revision.Jun 12 2015, 1:47 AM
dsanders edited edge metadata.

LGTM with a shouldUseFPXX() or similar as described below.

lib/Driver/Tools.cpp
5777–5781

While the effect is functionally correct, this bit is inconsistent with the question 'Is FPXX enabled by default?'. When these options are given it's still the default but the options overrule it. Could you hoist this logic out into a function named something like shouldUseFPXX()?.

This revision is now accepted and ready to land.Jun 12 2015, 1:47 AM
atanasyan accepted this revision.Jun 12 2015, 2:01 AM
atanasyan edited edge metadata.

LGTM (agreed with Daniel's comment)

tomatabacu updated this revision to Diff 27756.Jun 16 2015, 5:56 AM
tomatabacu edited edge metadata.

Addressed LGTM comment.

tomatabacu closed this revision.Jun 16 2015, 6:58 AM