This is an archive of the discontinued LLVM Phabricator instance.

ARM: enable long calls for WoA
AbandonedPublic

Authored by abdulras on Apr 1 2014, 9:40 AM.

Details

Summary

Enable long calls on WoA. While this may not be the most efficient approach,
the MSVC compiler also generates long calls for most scenarios. Ideally, all
local symbols would be relaxed during CG to normal calls. However, in the
scenario of external symbols, you do not know the required range for the jump,
and thus require long calls.

Diff Detail

Event Timeline

Perhaps a new predicate function like ARMTargetLowering::useLongCalls() that contains the compound check rather than putting it inline here?

abdulras updated this revision to Unknown Object (????).Apr 10 2014, 3:07 PM

Introduce usesLongCalls and use that in place of Windows specifically in the ISelLowering.

abdulras abandoned this revision.Jun 7 2014, 1:10 PM

As Jim mentioned at the beginning, that there is some overhead to this, and enabling this unconditionally seems a bit heavy handed. By improving the driver to be a bit more similar to gcc (adding support for -mlong-calls/-mno-long-calls), we can enable this as and when it is needed as the linker should indicate that the jump target is out of range.

t.p.northover edited edge metadata.Jun 9 2014, 3:21 AM

Hi Saleem,

This looks reasonable to me.

Cheers.

Tim.