mini-llvm 0.1.0
Loading...
Searching...
No Matches
mini_llvm::ir Namespace Reference

Classes

class  Add
class  AlgebraicSimplification
class  AliasAnalysis
class  Alloca
class  AlwaysInline
class  And
class  ArgMemOnly
class  Argument
class  ArrayConstant
class  ArrayFlattening
class  ArrayType
class  ASHR
class  Attribute
class  AttributeDeduction
class  BasicBlock
class  BasicBlockMerging
class  BasicBlockType
class  BinaryFloatingArithmeticOperator
class  BinaryFloatingOperator
class  BinaryFloatingRelationalOperator
class  BinaryIntegerArithmeticOperator
class  BinaryIntegerOperator
class  BinaryIntegerRelationalOperator
class  BitCast
class  Br
class  BranchSimplification
class  Call
class  CondBr
class  Constant
class  ConstantFolding
class  ConstantVisitor
class  DeadCodeElimination
class  DeadStoreElimination
class  DominatorTreeAnalysis
class  Double
class  DoubleConstant
struct  DTNode
class  FAdd
class  FCmp
class  FDiv
class  Float
class  FloatConstant
class  FloatingCastingOperator
class  FloatingConstant
class  FloatingToIntegerCastingOperator
class  FloatingType
class  FMul
class  FNeg
class  FPExt
class  FPToSI
class  FPToUI
class  FPTrunc
class  FRem
class  FSub
class  Function
class  FunctionAnalysis
class  FunctionInlining
class  FunctionTransform
class  FunctionType
class  GetElementPtr
class  GlobalCodeMotion
class  GlobalDeadCodeElimination
class  GlobalValue
class  GlobalValueNumbering
class  GlobalVar
class  I1
class  I16
class  I16Constant
class  I1Constant
class  I32
class  I32Constant
class  I64
class  I64Constant
class  I8
class  I8Constant
class  ICmp
class  InaccessibleMemOnly
class  InaccessibleMemOrArgMemOnly
class  IndirectCall
class  Instruction
class  InstructionCombining
class  InstructionVisitor
class  IntegerCastingOperator
class  IntegerConstant
class  IntegerOrPointerType
class  IntegerToFloatingCastingOperator
class  IntegerType
class  IntToPtr
class  JumpThreading
class  Lexer
class  LexException
class  Load
struct  Loop
class  LoopTreeAnalysis
class  LSHR
struct  LTNode
class  Mem2Reg
class  Module
class  ModuleAnalysis
class  ModuleTransform
class  Mul
class  NoInline
class  NullPtrConstant
class  Or
class  ParseException
class  Parser
class  PassManager
class  Phi
class  PointerConstant
class  PoisonPropagation
class  PoisonValue
class  Ptr
class  PtrToInt
class  ReadNone
class  ReadOnly
class  RedundantLoadElimination
class  Ret
class  SDiv
class  Select
class  SExt
class  SHL
class  SIToFP
class  SRem
class  Store
class  StrengthReduction
class  Sub
struct  Symbol
class  TailCallElimination
class  TailDuplication
class  Terminator
struct  Token
class  Trunc
class  Type
class  TypeVisitor
class  UDiv
class  UIToFP
class  UnaryFloatingArithmeticOperator
class  UnaryFloatingOperator
class  UnreachableBlockElimination
class  URem
class  Use
class  Use< ValueT >
class  UseBase
class  Value
class  Void
class  VoidValue
class  Xor
class  ZExt

Enumerations

enum class  AliasResult { kMayAlias , kMustAlias , kPartialAlias , kNoAlias }

Functions

MINI_LLVM_EXPORT bool hasNPredecessors (const BasicBlock &B, size_t n)
MINI_LLVM_EXPORT bool hasNPredecessorsOrMore (const BasicBlock &B, size_t n)
MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > predecessors (const BasicBlock &B)
MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > successors (const BasicBlock &B)
MINI_LLVM_EXPORT void removeFromParent (const BasicBlock &B)
bool operator== (const Constant &lhs, const Constant &rhs)
auto elements (ArrayConstant &C)
auto elements (const ArrayConstant &C)
auto args (Function &F)
auto args (const Function &F)
auto attrs (const Function &F)
MINI_LLVM_EXPORT std::string toDot (const Function &F)
MINI_LLVM_EXPORT InstructionaddToParent (const Instruction &before, std::shared_ptr< Instruction > I)
template<typename T>
requires std::derived_from<T, Instruction>
T & addToParent (const Instruction &before, std::shared_ptr< T > I)
MINI_LLVM_EXPORT void removeFromParent (const Instruction &I)
std::unique_ptr< FunctionTypefunctionType (const Call &I)
auto args (Call &I)
auto args (const Call &I)
constexpr const char * specifier (FCmp::Condition cond)
auto indices (GetElementPtr &I)
auto indices (const GetElementPtr &I)
constexpr const char * specifier (ICmp::Condition cond)
std::unique_ptr< FunctionTypefunctionType (const IndirectCall &I)
auto args (IndirectCall &I)
auto args (const IndirectCall &I)
auto incomings (Phi &I)
auto incomings (const Phi &I)
MINI_LLVM_EXPORT bool hasIncomingBlock (const Phi &I, const BasicBlock &B)
MINI_LLVM_EXPORT void removeIncomingBlock (Phi &I, const BasicBlock &B)
MINI_LLVM_EXPORT const Use< Value > & getIncomingValue (const Phi &I, const BasicBlock &B)
MINI_LLVM_EXPORT Use< Value > & getIncomingValue (Phi &I, const BasicBlock &B)
MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > incomingBlocks (const Phi &I)
MINI_LLVM_EXPORT std::unordered_set< Value * > incomingValues (const Phi &I)
auto globalVars (Module &M)
auto globalVars (const Module &M)
auto functions (Module &M)
auto functions (const Module &M)
MINI_LLVM_EXPORT GlobalVargetGlobalVarByName (Module &M, std::string_view name)
MINI_LLVM_EXPORT const GlobalVargetGlobalVarByName (const Module &M, std::string_view name)
MINI_LLVM_EXPORT FunctiongetFunctionByName (Module &M, std::string_view name)
MINI_LLVM_EXPORT const FunctiongetFunctionByName (const Module &M, std::string_view name)
bool operator== (const Type &lhs, const Type &rhs)
auto paramTypes (const FunctionType &type)
auto uses (const Value &value)
MINI_LLVM_EXPORT bool replaceAllUsesWith (const Value &value, std::shared_ptr< Value > newValue)
MINI_LLVM_EXPORT bool replaceAllUsesWith (const Value &value, std::weak_ptr< Value > newValue)
template<typename ValueT>
requires std::derived_from<ValueT, Value>
bool replaceAllUsesWith (const Value &value, std::shared_ptr< ValueT > newValue)
template<typename ValueT>
requires std::derived_from<ValueT, Value>
bool replaceAllUsesWith (const Value &value, std::weak_ptr< ValueT > newValue)
MINI_LLVM_EXPORT std::optional< ModuleparseModule (const char *source)
std::optional< ModuleparseModule (const std::string &source)
MINI_LLVM_EXPORT std::optional< ModuleparseModule (const char *source, std::vector< Diagnostic > &diags)
std::optional< ModuleparseModule (const std::string &source, std::vector< Diagnostic > &diags)
MINI_LLVM_EXPORT std::vector< Tokenlex (const char *source)
MINI_LLVM_EXPORT Module parseModule (const std::vector< Token > &tokens)
bool operator== (const Symbol &lhs, const Symbol &rhs)
bool operator== (const Token &lhs, const Token &rhs)
constexpr const char * name (Token::Kind kind)
MINI_LLVM_EXPORT std::string toDot (const DTNode *root)

Enumeration Type Documentation

◆ AliasResult

enum class mini_llvm::ir::AliasResult
strong
Enumerator
kMayAlias 
kMustAlias 
kPartialAlias 
kNoAlias 

Function Documentation

◆ addToParent() [1/2]

MINI_LLVM_EXPORT Instruction & mini_llvm::ir::addToParent ( const Instruction & before,
std::shared_ptr< Instruction > I )

◆ addToParent() [2/2]

template<typename T>
requires std::derived_from<T, Instruction>
T & mini_llvm::ir::addToParent ( const Instruction & before,
std::shared_ptr< T > I )

◆ args() [1/6]

auto mini_llvm::ir::args ( Call & I)
inline

◆ args() [2/6]

auto mini_llvm::ir::args ( const Call & I)
inline

◆ args() [3/6]

auto mini_llvm::ir::args ( const Function & F)
inline

◆ args() [4/6]

auto mini_llvm::ir::args ( const IndirectCall & I)
inline

◆ args() [5/6]

auto mini_llvm::ir::args ( Function & F)
inline

◆ args() [6/6]

auto mini_llvm::ir::args ( IndirectCall & I)
inline

◆ attrs()

auto mini_llvm::ir::attrs ( const Function & F)
inline

◆ elements() [1/2]

auto mini_llvm::ir::elements ( ArrayConstant & C)
inline

◆ elements() [2/2]

auto mini_llvm::ir::elements ( const ArrayConstant & C)
inline

◆ functions() [1/2]

auto mini_llvm::ir::functions ( const Module & M)
inline

◆ functions() [2/2]

auto mini_llvm::ir::functions ( Module & M)
inline

◆ functionType() [1/2]

std::unique_ptr< FunctionType > mini_llvm::ir::functionType ( const Call & I)
inline

◆ functionType() [2/2]

std::unique_ptr< FunctionType > mini_llvm::ir::functionType ( const IndirectCall & I)
inline

◆ getFunctionByName() [1/2]

MINI_LLVM_EXPORT const Function * mini_llvm::ir::getFunctionByName ( const Module & M,
std::string_view name )

◆ getFunctionByName() [2/2]

MINI_LLVM_EXPORT Function * mini_llvm::ir::getFunctionByName ( Module & M,
std::string_view name )

◆ getGlobalVarByName() [1/2]

MINI_LLVM_EXPORT const GlobalVar * mini_llvm::ir::getGlobalVarByName ( const Module & M,
std::string_view name )

◆ getGlobalVarByName() [2/2]

MINI_LLVM_EXPORT GlobalVar * mini_llvm::ir::getGlobalVarByName ( Module & M,
std::string_view name )

◆ getIncomingValue() [1/2]

MINI_LLVM_EXPORT const Use< Value > & mini_llvm::ir::getIncomingValue ( const Phi & I,
const BasicBlock & B )

◆ getIncomingValue() [2/2]

MINI_LLVM_EXPORT Use< Value > & mini_llvm::ir::getIncomingValue ( Phi & I,
const BasicBlock & B )

◆ globalVars() [1/2]

auto mini_llvm::ir::globalVars ( const Module & M)
inline

◆ globalVars() [2/2]

auto mini_llvm::ir::globalVars ( Module & M)
inline

◆ hasIncomingBlock()

MINI_LLVM_EXPORT bool mini_llvm::ir::hasIncomingBlock ( const Phi & I,
const BasicBlock & B )

◆ hasNPredecessors()

MINI_LLVM_EXPORT bool mini_llvm::ir::hasNPredecessors ( const BasicBlock & B,
size_t n )

◆ hasNPredecessorsOrMore()

MINI_LLVM_EXPORT bool mini_llvm::ir::hasNPredecessorsOrMore ( const BasicBlock & B,
size_t n )

◆ incomingBlocks()

MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > mini_llvm::ir::incomingBlocks ( const Phi & I)

◆ incomings() [1/2]

auto mini_llvm::ir::incomings ( const Phi & I)
inline

◆ incomings() [2/2]

auto mini_llvm::ir::incomings ( Phi & I)
inline

◆ incomingValues()

MINI_LLVM_EXPORT std::unordered_set< Value * > mini_llvm::ir::incomingValues ( const Phi & I)

◆ indices() [1/2]

auto mini_llvm::ir::indices ( const GetElementPtr & I)
inline

◆ indices() [2/2]

auto mini_llvm::ir::indices ( GetElementPtr & I)
inline

◆ lex()

MINI_LLVM_EXPORT std::vector< Token > mini_llvm::ir::lex ( const char * source)

◆ name()

const char * mini_llvm::ir::name ( Token::Kind kind)
inlineconstexpr

◆ operator==() [1/4]

bool mini_llvm::ir::operator== ( const Constant & lhs,
const Constant & rhs )
inline

◆ operator==() [2/4]

bool mini_llvm::ir::operator== ( const Symbol & lhs,
const Symbol & rhs )
inline

◆ operator==() [3/4]

bool mini_llvm::ir::operator== ( const Token & lhs,
const Token & rhs )
inline

◆ operator==() [4/4]

bool mini_llvm::ir::operator== ( const Type & lhs,
const Type & rhs )
inline

◆ paramTypes()

auto mini_llvm::ir::paramTypes ( const FunctionType & type)
inline

◆ parseModule() [1/5]

MINI_LLVM_EXPORT std::optional< Module > mini_llvm::ir::parseModule ( const char * source)

◆ parseModule() [2/5]

MINI_LLVM_EXPORT std::optional< Module > mini_llvm::ir::parseModule ( const char * source,
std::vector< Diagnostic > & diags )

◆ parseModule() [3/5]

std::optional< Module > mini_llvm::ir::parseModule ( const std::string & source)
inline

◆ parseModule() [4/5]

std::optional< Module > mini_llvm::ir::parseModule ( const std::string & source,
std::vector< Diagnostic > & diags )
inline

◆ parseModule() [5/5]

MINI_LLVM_EXPORT Module mini_llvm::ir::parseModule ( const std::vector< Token > & tokens)

◆ predecessors()

MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > mini_llvm::ir::predecessors ( const BasicBlock & B)

◆ removeFromParent() [1/2]

MINI_LLVM_EXPORT void mini_llvm::ir::removeFromParent ( const BasicBlock & B)

◆ removeFromParent() [2/2]

MINI_LLVM_EXPORT void mini_llvm::ir::removeFromParent ( const Instruction & I)

◆ removeIncomingBlock()

MINI_LLVM_EXPORT void mini_llvm::ir::removeIncomingBlock ( Phi & I,
const BasicBlock & B )

◆ replaceAllUsesWith() [1/4]

MINI_LLVM_EXPORT bool mini_llvm::ir::replaceAllUsesWith ( const Value & value,
std::shared_ptr< Value > newValue )

◆ replaceAllUsesWith() [2/4]

template<typename ValueT>
requires std::derived_from<ValueT, Value>
bool mini_llvm::ir::replaceAllUsesWith ( const Value & value,
std::shared_ptr< ValueT > newValue )

◆ replaceAllUsesWith() [3/4]

MINI_LLVM_EXPORT bool mini_llvm::ir::replaceAllUsesWith ( const Value & value,
std::weak_ptr< Value > newValue )

◆ replaceAllUsesWith() [4/4]

template<typename ValueT>
requires std::derived_from<ValueT, Value>
bool mini_llvm::ir::replaceAllUsesWith ( const Value & value,
std::weak_ptr< ValueT > newValue )

◆ specifier() [1/2]

const char * mini_llvm::ir::specifier ( FCmp::Condition cond)
inlineconstexpr

◆ specifier() [2/2]

const char * mini_llvm::ir::specifier ( ICmp::Condition cond)
inlineconstexpr

◆ successors()

MINI_LLVM_EXPORT std::unordered_set< BasicBlock * > mini_llvm::ir::successors ( const BasicBlock & B)

◆ toDot() [1/2]

MINI_LLVM_EXPORT std::string mini_llvm::ir::toDot ( const DTNode * root)

◆ toDot() [2/2]

MINI_LLVM_EXPORT std::string mini_llvm::ir::toDot ( const Function & F)

◆ uses()

auto mini_llvm::ir::uses ( const Value & value)
inline