From 00c486bdba8609e0947553382a3f8da3eef5d24d Mon Sep 17 00:00:00 2001 From: Daniel Bratell Date: Wed, 5 Sep 2018 16:55:33 +0200 Subject: [PATCH] [jumbo] Avoid collision between two kFloat32Bit In jumbo builds, many files are compiled in the same translation unit and share the same anonymous namespace. Now both gap_resolver.cc and register-allocator.cc defined kFloat32Bit (a mask representation of MachineRepresentation::kFloat32) which clashed if those files were compiled together. This patch inlines and removed one of the constants. Change-Id: Ic79e077e62ce9866b6201ec61a9df1e66d5e4a13 Reviewed-on: https://chromium-review.googlesource.com/1206572 Reviewed-by: Bill Budge Commit-Queue: Daniel Bratell Cr-Commit-Position: refs/heads/master@{#55677} --- src/compiler/gap-resolver.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/gap-resolver.cc b/src/compiler/gap-resolver.cc index 298775ae40..c102c62ad4 100644 --- a/src/compiler/gap-resolver.cc +++ b/src/compiler/gap-resolver.cc @@ -13,11 +13,6 @@ namespace compiler { namespace { -static constexpr int kFloat32Bit = - RepresentationBit(MachineRepresentation::kFloat32); -static constexpr int kFloat64Bit = - RepresentationBit(MachineRepresentation::kFloat64); - // Splits a FP move between two location operands into the equivalent series of // moves between smaller sub-operands, e.g. a double move to two single moves. // This helps reduce the number of cycles that would normally occur under FP @@ -100,7 +95,7 @@ void GapResolver::Resolve(ParallelMove* moves) { if (reps && !base::bits::IsPowerOfTwo(reps)) { // Start with the smallest FP moves, so we never encounter smaller moves // in the middle of a cycle of larger moves. - if ((reps & kFloat32Bit) != 0) { + if ((reps & RepresentationBit(MachineRepresentation::kFloat32)) != 0) { split_rep_ = MachineRepresentation::kFloat32; for (size_t i = 0; i < moves->size(); ++i) { auto move = (*moves)[i]; @@ -108,7 +103,7 @@ void GapResolver::Resolve(ParallelMove* moves) { PerformMove(moves, move); } } - if ((reps & kFloat64Bit) != 0) { + if ((reps & RepresentationBit(MachineRepresentation::kFloat64)) != 0) { split_rep_ = MachineRepresentation::kFloat64; for (size_t i = 0; i < moves->size(); ++i) { auto move = (*moves)[i];