#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;
static auto SaveDbgInfoFormat() { … }
TEST(Local, RecursivelyDeleteDeadPHINodes) { … }
TEST(Local, RemoveDuplicatePHINodes) { … }
static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) { … }
TEST(Local, ReplaceDbgDeclare) { … }
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) { … }