This is an archive of the discontinued LLVM Phabricator instance.

Use thumb instruction set for ldb-server on android arm
ClosedPublic

Authored by tberghammer on Nov 19 2015, 5:53 AM.

Details

Summary

Use thumb instruction set for ldb-server on android arm

This change reduce the size of the lldb-server binary on android-arm from a release build by ~5MB

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer retitled this revision from to Use thumb instruction set for ldb-server on android arm.
tberghammer updated this object.
tberghammer added reviewers: labath, ovyalov.
tberghammer added a subscriber: lldb-commits.
labath accepted this revision.Nov 19 2015, 6:05 AM
labath edited edge metadata.

lgtm

This revision is now accepted and ready to land.Nov 19 2015, 6:05 AM
ovyalov accepted this revision.Nov 19 2015, 7:38 AM
ovyalov edited edge metadata.

LGTM

-mthumb will force T32 instruction set while -marm will force A32.

Best is not to use any of these flags to let the compiler decide best
possible instruction set combination.

-mthumb will force T32 instruction set while -marm will force A32.

Best is not to use any of these flags to let the compiler decide best
possible instruction set combination.

I think because we specify -march=armv7-a to have the necessary 64 bit atomic instructions the compiler decide to use arm in every case. Forcing the instruction set to thumb reduces the size of the final release binary by ~30% while have negligible run time speed impact so it will help us speed up the iteration cycle (smaller lldb-server means we have to copy less data between host and target).

This revision was automatically updated to reflect the committed changes.