This is an archive of the discontinued LLVM Phabricator instance.

[mips] Don't use FastISel when -mxgot is present
ClosedPublic

Authored by smaksimovic on May 26 2017, 6:13 AM.

Details

Summary

The clang compiler by default uses FastISel when invoked with -O0, which is also the default.
In that case, passing of -mxgot doesn't get honored, i.e. the code path that is to deal with large got is not taken.
Clang produces same output regardless of -mxgot being present or not.
This change checks whether -mxgot is passed as an option, and turns off FastISel if it is.

Diff Detail

Repository
rL LLVM

Event Timeline

smaksimovic created this revision.May 26 2017, 6:13 AM
sdardis accepted this revision.May 30 2017, 7:34 AM

LGTM. Comment inlined.

lib/Target/Mips/MipsISelLowering.cpp
474 ↗(On Diff #100390)

Also, update this list of reasons why we disable fastisel to include the xgot case.

This revision is now accepted and ready to land.May 30 2017, 7:34 AM

Comment updated.

This revision was automatically updated to reflect the committed changes.