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.h b/compiler/optimizing/code_generator_x86.h
index 16446ce..43f5acd 100644
--- a/compiler/optimizing/code_generator_x86.h
+++ b/compiler/optimizing/code_generator_x86.h
@@ -359,7 +359,7 @@
size_t GetSlowPathFPWidth() const override {
return GetGraph()->HasSIMD()
- ? 4 * kX86WordSize // 16 bytes == 4 words for each spill
+ ? GetSIMDRegisterWidth()
: 2 * kX86WordSize; // 8 bytes == 2 words for each spill
}
@@ -367,6 +367,10 @@
return 2 * kX86WordSize;
}
+ size_t GetSIMDRegisterWidth() const override {
+ return 4 * kX86WordSize;
+ }
+
HGraphVisitor* GetLocationBuilder() override {
return &location_builder_;
}