Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: src/compiler/wasm-compiler.h

Issue 2568493002: [wasm] Only do SIMD lowering if SIMD is present in the graph. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.h
diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h
index e4e6fe36b8fe8f0803c8b78a03685e47ebef3c2c..654491214fa4f977453769a1ea2af3e20fd7a3bf 100644
--- a/src/compiler/wasm-compiler.h
+++ b/src/compiler/wasm-compiler.h
@@ -109,7 +109,7 @@ typedef ZoneVector<Node*> NodeVector;
class WasmGraphBuilder {
public:
WasmGraphBuilder(
- Zone* z, JSGraph* g, wasm::FunctionSig* function_signature,
+ Zone* z, JSGraph* g, wasm::FunctionSig* sig,
compiler::SourcePositionTable* source_position_table = nullptr);
Node** Buffer(size_t count) {
@@ -207,7 +207,7 @@ class WasmGraphBuilder {
void set_effect_ptr(Node** effect) { this->effect_ = effect; }
- wasm::FunctionSig* GetFunctionSignature() { return function_signature_; }
+ wasm::FunctionSig* GetFunctionSignature() { return sig_; }
void Int64LoweringForTesting();
@@ -222,25 +222,28 @@ class WasmGraphBuilder {
Node* SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane,
const NodeVector& inputs);
+ bool has_simd() const { return has_simd_; }
+
private:
static const int kDefaultBufferSize = 16;
friend class WasmTrapHelper;
Zone* zone_;
JSGraph* jsgraph_;
- wasm::ModuleEnv* module_;
- Node* mem_buffer_;
- Node* mem_size_;
+ wasm::ModuleEnv* module_ = nullptr;
+ Node* mem_buffer_ = nullptr;
+ Node* mem_size_ = nullptr;
NodeVector function_tables_;
NodeVector function_table_sizes_;
- Node** control_;
- Node** effect_;
+ Node** control_ = nullptr;
+ Node** effect_ = nullptr;
Node** cur_buffer_;
size_t cur_bufsize_;
Node* def_buffer_[kDefaultBufferSize];
+ bool has_simd_ = false;
WasmTrapHelper* trap_;
- wasm::FunctionSig* function_signature_;
bradn 2016/12/09 14:49:05 https://google.github.io/styleguide/cppguide.html#
+ wasm::FunctionSig* sig_;
SetOncePointer<const Operator> allocate_heap_number_operator_;
compiler::SourcePositionTable* source_position_table_ = nullptr;
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698