diff options
author | 2024-06-20 07:15:41 +0000 | |
---|---|---|
committer | 2024-06-21 09:41:32 +0000 | |
commit | c0e77cbf0ba39c1d8e59d6abeadd40cabda61620 (patch) | |
tree | 3b0b13fbf6b72564f8edd4888c176ce67ad475e4 /compiler/optimizing/instruction_builder.h | |
parent | 90b7adbd418ea929b73647ada2b1aa9be3bfa424 (diff) |
Specify instruction format in `HInstructionBuilder`.
Even in cases where constant propagation to switch statement
should reduce the inlined `Instruction::VReg{A,B,C}()` to
the version with a specific format, clang++ is failing to
optimize this properly. And there are builder functions that
handle a known instruction format which are not inlined, so
they are ineligible even if clang++ did optimize this. This
simple change reduces the read/execute section in arm64
`libart.so` by almost 35KiB as seen with
readelf -l [...]/libart.so | grep -E 'R E'
(0x71a350 -> 0x711820).
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Ia2d89fecef7fd8b8784fa7d6b0d2b8877501c629
Diffstat (limited to 'compiler/optimizing/instruction_builder.h')
-rw-r--r-- | compiler/optimizing/instruction_builder.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h index 5c165d7bf9..b3b5deae59 100644 --- a/compiler/optimizing/instruction_builder.h +++ b/compiler/optimizing/instruction_builder.h @@ -132,6 +132,9 @@ class HInstructionBuilder : public ValueObject { bool second_is_lit, bool is_div); + template <DataType::Type type> + void BuildMove(uint32_t dest_reg, uint32_t src_reg); + void BuildReturn(const Instruction& instruction, DataType::Type type, uint32_t dex_pc); // Builds an instance field access node and returns whether the instruction is supported. |