chromium/v8/test/cctest/compiler/test-loop-analysis.cc

// Copyright 2014 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.

#include "src/codegen/tick-counter.h"
#include "src/compiler/access-builder.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/graph.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/loop-analysis.h"
#include "src/compiler/node.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/schedule.h"
#include "src/compiler/scheduler.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/verifier.h"
#include "test/cctest/cctest.h"

namespace v8 {
namespace internal {
namespace compiler {

static Operator kIntAdd(IrOpcode::kInt32Add, Operator::kPure, "Int32Add", 2, 0,
                        0, 1, 0, 0);
static Operator kIntLt(IrOpcode::kInt32LessThan, Operator::kPure,
                       "Int32LessThan", 2, 0, 0, 1, 0, 0);
static Operator kStore(IrOpcode::kStore, Operator::kNoProperties, "Store", 1, 1,
                       1, 0, 1, 0);

static const int kNumLeafs =;

// A helper for all tests dealing with LoopFinder.
class LoopFinderTester : HandleAndZoneScope {};


struct While {};


struct Counter {};


struct StoreLoop {};


TEST(LaLoop1) {}


TEST(LaLoop1phi) {}


TEST(LaLoop1c) {}


TEST(LaLoop1e) {}


TEST(LaLoop1d) {}


TEST(LaLoop2) {}


TEST(LaLoop2c) {}


TEST(LaLoop2cc) {}


TEST(LaNestedLoop1) {}


TEST(LaNestedLoop1c) {}


TEST(LaNestedLoop1x) {}


TEST(LaNestedLoop2) {}


TEST(LaNestedLoop3) {}


TEST(LaNestedLoop3c) {}


TEST(LaMultipleExit1) {}


TEST(LaMultipleBackedge1) {}


TEST(LaEdgeMatrix1) {}


void RunEdgeMatrix2(int i) {}


TEST(LaEdgeMatrix2_0) {}


TEST(LaEdgeMatrix2_1) {}


TEST(LaEdgeMatrix2_2) {}


TEST(LaEdgeMatrix2_3) {}


TEST(LaEdgeMatrix2_4) {}


// Generates a triply-nested loop with extra edges between the phis and
// conditions according to the edge choice parameters.
void RunEdgeMatrix3(int c1a, int c1b, int c1c,    // line break
                    int c2a, int c2b, int c2c,    // line break
                    int c3a, int c3b, int c3c) {}


// Runs all combinations with a fixed {i}.
static void RunEdgeMatrix3_i(int i) {}


// Test all possible legal triply-nested loops with conditions and phis.
TEST(LaEdgeMatrix3_0) {}


TEST(LaEdgeMatrix3_1) {}


TEST(LaEdgeMatrix3_2) {}


TEST(LaEdgeMatrix3_3) {}


TEST(LaEdgeMatrix3_4) {}


TEST(LaEdgeMatrix3_5) {}


static void RunManyChainedLoops_i(int count) {}


static void RunManyNestedLoops_i(int count) {}


TEST(LaManyChained_30) {}
TEST(LaManyChained_31) {}
TEST(LaManyChained_32) {}
TEST(LaManyChained_33) {}
TEST(LaManyChained_34) {}
TEST(LaManyChained_62) {}
TEST(LaManyChained_63) {}
TEST(LaManyChained_64) {}

TEST(LaManyNested_30) {}
TEST(LaManyNested_31) {}
TEST(LaManyNested_32) {}
TEST(LaManyNested_33) {}
TEST(LaManyNested_34) {}
TEST(LaManyNested_62) {}
TEST(LaManyNested_63) {}
TEST(LaManyNested_64) {}


TEST(LaPhiTangle) {}

}  // namespace compiler
}  // namespace internal
}  // namespace v8