v8/test/cctest/compiler/graph-and-builders.h
Santiago Aboy Solanes df6029f5a9 [cleanup] Removing GraphBuilderTester class
GraphBuilderTester was introduced at a time where RawMachineAssembler
was going to be deprecated (https://codereview.chromium.org/1423923003/).
Now we know that it's not going to happen any time soon.

Since GraphBuilderTester it's only used in one test which can use
RawMachineAssembler, I updated it and removed the class.

Now the .h file had another class, which is now the only class in the file.
Therefore, I renamed it and updated the include calls to it.

Also updated the include commands: some were not necessary, and some others
could be moved to more aptly places.

Bug: v8:9183
Change-Id: I44bf16090c0515b1b9ff6cbded1bdb0adb4e44e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594563
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61269}
2019-05-07 09:54:51 +00:00

44 lines
1.4 KiB
C++

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CCTEST_COMPILER_GRAPH_AND_BUILDERS_H_
#define V8_CCTEST_COMPILER_GRAPH_AND_BUILDERS_H_
#include "src/compiler/backend/instruction-selector.h"
#include "src/compiler/simplified-operator.h"
namespace v8 {
namespace internal {
namespace compiler {
class GraphAndBuilders {
public:
explicit GraphAndBuilders(Zone* zone)
: main_graph_(new (zone) Graph(zone)),
main_common_(zone),
main_machine_(zone, MachineType::PointerRepresentation(),
InstructionSelector::SupportedMachineOperatorFlags(),
InstructionSelector::AlignmentRequirements()),
main_simplified_(zone) {}
Graph* graph() const { return main_graph_; }
Zone* zone() const { return graph()->zone(); }
CommonOperatorBuilder* common() { return &main_common_; }
MachineOperatorBuilder* machine() { return &main_machine_; }
SimplifiedOperatorBuilder* simplified() { return &main_simplified_; }
protected:
// Prefixed with main_ to avoid naming conflicts.
Graph* main_graph_;
CommonOperatorBuilder main_common_;
MachineOperatorBuilder main_machine_;
SimplifiedOperatorBuilder main_simplified_;
};
} // namespace compiler
} // namespace internal
} // namespace v8
#endif // V8_CCTEST_COMPILER_GRAPH_AND_BUILDERS_H_