llvm/llvm/unittests/Analysis/LazyCallGraphTest.cpp

//===- LazyCallGraphTest.cpp - Unit tests for the lazy CG analysis --------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
#include <memory>

usingnamespacellvm;

namespace {

std::unique_ptr<Module> parseAssembly(LLVMContext &Context,
                                      const char *Assembly) {}

/*
   IR forming a call graph with a diamond of triangle-shaped SCCs:

           d1
          /  \
         d3--d2
        /     \
       b1     c1
     /  \    /  \
    b3--b2  c3--c2
         \  /
          a1
         /  \
        a3--a2

   All call edges go up between SCCs, and clockwise around the SCC.
 */
static const char DiamondOfTriangles[] =;

/*
   IR forming a reference graph with a diamond of triangle-shaped RefSCCs

           d1
          /  \
         d3--d2
        /     \
       b1     c1
     /  \    /  \
    b3--b2  c3--c2
         \  /
          a1
         /  \
        a3--a2

   All call edges go up between RefSCCs, and clockwise around the RefSCC.
 */
static const char DiamondOfTrianglesRefGraph[] =;

static LazyCallGraph buildCG(Module &M) {}

TEST(LazyCallGraphTest, BasicGraphFormation) {}

static Function &lookupFunction(Module &M, StringRef Name) {}

TEST(LazyCallGraphTest, BasicGraphMutation) {}

TEST(LazyCallGraphTest, InnerSCCFormation) {}

TEST(LazyCallGraphTest, MultiArmSCC) {}

TEST(LazyCallGraphTest, OutgoingEdgeMutation) {}

TEST(LazyCallGraphTest, IncomingEdgeInsertion) {}

TEST(LazyCallGraphTest, IncomingEdgeInsertionRefGraph) {}

TEST(LazyCallGraphTest, IncomingEdgeInsertionLargeCallCycle) {}

TEST(LazyCallGraphTest, IncomingEdgeInsertionLargeRefCycle) {}

TEST(LazyCallGraphTest, InlineAndDeleteFunction) {}

TEST(LazyCallGraphTest, InternalEdgeMutation) {}

TEST(LazyCallGraphTest, InternalEdgeRemoval) {}

TEST(LazyCallGraphTest, InternalMultiEdgeRemoval) {}

TEST(LazyCallGraphTest, InternalNoOpEdgeRemoval) {}

TEST(LazyCallGraphTest, InternalCallEdgeToRef) {}

TEST(LazyCallGraphTest, InternalRefEdgeToCall) {}

TEST(LazyCallGraphTest, InternalRefEdgeToCallNoCycleInterleaved) {}

TEST(LazyCallGraphTest, InternalRefEdgeToCallBothPartitionAndMerge) {}

// Test for IR containing constants using blockaddress constant expressions.
// These are truly unique constructs: constant expressions with non-constant
// operands.
TEST(LazyCallGraphTest, HandleBlockAddress) {}

// Test that a blockaddress that refers to itself creates no new RefSCC
// connections. https://bugs.llvm.org/show_bug.cgi?id=40722
TEST(LazyCallGraphTest, HandleBlockAddress2) {}

TEST(LazyCallGraphTest, ReplaceNodeFunction) {}

TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRef) {}

TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive) {}

TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive2) {}

TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive3) {}

TEST(LazyCallGraphTest, AddSplitFunction1) {}

TEST(LazyCallGraphTest, AddSplitFunction2) {}

TEST(LazyCallGraphTest, AddSplitFunction3) {}

TEST(LazyCallGraphTest, AddSplitFunction4) {}

TEST(LazyCallGraphTest, AddSplitFunction5) {}

TEST(LazyCallGraphTest, AddSplitFunction6) {}

TEST(LazyCallGraphTest, AddSplitFunction7) {}

TEST(LazyCallGraphTest, AddSplitFunction8) {}

TEST(LazyCallGraphTest, AddSplitFunction9) {}

TEST(LazyCallGraphTest, AddSplitFunctions1) {}

TEST(LazyCallGraphTest, AddSplitFunctions2) {}

TEST(LazyCallGraphTest, AddSplitFunctions3) {}

TEST(LazyCallGraphTest, AddSplitFunctions4) {}

TEST(LazyCallGraphTest, AddSplitFunctions5) {}
}