//===- FlatteningIncludes.h - Flattening Obfuscation pass------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains includes and defines for the split basicblock pass // //===----------------------------------------------------------------------===// #ifndef _SPLIT_INCLUDES_ #define _SPLIT_INCLUDES_ // LLVM include #include "utils/Utils.h" #include "llvm/ADT/Statistic.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Local.h" // For DemoteRegToStack and DemotePHIToStack // Namespace namespace llvm { struct SplitBasicBlock { bool flag; SplitBasicBlock() {} bool runSplitBasicBlock(Function &F); void split(Function *f); bool containsPHI(BasicBlock *b); void shuffle(std::vector &vec); }; struct SplitBasicBlockPass : public PassInfoMixin, public SplitBasicBlock { SplitBasicBlockPass(); PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); }; } // namespace llvm #endif