#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
usingnamespacellvm;
static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) { … }
static void run(Module &M, StringRef FuncName,
function_ref<void(Function &F, DominatorTree &DT,
ScalarEvolution &SE, LoopInfo &LI)>
Test) { … }
TEST(LoopUtils, DeleteDeadLoopNest) { … }
TEST(LoopUtils, IsKnownPositiveInLoopTest) { … }
TEST(LoopUtils, IsKnownNonPositiveInLoopTest) { … }