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

Unified Diff: src/compiler/bytecode-branch-analysis.h

Issue 2519983002: [ignition] Replace branch+loop analysis with a single pass (Closed)
Patch Set: Update comments Created 4 years, 1 month 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 | « src/compiler/bytecode-analysis.cc ('k') | src/compiler/bytecode-branch-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-branch-analysis.h
diff --git a/src/compiler/bytecode-branch-analysis.h b/src/compiler/bytecode-branch-analysis.h
deleted file mode 100644
index 7d32da828132fb10f4d100b0d7c736aca1ad4cdd..0000000000000000000000000000000000000000
--- a/src/compiler/bytecode-branch-analysis.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015 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_COMPILER_BYTECODE_BRANCH_ANALYSIS_H_
-#define V8_COMPILER_BYTECODE_BRANCH_ANALYSIS_H_
-
-#include "src/bit-vector.h"
-#include "src/handles.h"
-
-namespace v8 {
-namespace internal {
-
-class BytecodeArray;
-
-namespace compiler {
-
-// A class for identifying branch targets within a bytecode array.
-// This information can be used to construct the local control flow
-// logic for high-level IR graphs built from bytecode.
-//
-// N.B. If this class is used to determine loop headers, then such a
-// usage relies on the only backwards branches in bytecode being jumps
-// back to loop headers.
-class BytecodeBranchAnalysis BASE_EMBEDDED {
- public:
- BytecodeBranchAnalysis(Handle<BytecodeArray> bytecode_array, Zone* zone);
-
- // Analyze the bytecodes to find the branch sites and their
- // targets. No other methods in this class return valid information
- // until this has been called.
- void Analyze();
-
- // Returns true if there are any forward branches to the bytecode at
- // |offset|.
- bool forward_branches_target(int offset) const {
- return is_forward_target_.Contains(offset);
- }
-
- // Returns true if there are any backward branches to the bytecode
- // at |offset|.
- bool backward_branches_target(int offset) const {
- return is_backward_target_.Contains(offset);
- }
-
- private:
- void AddBranch(int origin_offset, int target_offset);
-
- Zone* zone() const { return zone_; }
- Handle<BytecodeArray> bytecode_array() const { return bytecode_array_; }
-
- Handle<BytecodeArray> bytecode_array_;
- BitVector is_backward_target_;
- BitVector is_forward_target_;
- Zone* zone_;
-
- DISALLOW_COPY_AND_ASSIGN(BytecodeBranchAnalysis);
-};
-
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
-
-#endif // V8_COMPILER_BYTECODE_BRANCH_ANALYSIS_H_
« no previous file with comments | « src/compiler/bytecode-analysis.cc ('k') | src/compiler/bytecode-branch-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698