Commit 00c486bd authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

[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/1206572Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#55677}
parent 1120b5aa
...@@ -13,11 +13,6 @@ namespace compiler { ...@@ -13,11 +13,6 @@ namespace compiler {
namespace { 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 // 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. // 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 // This helps reduce the number of cycles that would normally occur under FP
...@@ -100,7 +95,7 @@ void GapResolver::Resolve(ParallelMove* moves) { ...@@ -100,7 +95,7 @@ void GapResolver::Resolve(ParallelMove* moves) {
if (reps && !base::bits::IsPowerOfTwo(reps)) { if (reps && !base::bits::IsPowerOfTwo(reps)) {
// Start with the smallest FP moves, so we never encounter smaller moves // Start with the smallest FP moves, so we never encounter smaller moves
// in the middle of a cycle of larger moves. // in the middle of a cycle of larger moves.
if ((reps & kFloat32Bit) != 0) { if ((reps & RepresentationBit(MachineRepresentation::kFloat32)) != 0) {
split_rep_ = MachineRepresentation::kFloat32; split_rep_ = MachineRepresentation::kFloat32;
for (size_t i = 0; i < moves->size(); ++i) { for (size_t i = 0; i < moves->size(); ++i) {
auto move = (*moves)[i]; auto move = (*moves)[i];
...@@ -108,7 +103,7 @@ void GapResolver::Resolve(ParallelMove* moves) { ...@@ -108,7 +103,7 @@ void GapResolver::Resolve(ParallelMove* moves) {
PerformMove(moves, move); PerformMove(moves, move);
} }
} }
if ((reps & kFloat64Bit) != 0) { if ((reps & RepresentationBit(MachineRepresentation::kFloat64)) != 0) {
split_rep_ = MachineRepresentation::kFloat64; split_rep_ = MachineRepresentation::kFloat64;
for (size_t i = 0; i < moves->size(); ++i) { for (size_t i = 0; i < moves->size(); ++i) {
auto move = (*moves)[i]; auto move = (*moves)[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment