summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* ART: Add HasNonNegativeInputAt and HasNonNegativeOrMinIntInputAtEvgeny Astigeevich2020-08-181-3/+5
| | | | | | | | | | | | | | | | | | | | When it can be quickly checked that an input operand in non-negative, additional optimizations can be applied during code generation. The CL adds HasNonNegativeInputAt and HasNonNegativeOrMinIntInputAt which can be used to check if the input operand of an instruction at the index is non-negative. They guarantee that at the time of checks the instruction can have non-negative inputs. Other optimizations after that might break the invariant. Optimizations HRem/HDiv for ARM32/ARM64 are moved to used the new methods. Test: 411-checker-hdiv-hrem-pow2 Test: 411-checker-hdiv-hrem-const Test: test.py --host --optimizing --jit --gtest --interpreter Test: test.py -target --optimizing --jit --interpreter Test: run-gtests.sh Change-Id: Icf8574699e003bba194097c4e39660de16aa53d9
* ARM: Optimize Div/Rem by 2^n for non-negative dividendsEvgeny Astigeevich2020-07-021-0/+4
| | | | | | | | | | | | | | | When it can be proved that dividends are non-negative or the min integer if their type is integral, there is no need to generate instructions correcting the result. The CL implements this optimization for ARM32/ARM64. Test: 411-checker-hdiv-hrem-pow2 Test: test.py --host --optimizing --jit --gtest --interpreter Test: test.py -target --optimizing --jit --interpreter Test: run-gtests.sh Change-Id: I11211a42918b5801fce8e78f305e69549739c23c
* Revert "Make compiler/optimizing/ symbols hidden."Vladimir Marko2019-10-141-3/+1
| | | | | | | | | This reverts commit e2727154f25e0db9a5bb92af494d8e47b181dfcf. Reason for revert: Breaks ASAN tests (ODR violation). Bug: 142365358 Change-Id: I38103d74a1297256c81d90872b6902ff1e9ef7a4
* Make compiler/optimizing/ symbols hidden.Vladimir Marko2019-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | Make symbols in compiler/optimizing hidden by a namespace attribute. The unit intrinsic_objects.{h,cc} is excluded as it is needed by dex2oat. As the symbols are no longer exported, gtests are now linked with the static version of the libartd-compiler library. libart-compiler.so size: - before: arm: 2396152 arm64: 3345280 - after: arm: 2016176 (-371KiB, -15.9%) arm64: 2874480 (-460KiB, -14.1%) Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit Bug: 142365358 Change-Id: I1fb04a33351f53f00b389a1642e81a68e40912a8
* ART: Clean up utils.hAndreas Gampe2016-12-131-0/+8
| | | | | | | | Remove functionality provided by libbase. Move some single-use functions to their respective users. Test: m test-art-host Change-Id: I75594035fa975200d638cc29bb9f31bc6e6cb29f
* ART: Refactor GenerateTestAndBranchDavid Brazdil2015-11-171-7/+5
| | | | | | | | | | | Each code generator implements a method for generating condition evaluation and branching to arbitrary labels. This patch refactors it for better clarity but also to generate fewer jumps when the true branch is the fallthrough successor. This is preliminary work for implementing HSelect. Change-Id: Iaa545a5ecbacb761c5aa241fa69140cf6eb5952f
* Fix conditional jump over jmp (X86/X86-64/ARM32)Mark Mendell2015-11-051-0/+9
| | | | | | | | | | | | Optimize the code generation for 'if' statements to jump to the 'false' block if the next block to be generated is the 'true' block. Add an X86-64 test for this case. Note that ARM64 & MIPS64 have not been updated. Change-Id: Iebb1352feb9d3bd0142d8b0621a2e3069a708ea7 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* Follow up of "div/rem on x86 and x86_64", to tidy up the code a little.Guillaume Sanchez2015-04-101-1/+6
| | | | Change-Id: Ibf39cbc8ac1d773599d70be2cb1e941674b60f1d
* Speedup div/rem by constants on x86 and x86_64Guillaume Sanchez2015-04-091-0/+25
This is done using the algorithms in Hacker's Delight chapter 10. Change-Id: I7bacefe10067569769ed31a1f7834f796fb41119