llvm/llvm/unittests/Transforms/Utils/LocalTest.cpp

//===- Local.cpp - Unit tests for Local -----------------------------------===//
//
// 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/Transforms/Utils/Local.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugProgramInstruction.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"

usingnamespacellvm;

extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
extern bool WriteNewDbgInfoFormatToBitcode;
extern cl::opt<bool> WriteNewDbgInfoFormat;

// Backup all of the existing settings that may be modified when
// PreserveInputDbgFormat=true, so that when the test is finished we return them
// (and the "preserve" setting) to their original values.
static auto SaveDbgInfoFormat() {}

TEST(Local, RecursivelyDeleteDeadPHINodes) {}

TEST(Local, RemoveDuplicatePHINodes) {}

static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) {}

TEST(Local, ReplaceDbgDeclare) {}

/// Build the dominator tree for the function and run the Test.
static void runWithDomTree(
    Module &M, StringRef FuncName,
    function_ref<void(Function &F, DominatorTree *DT)> Test) {}

TEST(Local, MergeBasicBlockIntoOnlyPred) {}

TEST(Local, ConstantFoldTerminator) {}

struct SalvageDebugInfoTest : ::testing::Test {};

TEST_F(SalvageDebugInfoTest, RecursiveInstDeletion) {}

TEST_F(SalvageDebugInfoTest, RecursiveBlockSimplification) {}

TEST(Local, wouldInstructionBeTriviallyDead) {}

TEST(Local, ChangeToUnreachable) {}

TEST(Local, FindDbgUsers) {}

TEST(Local, FindDbgRecords) {}

TEST(Local, ReplaceAllDbgUsesWith) {}

TEST(Local, RemoveUnreachableBlocks) {}

TEST(Local, SimplifyCFGWithNullAC) {}

TEST(Local, CanReplaceOperandWithVariable) {}

TEST(Local, ExpressionForConstant) {}

TEST(Local, ReplaceDbgVariableRecord) {}