ART: Refactor SIMD slots and regs size processing.
ART vectorizer assumes that there is single size of SIMD
register used for the whole program. Make this assumption explicit
and refactor the code.
Note: This is a base for the future introduction of SIMD slots of
size other than 8 or 16 bytes.
Test: test-art-target, test-art-host.
Change-Id: Id699d5e3590ca8c655ecd9f9ed4e63f49e3c4f9c
diff --git a/compiler/optimizing/code_generator_x86_64.h b/compiler/optimizing/code_generator_x86_64.h
index 2e8d9b3..01810f4 100644
--- a/compiler/optimizing/code_generator_x86_64.h
+++ b/compiler/optimizing/code_generator_x86_64.h
@@ -340,7 +340,7 @@
size_t GetSlowPathFPWidth() const override {
return GetGraph()->HasSIMD()
- ? 2 * kX86_64WordSize // 16 bytes == 2 x86_64 words for each spill
+ ? GetSIMDRegisterWidth()
: 1 * kX86_64WordSize; // 8 bytes == 1 x86_64 words for each spill
}
@@ -348,6 +348,10 @@
return 1 * kX86_64WordSize;
}
+ size_t GetSIMDRegisterWidth() const override {
+ return 2 * kX86_64WordSize;
+ }
+
HGraphVisitor* GetLocationBuilder() override {
return &location_builder_;
}