diff options
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
| -rw-r--r-- | compiler/optimizing/loop_optimization.cc | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 74de0773fc..c672dae1d7 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -1414,8 +1414,8 @@ bool HLoopOptimization::VectorizeUse(LoopNode* node,  uint32_t HLoopOptimization::GetVectorSizeInBytes() {    switch (compiler_driver_->GetInstructionSet()) { -    case kArm: -    case kThumb2: +    case InstructionSet::kArm: +    case InstructionSet::kThumb2:        return 8;  // 64-bit SIMD      default:        return 16;  // 128-bit SIMD @@ -1425,8 +1425,8 @@ uint32_t HLoopOptimization::GetVectorSizeInBytes() {  bool HLoopOptimization::TrySetVectorType(DataType::Type type, uint64_t* restrictions) {    const InstructionSetFeatures* features = compiler_driver_->GetInstructionSetFeatures();    switch (compiler_driver_->GetInstructionSet()) { -    case kArm: -    case kThumb2: +    case InstructionSet::kArm: +    case InstructionSet::kThumb2:        // Allow vectorization for all ARM devices, because Android assumes that        // ARM 32-bit always supports advanced SIMD (64-bit SIMD).        switch (type) { @@ -1446,7 +1446,7 @@ bool HLoopOptimization::TrySetVectorType(DataType::Type type, uint64_t* restrict            break;        }        return false; -    case kArm64: +    case InstructionSet::kArm64:        // Allow vectorization for all ARM devices, because Android assumes that        // ARMv8 AArch64 always supports advanced SIMD (128-bit SIMD).        switch (type) { @@ -1474,8 +1474,8 @@ bool HLoopOptimization::TrySetVectorType(DataType::Type type, uint64_t* restrict          default:            return false;        } -    case kX86: -    case kX86_64: +    case InstructionSet::kX86: +    case InstructionSet::kX86_64:        // Allow vectorization for SSE4.1-enabled X86 devices only (128-bit SIMD).        if (features->AsX86InstructionSetFeatures()->HasSSE4_1()) {          switch (type) { @@ -1506,7 +1506,7 @@ bool HLoopOptimization::TrySetVectorType(DataType::Type type, uint64_t* restrict          }  // switch type        }        return false; -    case kMips: +    case InstructionSet::kMips:        if (features->AsMipsInstructionSetFeatures()->HasMsa()) {          switch (type) {            case DataType::Type::kBool: @@ -1535,7 +1535,7 @@ bool HLoopOptimization::TrySetVectorType(DataType::Type type, uint64_t* restrict          }  // switch type        }        return false; -    case kMips64: +    case InstructionSet::kMips64:        if (features->AsMips64InstructionSetFeatures()->HasMsa()) {          switch (type) {            case DataType::Type::kBool: @@ -2170,7 +2170,7 @@ static constexpr uint32_t ARM64_SIMD_HEURISTIC_MAX_BODY_SIZE = 50;  uint32_t HLoopOptimization::GetUnrollingFactor(HBasicBlock* block, int64_t trip_count) {    uint32_t max_peel = MaxNumberPeeled();    switch (compiler_driver_->GetInstructionSet()) { -    case kArm64: { +    case InstructionSet::kArm64: {        // Don't unroll with insufficient iterations.        // TODO: Unroll loops with unknown trip count.        DCHECK_NE(vector_length_, 0u); @@ -2192,8 +2192,8 @@ uint32_t HLoopOptimization::GetUnrollingFactor(HBasicBlock* block, int64_t trip_        DCHECK_GE(unroll_factor, 1u);        return unroll_factor;      } -    case kX86: -    case kX86_64: +    case InstructionSet::kX86: +    case InstructionSet::kX86_64:      default:        return kNoUnrollingFactor;    } |