[ARM] Avoid redundant checks for isThumb1Only() after supportsTailCall()
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Mon, 28 Sep 2015 09:44:11 +0000 (09:44 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Mon, 28 Sep 2015 09:44:11 +0000 (09:44 +0000)
commitc0ae2787302004b1569c7f9358198289d0f24eed
tree61d8a094e300801df60ce8ea862abf559ba8b973
parent76dfa416156da9fd30e173fb0e97a98c6965bd08
[ARM] Avoid redundant checks for isThumb1Only() after supportsTailCall()

supportsTailCall() has two callers. Both of them double-check isThumb1Only(),
and refuse to proceed with tail-calling in that case.
Therefore, it makes sense to move this check to
ARMSubtarget::initSubtargetFeatures, where SupportsTailCall is initialized;
and to eliminate the extra checks at the call sites.

Following a review comment, added an "assert(supportsTailCall())"
in IsEligibleForTailCall.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248703 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMSubtarget.cpp