diff options
author | Evgeny Astigeevich <evgeny.astigeevich@linaro.org> | 2018-06-01 16:53:58 +0100 |
---|---|---|
committer | Evgeny Astigeevich <evgeny.astigeevich@linaro.org> | 2018-06-13 21:47:36 +0100 |
commit | 878f17d7737a91235013ed16ebe057a12367941b (patch) | |
tree | f18731e59850baf5d0535a1253643884237e889b /compiler/optimizing/code_generator_utils.cc | |
parent | 32e83b36601e080b01712aeb6e9ebaa512eb0f33 (diff) |
ARM64: Splitting GenerateDivRem* functions into GenerateIntDiv and GenerateIntRem functions
VisitDiv and VisitRem call GenerateDivRemIntegral.
GenerateDivRemIntegral does not know whether it is invoked for HDiv or
HRem and has to check this. As a result all GenerateDivRem* functions
have such checks. Code for optimizing HRem and HDiv, e.g. a denominator is
power of 2, can be specific for HRem or HDiv. So having it in
GenerateDivRem would create issues with code maintenance.
This patch split GenerateDivRem* functions into GenerateIntDiv* and
GenerateIntRem. BTW 'Integral' meaning is not 'Integer'. So changed it
as well. It also removes the case 'division by 1 or -1' because the case
is handled in InstructionSimplifierVisitor. As there is a commonly used
function Int64ConstantFrom(Location) it is used instead of
Int64FromConstant(HConstant). This removes some code as well.
Test: 012-math, 014-math3, 411-optimizing-arith
Test: test-art-host, test-art-target
Change-Id: I972129b24a206c8230d304be551cd2c18dbc7c9c
Diffstat (limited to 'compiler/optimizing/code_generator_utils.cc')
0 files changed, 0 insertions, 0 deletions