Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/IR/Module.h
Show All 15 Lines | |||||
#define LLVM_IR_MODULE_H | #define LLVM_IR_MODULE_H | ||||
#include "llvm/ADT/iterator_range.h" | #include "llvm/ADT/iterator_range.h" | ||||
#include "llvm/IR/Comdat.h" | #include "llvm/IR/Comdat.h" | ||||
#include "llvm/IR/DataLayout.h" | #include "llvm/IR/DataLayout.h" | ||||
#include "llvm/IR/Function.h" | #include "llvm/IR/Function.h" | ||||
#include "llvm/IR/GlobalAlias.h" | #include "llvm/IR/GlobalAlias.h" | ||||
#include "llvm/IR/GlobalVariable.h" | #include "llvm/IR/GlobalVariable.h" | ||||
#include "llvm/IR/InvariantInfo.h" | |||||
#include "llvm/IR/Metadata.h" | #include "llvm/IR/Metadata.h" | ||||
#include "llvm/Support/CBindingWrapping.h" | #include "llvm/Support/CBindingWrapping.h" | ||||
#include "llvm/Support/CodeGen.h" | #include "llvm/Support/CodeGen.h" | ||||
#include "llvm/Support/DataTypes.h" | #include "llvm/Support/DataTypes.h" | ||||
#include <system_error> | #include <system_error> | ||||
namespace llvm { | namespace llvm { | ||||
class FunctionType; | class FunctionType; | ||||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | private: | ||||
ComdatSymTabType ComdatSymTab; ///< Symbol table for COMDATs | ComdatSymTabType ComdatSymTab; ///< Symbol table for COMDATs | ||||
std::unique_ptr<GVMaterializer> | std::unique_ptr<GVMaterializer> | ||||
Materializer; ///< Used to materialize GlobalValues | Materializer; ///< Used to materialize GlobalValues | ||||
std::string ModuleID; ///< Human readable identifier for the module | std::string ModuleID; ///< Human readable identifier for the module | ||||
std::string TargetTriple; ///< Platform target triple Module compiled on | std::string TargetTriple; ///< Platform target triple Module compiled on | ||||
///< Format: (arch)(sub)-(vendor)-(sys0-(abi) | ///< Format: (arch)(sub)-(vendor)-(sys0-(abi) | ||||
void *NamedMDSymTab; ///< NamedMDNode names. | void *NamedMDSymTab; ///< NamedMDNode names. | ||||
DataLayout DL; ///< DataLayout associated with the module | DataLayout DL; ///< DataLayout associated with the module | ||||
InvariantInfo InvInfo; ///< Processed invariant intrinsics info. | |||||
nlewycky: A Module has a 1:1 correlation with the .ll and the .bc. This shouldn't go there, probably it… | |||||
friend class Constant; | friend class Constant; | ||||
/// @} | /// @} | ||||
/// @name Constructors | /// @name Constructors | ||||
/// @{ | /// @{ | ||||
public: | public: | ||||
/// The Module constructor. Note that there is no default constructor. You | /// The Module constructor. Note that there is no default constructor. You | ||||
Show All 20 Lines | /// @{ | ||||
/// equivalent to getDataLayout()->getStringRepresentation(). | /// equivalent to getDataLayout()->getStringRepresentation(). | ||||
const std::string &getDataLayoutStr() const { | const std::string &getDataLayoutStr() const { | ||||
return DL.getStringRepresentation(); | return DL.getStringRepresentation(); | ||||
} | } | ||||
/// Get the data layout for the module's target platform. | /// Get the data layout for the module's target platform. | ||||
const DataLayout &getDataLayout() const; | const DataLayout &getDataLayout() const; | ||||
/// \brief Get info about invariant intrinsics processed in this module. | |||||
InvariantInfo &getInvariantInfo() { return InvInfo; } | |||||
/// Get the target triple which is a string describing the target host. | /// Get the target triple which is a string describing the target host. | ||||
/// @returns a string containing the target triple. | /// @returns a string containing the target triple. | ||||
const std::string &getTargetTriple() const { return TargetTriple; } | const std::string &getTargetTriple() const { return TargetTriple; } | ||||
/// Get the global data context. | /// Get the global data context. | ||||
/// @returns LLVMContext - a container for LLVM's global information | /// @returns LLVMContext - a container for LLVM's global information | ||||
LLVMContext &getContext() const { return Context; } | LLVMContext &getContext() const { return Context; } | ||||
▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines |
A Module has a 1:1 correlation with the .ll and the .bc. This shouldn't go there, probably it should be an analysis hanging off the side like AssumptionCache is.