//===- Evaluator.h - LLVM IR evaluator --------------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // Function evaluator for LLVM IR. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_EVALUATOR_H #define LLVM_TRANSFORMS_UTILS_EVALUATOR_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/GlobalVariable.h" #include "llvm/Support/Casting.h" #include <cassert> #include <deque> #include <memory> namespace llvm { class CallBase; class DataLayout; class Function; class TargetLibraryInfo; /// This class evaluates LLVM IR, producing the Constant representing each SSA /// instruction. Changes to global variables are stored in a mapping that can /// be iterated over after the evaluation is complete. Once an evaluation call /// fails, the evaluation object should not be reused. class Evaluator { … }; } // end namespace llvm #endif // LLVM_TRANSFORMS_UTILS_EVALUATOR_H