Jlm
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
jlm::llvm Namespace Reference

Global memory state passed between functions. More...

Namespaces

 aa
 

Classes

class  IpGraphToLlvmConverter
 
class  RvsdgToIpGraphConverter
 
class  LlvmDotWriter
 
struct  TailControlledLoop
 
struct  Continuation
 
class  VariableMap
 
class  RegionalizedVariableMap
 
class  ControlFlowRestructuringStatistics
 
class  AggregationStatistics
 
class  AnnotationStatistics
 
class  AggregationTreeToLambdaStatistics
 
class  DataNodeToDeltaStatistics
 
class  InterProceduralGraphToRvsdgStatistics
 
class  InterProceduralGraphToRvsdgStatisticsCollector
 
class  Context
 
class  AggregationMap
 
class  AggregationNode
 
class  EntryAggregationNode
 
class  ExitAggregationNode
 
class  BasicBlockAggregationNode
 
class  LinearAggregationNode
 
class  BranchAggregationNode
 
class  LoopAggregationNode
 
class  VariableSet
 
class  AnnotationSet
 
class  EntryAnnotationSet
 
class  ExitAnnotationSet
 
class  BasicBlockAnnotationSet
 
class  LinearAnnotationSet
 
class  BranchAnnotationSet
 
class  LoopAnnotationSet
 
class  AnnotationMap
 
class  Attribute
 Attribute. More...
 
class  StringAttribute
 String attribute. More...
 
class  EnumAttribute
 Enum attribute. More...
 
class  IntAttribute
 Integer attribute. More...
 
class  TypeAttribute
 Type attribute. More...
 
class  AttributeSet
 Attribute set. More...
 
class  BasicBlock
 
class  CallSummary
 
class  ControlFlowGraphEdge
 
class  ControlFlowGraphNode
 
class  StronglyConnectedComponent
 Strongly Connected Component. More...
 
class  StronglyConnectedComponentStructure
 Strongly Connected Component Structure. More...
 
class  Argument
 Function argument. More...
 
class  EntryNode
 
class  ExitNode
 
class  ControlFlowGraph
 
class  DominatorTreeNode
 
class  GlobalValue
 
class  InterProceduralGraphModule
 
class  InterProceduralGraph
 
class  InterProceduralGraphNode
 
class  FunctionNode
 
class  FunctionVariable
 
class  DataNodeInit
 
class  DataNode
 
class  AllocaOperation
 
class  CallTypeClassifier
 Call node classifier. More...
 
class  CallOperation
 Call operation class. More...
 
class  DeltaOperation
 Delta operation. More...
 
class  FunctionToPointerOperation
 Get address of compiled function object. More...
 
class  PointerToFunctionOperation
 Interpret pointer as callable function. More...
 
class  GetElementPtrOperation
 
class  IntegerConstantOperation
 
class  IntegerBinaryOperation
 
class  IntegerAddOperation
 
class  IntegerSubOperation
 
class  IntegerMulOperation
 
class  IntegerSDivOperation
 
class  IntegerUDivOperation
 
class  IntegerSRemOperation
 
class  IntegerURemOperation
 
class  IntegerAShrOperation
 
class  IntegerShlOperation
 
class  IntegerLShrOperation
 
class  IntegerAndOperation
 
class  IntegerOrOperation
 
class  IntegerXorOperation
 
class  IntegerEqOperation
 
class  IntegerNeOperation
 
class  IntegerSgeOperation
 
class  IntegerSgtOperation
 
class  IntegerSleOperation
 
class  IntegerSltOperation
 
class  IntegerUgeOperation
 
class  IntegerUgtOperation
 
class  IntegerUleOperation
 
class  IntegerUltOperation
 
class  IOBarrierOperation
 
class  LlvmLambdaOperation
 Lambda operation. More...
 
class  LoadOperation
 
class  LoadVolatileOperation
 
class  LoadNonVolatileOperation
 
class  MemCpyOperation
 
class  MemCpyNonVolatileOperation
 
class  MemCpyVolatileOperation
 
class  MemoryStateOperation
 
class  MemoryStateMergeOperation
 
class  MemoryStateJoinOperation
 
class  MemoryStateSplitOperation
 
class  LambdaEntryMemoryStateSplitOperation
 
class  LambdaExitMemoryStateMergeOperation
 
class  CallEntryMemoryStateMergeOperation
 
class  CallExitMemoryStateSplitOperation
 
class  SsaPhiOperation
 
class  AssignmentOperation
 
class  SelectOperation
 
class  VectorSelectOperation
 
class  FloatingPointToUnsignedIntegerOperation
 
class  FloatingPointToSignedIntegerOperation
 
class  ControlToIntOperation
 
class  BranchOperation
 
class  ConstantPointerNullOperation
 ConstantPointerNullOperation class. More...
 
class  IntegerToPointerOperation
 
class  PtrToIntOperation
 
class  ConstantDataArray
 
class  PtrCmpOperation
 
class  ZExtOperation
 
class  ConstantFP
 
class  FCmpOperation
 
class  UndefValueOperation
 UndefValueOperation class. More...
 
class  PoisonValueOperation
 PoisonValueOperation class. More...
 
class  FBinaryOperation
 
class  FPExtOperation
 
class  FNegOperation
 
class  FPTruncOperation
 
class  VariadicArgumentListOperation
 
class  BitCastOperation
 
class  ConstantStruct
 
class  TruncOperation
 
class  UIToFPOperation
 
class  SIToFPOperation
 
class  ConstantArrayOperation
 
class  ConstantAggregateZeroOperation
 
class  ExtractElementOperation
 
class  ShuffleVectorOperation
 
class  ConstantVectorOperation
 
class  InsertElementOperation
 
class  VectorUnaryOperation
 
class  VectorBinaryOperation
 
class  ConstantDataVectorOperation
 
class  ExtractValueOperation
 
class  MallocOperation
 
class  FreeOperation
 
class  SExtOperation
 
class  FMulAddIntrinsicOperation
 
class  StoreOperation
 
class  StoreNonVolatileOperation
 
class  StoreVolatileOperation
 
class  LlvmGraphImport
 
class  LlvmRvsdgModule
 
class  ThreeAddressCodeVariable
 
class  ThreeAddressCode
 
class  ThreeAddressCodeList
 
class  OutputTracer
 
class  TypeConverter
 
class  PointerType
 PointerType class. More...
 
class  ArrayType
 
class  FloatingPointType
 
class  VariableArgumentType
 
class  StructType
 StructType class. More...
 
class  VectorType
 
class  FixedVectorType
 
class  ScalableVectorType
 
class  IOStateType
 Input/Output state type. More...
 
class  MemoryStateType
 Memory state type class. More...
 
class  Variable
 
class  GlobalVariable
 
class  CommonNodeElimination
 Common Node Elimination Discovers simple nodes, region arguments and structural node outputs that are guaranteed to always produce the same value, and redirects all their users to the same output. This renders common nodes and common structural arguments / results dead. More...
 
class  DeadNodeElimination
 Dead Node Elimination Optimization. More...
 
class  IfConversionStatistics
 If-Conversion Transformation statistics. More...
 
class  IfConversion
 If-Conversion Transformation. More...
 
class  FunctionInlining
 Performs function inlining on functions that are determined to be good candidates, such as private functions that are only called from a single call site. More...
 
class  InvariantValueRedirection
 Invariant Value Redirection Optimization. More...
 
class  LoadChainSeparation
 
class  LoopUnswitching
 LoopUnswitching. More...
 
class  GammaGammaPredicateCorrelation
 
class  ThetaGammaPredicateCorrelation
 
struct  GammaSubregionRoles
 
class  PredicateCorrelation
 
class  NodeSinking
 Node Sinking Optimization. More...
 
class  NodeHoisting
 Node Hoisting Transformation. More...
 
class  NodeReduction
 
class  RvsdgTreePrinter
 RVSDG tree printer debug pass. More...
 
class  SCEV
 
class  SCEVUnknown
 
class  SCEVInit
 
class  SCEVPlaceholder
 
class  SCEVConstant
 
class  SCEVAddExpr
 
class  SCEVChainRecurrence
 
class  SCEVNAryAddExpr
 
class  ScalarEvolution
 
class  LoopUnrolling
 Optimization that attempts to unroll loops (thetas). More...
 
class  LoopUnrollInfo
 
class  RvsdgTest
 RvsdgTest class. More...
 
class  StoreTest1
 StoreTest1 class. More...
 
class  StoreTest2
 StoreTest2 class. More...
 
class  LoadTest1
 LoadTest1 class. More...
 
class  LoadTest2
 LoadTest2 class. More...
 
class  LoadFromUndefTest
 LoadFromUndefTest class. More...
 
class  GetElementPtrTest
 GetElementPtrTest class. More...
 
class  BitCastTest
 BitCastTest class. More...
 
class  Bits2PtrTest
 Bits2PtrTest class. More...
 
class  ConstantPointerNullTest
 ConstantPointerNullTest class. More...
 
class  CallTest1
 CallTest1 class. More...
 
class  CallTest2
 CallTest2 class. More...
 
class  IndirectCallTest1
 IndirectCallTest1 class. More...
 
class  IndirectCallTest2
 IndirectCallTest2 class. More...
 
class  ExternalCallTest1
 
class  ExternalCallTest2
 
class  GammaTest
 GammaTest class. More...
 
class  GammaTest2
 GammaTest2 class. More...
 
class  ThetaTest
 ThetaTest class. More...
 
class  DeltaTest1
 DeltaTest1 class. More...
 
class  DeltaTest2
 DeltaTest2 class. More...
 
class  DeltaTest3
 DeltaTest3 class. More...
 
class  ImportTest
 ImportTest class. More...
 
class  PhiTest1
 PhiTest1 class. More...
 
class  PhiTest2
 PhiTest2 class. More...
 
class  PhiWithDeltaTest
 
class  ExternalMemoryTest
 ExternalMemoryTest class. More...
 
class  EscapedMemoryTest1
 EscapedMemoryTest1 class. More...
 
class  EscapedMemoryTest2
 EscapedMemoryTest2 class. More...
 
class  EscapedMemoryTest3
 EscapedMemoryTest3 class. More...
 
class  MemcpyTest
 MemcpyTest class. More...
 
class  MemcpyTest2
 
class  MemcpyTest3
 
class  LinkedListTest
 LinkedListTest class. More...
 
class  AllMemoryNodesTest
 RVSDG module with one of each memory node type. More...
 
class  NAllocaNodesTest
 RVSDG module with an arbitrary amount of alloca nodes. More...
 
class  EscapingLocalFunctionTest
 RVSDG module with a static function escaping through another function. More...
 
class  LambdaCallArgumentMismatch
 RVSDG module containing a static function that is called with the wrong number of arguments. More...
 
class  FreeNullTest
 RVSDG module with a call to free(NULL). More...
 
class  VariadicFunctionTest1
 
class  VariadicFunctionTest2
 

Typedefs

using BasicBlockMap = util::BijectiveMap< const ::llvm::BasicBlock *, BasicBlock * >
 
using IntegerValueRepresentation = rvsdg::BitValueRepresentation
 
using MemoryNodeId = std::size_t
 
typedef std::vector< std::unique_ptr< llvm::ThreeAddressCode > > tacsvector_t
 
using TopNodeLeaderList = std::vector< const rvsdg::Node * >
 

Enumerations

enum class  Linkage {
  externalLinkage , availableExternallyLinkage , linkOnceAnyLinkage , linkOnceOdrLinkage ,
  weakAnyLinkage , weakOdrLinkage , appendingLinkage , internalLinkage ,
  privateLinkage , externalWeakLinkage , commonLinkage
}
 
enum class  cmp {
  eq , ne , gt , ge ,
  lt , le
}
 
enum class  fpcmp {
  TRUE , FALSE , oeq , ogt ,
  oge , olt , ole , one ,
  ord , ueq , ugt , uge ,
  ult , ule , une , uno
}
 
enum class  fpop {
  add , sub , mul , div ,
  mod
}
 
enum class  fpsize {
  half , flt , dbl , x86fp80 ,
  fp128
}
 
enum class  CorrelationType { ControlConstantCorrelation , MatchConstantCorrelation , MatchCorrelation }
 

Functions

::llvm::APInt convert_bitvalue_repr (const rvsdg::BitValueRepresentation &vr)
 
static bool is_identity_mapping (const rvsdg::MatchOperation &op)
 
static const llvm::ThreeAddressCodeget_match (const llvm::ThreeAddressCode *branch)
 
static bool has_return_value (const ControlFlowGraph &cfg)
 
static TailControlledLoop ExtractLoop (ControlFlowGraphNode &loopEntry, ControlFlowGraphNode &loopExit)
 
static void ReinsertLoop (const TailControlledLoop &loop)
 
static const ThreeAddressCodeVariableCreateContinuationVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariableCreateLoopExitVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariableCreateLoopEntryVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariableCreateLoopRepetitionVariable (BasicBlock &basicBlock)
 
static void AppendBranch (BasicBlock &basicBlock, const Variable *operand)
 
static void AppendConstantAssignment (BasicBlock &basicBlock, const ThreeAddressCodeVariable &variable, const size_t value)
 
static void RestructureLoopEntry (const StronglyConnectedComponentStructure &sccStructure, BasicBlock *newEntryNode, const ThreeAddressCodeVariable *entryVariable)
 
static void RestructureLoopExit (const StronglyConnectedComponentStructure &sccStructure, BasicBlock &newRepetitionNode, BasicBlock &newExitNode, ControlFlowGraphNode &regionExit, const ThreeAddressCodeVariable &repetitionVariable, const ThreeAddressCodeVariable *exitVariable)
 
static void RestructureLoopRepetition (const StronglyConnectedComponentStructure &sccStructure, ControlFlowGraphNode &newRepetitionNode, const ThreeAddressCodeVariable *entryVariable, const ThreeAddressCodeVariable &repetitionVariable)
 
static BasicBlockGetEntryVariableBlock (ControlFlowGraphNode *node)
 
static void RestructureControlFlow (ControlFlowGraphNode &, ControlFlowGraphNode &, std::vector< TailControlledLoop > &)
 
static void RestructureLoops (ControlFlowGraphNode &regionEntry, ControlFlowGraphNode &regionExit, std::vector< TailControlledLoop > &loops)
 
static ControlFlowGraphNodeComputeHeadBranch (ControlFlowGraphNode &start, ControlFlowGraphNode &end)
 
static util::HashSet< ControlFlowGraphNode * > ComputeDominatorGraph (const ControlFlowGraphEdge *edge)
 
static Continuation ComputeContinuation (const ControlFlowGraphNode &headBranch)
 
static void RestructureBranches (ControlFlowGraphNode &entry, ControlFlowGraphNode &exit)
 
void RestructureLoops (ControlFlowGraph &cfg)
 
void RestructureBranches (ControlFlowGraph &cfg)
 
void RestructureControlFlow (ControlFlowGraph &cfg)
 
static bool requiresExport (const InterProceduralGraphNode &ipgNode)
 
static void ConvertAssignment (const llvm::ThreeAddressCode &threeAddressCode, rvsdg::Region &, llvm::VariableMap &variableMap)
 
static void ConvertSelect (const llvm::ThreeAddressCode &threeAddressCode, rvsdg::Region &, llvm::VariableMap &variableMap)
 
static void ConvertBranch (const llvm::ThreeAddressCode &threeAddressCode, rvsdg::Region &, llvm::VariableMap &)
 
template<class TNode , class TOperation >
static void Convert (const llvm::ThreeAddressCode &threeAddressCode, rvsdg::Region &region, llvm::VariableMap &variableMap)
 
static void ConvertThreeAddressCode (const llvm::ThreeAddressCode &threeAddressCode, rvsdg::Region &region, llvm::VariableMap &variableMap)
 
static void ConvertBasicBlock (const ThreeAddressCodeList &basicBlock, rvsdg::Region &region, llvm::VariableMap &variableMap)
 
static void ConvertAggregationNode (const AggregationNode &aggregationNode, const AnnotationMap &demandMap, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const EntryAggregationNode &entryAggregationNode, const AnnotationMap &demandMap, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const ExitAggregationNode &exitAggregationNode, const AnnotationMap &, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const BasicBlockAggregationNode &blockAggregationNode, const AnnotationMap &, rvsdg::LambdaNode &, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const LinearAggregationNode &linearAggregationNode, const AnnotationMap &demandMap, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const BranchAggregationNode &branchAggregationNode, const AnnotationMap &demandMap, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void Convert (const LoopAggregationNode &loopAggregationNode, const AnnotationMap &demandMap, rvsdg::LambdaNode &lambdaNode, RegionalizedVariableMap &regionalizedVariableMap)
 
static void RestructureControlFlowGraph (ControlFlowGraph &controlFlowGraph, const std::string &functionName, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static std::unique_ptr< AggregationNodeAggregateControlFlowGraph (ControlFlowGraph &controlFlowGraph, const std::string &functionName, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static std::unique_ptr< AnnotationMapAnnotateAggregationTree (const AggregationNode &aggregationTreeRoot, const std::string &functionName, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::OutputConvertAggregationTreeToLambda (const AggregationNode &aggregationTreeRoot, const AnnotationMap &demandMap, RegionalizedVariableMap &scopedVariableMap, const std::string &functionName, std::shared_ptr< const rvsdg::FunctionType > functionType, const Linkage &functionLinkage, const AttributeSet &functionAttributes, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::OutputConvertControlFlowGraph (const FunctionNode &functionNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::OutputConvertFunctionNode (const FunctionNode &functionNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::OutputConvertDataNodeInitialization (const DataNodeInit &init, rvsdg::Region &region, RegionalizedVariableMap &regionalizedVariableMap)
 
static rvsdg::OutputConvertDataNode (const DataNode &dataNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::OutputConvertInterProceduralGraphNode (const InterProceduralGraphNode &ipgNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static void ConvertStronglyConnectedComponent (const std::unordered_set< const InterProceduralGraphNode * > &stronglyConnectedComponent, rvsdg::Graph &graph, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static std::unique_ptr< LlvmRvsdgModuleConvertInterProceduralGraphModule (InterProceduralGraphModule &interProceduralGraphModule, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
std::unique_ptr< LlvmRvsdgModuleConvertInterProceduralGraphModule (InterProceduralGraphModule &interProceduralGraphModule, util::StatisticsCollector &statisticsCollector)
 
const VariableConvertValueOrFunction (::llvm::Value *v, tacsvector_t &tacs, Context &ctx)
 
const VariableConvertValue (::llvm::Value *v, tacsvector_t &tacs, Context &ctx)
 
const VariableConvertConstant (::llvm::Constant *, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &, Context &)
 
static rvsdg::BitValueRepresentation convert_apint (const ::llvm::APInt &value)
 
static const Variableconvert_int_constant (::llvm::Constant *c, std::vector< std::unique_ptr< ThreeAddressCode >> &tacs, Context &)
 
static const Variableconvert_undefvalue (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantExpr (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantFP (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_globalVariable (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantPointerNull (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_blockAddress (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &, Context &)
 
static const Variableconvert_constantAggregateZero (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantArray (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantDataArray (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantDataVector (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const VariableConvertConstantStruct (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_constantVector (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static const Variableconvert_globalAlias (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &, Context &)
 
static const Variableconvert_function (::llvm::Constant *c, tacsvector_t &tacs, Context &ctx)
 
static const VariableConvertConstant (::llvm::PoisonValue *poisonValue, tacsvector_t &threeAddressCodeVector, Context &context)
 
template<class T >
static const VariableConvertConstant (::llvm::Constant *constant, tacsvector_t &threeAddressCodeVector, Context &context)
 
std::vector< std::unique_ptr< llvm::ThreeAddressCode > > ConvertConstant (::llvm::Constant *c, Context &ctx)
 
static const Variableconvert_return_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const VariableConvertBranchInstruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const VariableConvertSwitchInstruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_unreachable_instruction (::llvm::Instruction *i, tacsvector_t &, Context &ctx)
 
static std::unique_ptr< rvsdg::BinaryOperationConvertIntegerIcmpPredicate (const ::llvm::CmpInst::Predicate predicate, const std::size_t numBits)
 
static std::unique_ptr< rvsdg::BinaryOperationConvertPointerIcmpPredicate (const ::llvm::CmpInst::Predicate predicate)
 
static const Variableconvert (const ::llvm::ICmpInst *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_fcmp_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const VariableAddIOBarrier (tacsvector_t &tacs, const Variable *operand, const Context &ctx)
 
static const Variableconvert_load_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_store_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const VariableConvertPhiInstruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_getelementptr_instruction (::llvm::Instruction *inst, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_malloc_call (const ::llvm::CallInst *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_free_call (const ::llvm::CallInst *i, tacsvector_t &tacs, Context &ctx)
 
static bool IsVolatile (const ::llvm::Value &value)
 
static const Variableconvert_memcpy_call (const ::llvm::CallInst *instruction, tacsvector_t &tacs, Context &ctx)
 
static bool IsFMulAddIntrinsic (const ::llvm::Instruction &instruction)
 
static const VariableConvertFMulAddIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_call_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_select_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static std::unique_ptr< rvsdg::BinaryOperationConvertIntegerBinaryOperation (const ::llvm::Instruction::BinaryOps binaryOperation, std::size_t numBits)
 
static std::unique_ptr< rvsdg::BinaryOperationConvertFloatingPointBinaryOperation (const ::llvm::Instruction::BinaryOps binaryOperation, fpsize floatingPointSize)
 
static const Variableconvert (const ::llvm::BinaryOperator *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_alloca_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_extractvalue (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_extractelement_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert (::llvm::ShuffleVectorInst *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert_insertelement_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variableconvert (::llvm::UnaryOperator *unaryOperator, tacsvector_t &threeAddressCodeVector, Context &ctx)
 
template<class OP >
static std::unique_ptr< rvsdg::SimpleOperationcreate_unop (std::shared_ptr< const rvsdg::Type > st, std::shared_ptr< const rvsdg::Type > dt)
 
static const Variableconvert_cast_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
template<class INSTRUCTIONTYPE >
static const Variableconvert (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
const VariableConvertInstruction (::llvm::Instruction *i, std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &tacs, Context &ctx)
 
static std::vector<::llvm::PHINode * > convert_instructions (::llvm::Function &function, Context &ctx)
 
static void PatchPhiOperands (const std::vector<::llvm::PHINode * > &phis, Context &ctx)
 
static BasicBlockMap convert_basic_blocks (::llvm::Function &f, ControlFlowGraph &cfg)
 
Attribute::kind ConvertAttributeKind (const ::llvm::Attribute::AttrKind &kind)
 
static EnumAttribute ConvertEnumAttribute (const ::llvm::Attribute &attribute)
 
static IntAttribute ConvertIntAttribute (const ::llvm::Attribute &attribute)
 
static TypeAttribute ConvertTypeAttribute (const ::llvm::Attribute &attribute, Context &ctx)
 
static StringAttribute ConvertStringAttribute (const ::llvm::Attribute &attribute)
 
static AttributeSet convert_attributes (const ::llvm::AttributeSet &as, Context &ctx)
 
static std::unique_ptr< llvm::Argumentconvert_argument (const ::llvm::Argument &argument, Context &ctx)
 
static void EnsureSingleInEdgeToExitNode (ControlFlowGraph &cfg)
 
static std::unique_ptr< ControlFlowGraphcreate_cfg (::llvm::Function &f, Context &ctx)
 
static void convert_function (::llvm::Function &function, Context &ctx)
 
static const llvm::Linkageconvert_linkage (const ::llvm::GlobalValue::LinkageTypes &linkage)
 
static void declare_globals (::llvm::Module &lm, Context &ctx)
 
static std::unique_ptr< DataNodeInitcreate_initialization (::llvm::GlobalVariable &gv, Context &ctx)
 
static void convert_global_value (::llvm::GlobalVariable &gv, Context &ctx)
 
static void convert_globals (::llvm::Module &lm, Context &ctx)
 
std::unique_ptr< InterProceduralGraphModuleConvertLlvmModule (::llvm::Module &llvmModule)
 
static bool is_sese_basic_block (const ControlFlowGraphNode *node) noexcept
 
static bool is_branch_split (const ControlFlowGraphNode *node) noexcept
 
static bool is_branch_join (const ControlFlowGraphNode *node) noexcept
 
static bool is_branch (const ControlFlowGraphNode *split) noexcept
 
static bool is_linear (const ControlFlowGraphNode *node) noexcept
 
static ControlFlowGraphNodeaggregate (ControlFlowGraphNode *, ControlFlowGraphNode *, AggregationMap &)
 
static void reduce_loop (const StronglyConnectedComponentStructure &sccstruct, AggregationMap &map)
 
static ControlFlowGraphNodereduce_branch (ControlFlowGraphNode *split, ControlFlowGraphNode **entry, AggregationMap &map)
 
static ControlFlowGraphNodereduce_linear (ControlFlowGraphNode *source, ControlFlowGraphNode **entry, ControlFlowGraphNode **exit, AggregationMap &map)
 
static void aggregate_loops (ControlFlowGraphNode *entry, ControlFlowGraphNode *exit, AggregationMap &map)
 
static void aggregate_acyclic_sese (ControlFlowGraphNode *node, ControlFlowGraphNode **entry, ControlFlowGraphNode **exit, AggregationMap &map)
 
std::unique_ptr< AggregationNodeaggregate (ControlFlowGraph &cfg)
 Aggregate a properly structured CFG to a aggregation tree. More...
 
size_t ntacs (const AggregationNode &root)
 
template<class T >
static bool is (const AggregationNode *node)
 
static void AnnotateReadWrite (const AggregationNode &, AnnotationMap &)
 
static void AnnotateReadWrite (const EntryAggregationNode &entryAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateReadWrite (const ExitAggregationNode &exitAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateReadWrite (const BasicBlockAggregationNode &basicBlockAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateReadWrite (const LinearAggregationNode &linearAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateReadWrite (const BranchAggregationNode &branchAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateReadWrite (const LoopAggregationNode &loopAggregationNode, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const AggregationNode &, VariableSet &, AnnotationMap &)
 
static void AnnotateDemandSet (const EntryAggregationNode &entryAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const ExitAggregationNode &exitAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const BasicBlockAggregationNode &basicBlockAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const LinearAggregationNode &linearAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const BranchAggregationNode &branchAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
static void AnnotateDemandSet (const LoopAggregationNode &loopAggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
template<class T >
static void AnnotateDemandSet (const AggregationNode *aggregationNode, VariableSet &workingSet, AnnotationMap &demandMap)
 
std::unique_ptr< AnnotationMapAnnotate (const AggregationNode &aggregationTreeRoot)
 
static void AddToWorklist (std::deque< rvsdg::Input * > &worklist, rvsdg::Output &output)
 
CallSummary ComputeCallSummary (const rvsdg::LambdaNode &lambdaNode)
 
template<class T >
static bool is (const ControlFlowGraphNode *node) noexcept
 
static void strongconnect (ControlFlowGraphNode *node, ControlFlowGraphNode *exit, std::unordered_map< ControlFlowGraphNode *, std::pair< size_t, size_t >> &map, std::vector< ControlFlowGraphNode * > &node_stack, size_t &index, std::vector< StronglyConnectedComponent > &sccs)
 
std::vector< StronglyConnectedComponentfind_sccs (const ControlFlowGraph &cfg)
 
std::vector< StronglyConnectedComponentfind_sccs (ControlFlowGraphNode *entry, ControlFlowGraphNode *exit)
 
static std::unique_ptr< ControlFlowGraphcopy_structural (const ControlFlowGraph &in)
 
static bool is_loop (const jlm::llvm::ControlFlowGraphNode *node) noexcept
 
static bool is_linear_reduction (const jlm::llvm::ControlFlowGraphNode *node) noexcept
 
static jlm::llvm::ControlFlowGraphNodefind_join (const jlm::llvm::ControlFlowGraphNode *split) noexcept
 
static bool is_branch (const jlm::llvm::ControlFlowGraphNode *split) noexcept
 
static bool is_proper_branch (const jlm::llvm::ControlFlowGraphNode *split) noexcept
 
static bool is_T1 (const jlm::llvm::ControlFlowGraphNode *node) noexcept
 
static bool is_T2 (const jlm::llvm::ControlFlowGraphNode *node) noexcept
 
static void reduce_loop (jlm::llvm::ControlFlowGraphNode *node, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static void reduce_linear (jlm::llvm::ControlFlowGraphNode *entry, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static void reduce_branch (jlm::llvm::ControlFlowGraphNode *split, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static void reduce_proper_branch (jlm::llvm::ControlFlowGraphNode *split, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static void reduce_T1 (jlm::llvm::ControlFlowGraphNode *node)
 
static void reduce_T2 (jlm::llvm::ControlFlowGraphNode *node, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static bool reduce_proper_structured (jlm::llvm::ControlFlowGraphNode *node, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static bool reduce_structured (jlm::llvm::ControlFlowGraphNode *node, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static bool reduce_reducible (jlm::llvm::ControlFlowGraphNode *node, std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &to_visit)
 
static bool has_valid_phis (const BasicBlock &bb)
 
static bool is_valid_basic_block (const BasicBlock &bb)
 
static bool has_valid_entry (const ControlFlowGraph &cfg)
 
static bool has_valid_exit (const ControlFlowGraph &cfg)
 
bool is_valid (const ControlFlowGraph &cfg)
 
bool is_closed (const ControlFlowGraph &cfg)
 
bool is_linear (const ControlFlowGraph &cfg)
 
static bool reduce (const ControlFlowGraph &cfg, const std::function< bool(llvm::ControlFlowGraphNode *, std::unordered_set< llvm::ControlFlowGraphNode * > &)> &f)
 
bool is_structured (const ControlFlowGraph &cfg)
 
bool is_proper_structured (const ControlFlowGraph &cfg)
 
bool is_reducible (const ControlFlowGraph &cfg)
 
void straighten (ControlFlowGraph &cfg)
 
void purge (ControlFlowGraph &cfg)
 Remove all basic blocks without instructions. More...
 
static std::unordered_set< const ControlFlowGraphNode * > compute_livenodes (const ControlFlowGraph &cfg)
 
static std::unordered_set< ControlFlowGraphNode * > compute_deadnodes (ControlFlowGraph &cfg)
 
static std::unordered_set< BasicBlock * > compute_live_sinks (const std::unordered_set< ControlFlowGraphNode * > &deadnodes)
 
static void update_phi_operands (llvm::ThreeAddressCode &phitac, const std::unordered_set< ControlFlowGraphNode * > &deadnodes)
 
static void update_phi_operands (const std::unordered_set< BasicBlock * > &sinks, const std::unordered_set< ControlFlowGraphNode * > &deadnodes)
 
static void remove_deadnodes (const std::unordered_set< ControlFlowGraphNode * > &deadnodes)
 
void prune (ControlFlowGraph &cfg)
 
static bool is_acyclic (const ControlFlowGraph &cfg)
 
std::vector< ControlFlowGraphNode * > postorder (const ControlFlowGraph &cfg)
 
std::vector< ControlFlowGraphNode * > reverse_postorder (const ControlFlowGraph &cfg)
 
std::vector< ControlFlowGraphNode * > breadth_first (const ControlFlowGraph &cfg)
 
size_t ntacs (const ControlFlowGraph &cfg)
 
static std::unique_ptr< DominatorTreeNodebuild_domtree (std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &doms, ControlFlowGraphNode *root)
 
static ControlFlowGraphNodeintersect (ControlFlowGraphNode *b1, ControlFlowGraphNode *b2, const std::unordered_map< ControlFlowGraphNode *, size_t > &indices, const std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &doms)
 
std::unique_ptr< DominatorTreeNodedomtree (ControlFlowGraph &cfg)
 
static std::unique_ptr< GlobalValuecreate_gblvalue (DataNode *node)
 
static size_t ntacs (const InterProceduralGraphModule &im)
 
rvsdg::OutputGetMemoryStateRegionArgument (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::InputGetMemoryStateRegionResult (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::SimpleNodetryGetMemoryStateExitMerge (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::SimpleNodetryGetMemoryStateEntrySplit (const rvsdg::LambdaNode &lambdaNode) noexcept
 
std::string_view linkageToString (const Linkage linkage)
 
Linkage linkageFromString (const std::string_view stringValue)
 
bool isDiscardableIfUnused (const Linkage linkage)
 
bool isPrivateOrInternal (const Linkage linkage)
 
static bool is_load_alloca_reducible (const std::vector< rvsdg::Output * > &operands)
 
static bool is_reducible_state (const rvsdg::Output *state, const rvsdg::Node *loadalloca)
 
static bool is_load_store_state_reducible (const LoadNonVolatileOperation &op, const std::vector< rvsdg::Output * > &operands)
 
static bool is_multiple_origin_reducible (const std::vector< rvsdg::Output * > &operands)
 
static std::vector< rvsdg::Output * > perform_load_alloca_reduction (const LoadNonVolatileOperation &op, const std::vector< rvsdg::Output * > &operands)
 
static std::vector< rvsdg::Output * > perform_load_store_state_reduction (const LoadNonVolatileOperation &op, const std::vector< rvsdg::Output * > &operands)
 
static std::vector< rvsdg::Output * > perform_multiple_origin_reduction (const LoadNonVolatileOperation &op, const std::vector< rvsdg::Output * > &operands)
 
template<class TMemoryStateMergeOrJoinOperation >
std::vector< rvsdg::Output * > CollectNestedMemoryStateMergeOrJoinOperands (const std::vector< rvsdg::Output * > &operands)
 
static void CheckMemoryNodeIds (const std::vector< MemoryNodeId > &memoryNodeIds)
 
static std::string ToString (const std::vector< MemoryNodeId > &memoryNodeIds)
 
bool hasMemoryState (const rvsdg::Node &node)
 
static bool is_bitunary_reducible (const rvsdg::Output *operand)
 
static bool is_bitbinary_reducible (const rvsdg::Output *operand)
 
static bool is_inverse_reducible (const SExtOperation &op, const rvsdg::Output *operand)
 
static rvsdg::Outputperform_bitunary_reduction (const SExtOperation &op, rvsdg::Output *operand)
 
static rvsdg::Outputperform_bitbinary_reduction (const SExtOperation &op, rvsdg::Output *operand)
 
static rvsdg::Outputperform_inverse_reduction (const SExtOperation &op, rvsdg::Output *operand)
 
static bool is_store_mux_reducible (const std::vector< jlm::rvsdg::Output * > &operands)
 
static bool is_store_store_reducible (const StoreNonVolatileOperation &op, const std::vector< jlm::rvsdg::Output * > &operands)
 
static bool is_store_alloca_reducible (const std::vector< jlm::rvsdg::Output * > &operands)
 
static bool is_multiple_origin_reducible (const std::vector< jlm::rvsdg::Output * > &operands)
 
static std::vector< jlm::rvsdg::Output * > perform_store_mux_reduction (const StoreNonVolatileOperation &op, const std::vector< jlm::rvsdg::Output * > &operands)
 
static std::vector< jlm::rvsdg::Output * > perform_store_store_reduction (const StoreNonVolatileOperation &op, const std::vector< jlm::rvsdg::Output * > &operands)
 
static std::vector< jlm::rvsdg::Output * > perform_store_alloca_reduction (const StoreNonVolatileOperation &op, const std::vector< jlm::rvsdg::Output * > &operands)
 
static std::vector< jlm::rvsdg::Output * > perform_multiple_origin_reduction (const StoreNonVolatileOperation &operation, const std::vector< jlm::rvsdg::Output * > &operands)
 
static std::string emit_tacs (const tacsvector_t &tacs)
 
static std::string emit_function_node (const InterProceduralGraphNode &clg_node)
 
static std::string emit_data_node (const InterProceduralGraphNode &clg_node)
 
std::string to_str (const InterProceduralGraph &clg)
 
static std::string emit_entry_dot (const ControlFlowGraphNode &node)
 
static std::string emit_exit_dot (const ControlFlowGraphNode &node)
 
static std::string emit_basic_block (const ControlFlowGraphNode &node)
 
static std::string emit_header (const ControlFlowGraphNode &node)
 
static std::string emit_node (const ControlFlowGraphNode &node)
 
std::string to_dot (const ControlFlowGraph &cfg)
 
std::string to_dot (const InterProceduralGraph &clg)
 
std::string to_str (const AggregationNode &n, const AnnotationMap &dm)
 
void print (const AggregationNode &n, const AnnotationMap &dm, FILE *out)
 
static void print_dot (const ControlFlowGraph &cfg, FILE *out)
 
static void print_ascii (const InterProceduralGraph &ipg, FILE *out)
 
static void print_dot (const InterProceduralGraph &ipg, FILE *out)
 
static std::string to_str (const InterProceduralGraphModule &im)
 
static void print (const InterProceduralGraphModule &im, FILE *out)
 
static std::string to_str (const AggregationNode &n)
 
static void print (const AggregationNode &n, FILE *out)
 
void destruct_ssa (ControlFlowGraph &cfg)
 
static void check_operands (const rvsdg::SimpleOperation &operation, const std::vector< const Variable * > &operands)
 
static void check_results (const rvsdg::SimpleOperation &operation, const std::vector< std::unique_ptr< ThreeAddressCodeVariable >> &results)
 
template<class T >
static bool is (const llvm::ThreeAddressCode *tac)
 
rvsdg::OutputtraceOutput (rvsdg::Output &output)
 
std::optional< int64_t > tryGetConstantSignedInteger (const rvsdg::Output &output)
 
const rvsdg::OutputtraceOutput (const rvsdg::Output &output)
 
size_t GetTypeStoreSize (const rvsdg::Type &type)
 
size_t GetTypeAllocSize (const rvsdg::Type &type)
 
size_t GetTypeAlignment (const rvsdg::Type &type)
 
template<class ELEMENTYPE >
bool IsOrContains (const jlm::rvsdg::Type &type)
 
bool IsAggregateType (const jlm::rvsdg::Type &type)
 
template<class T >
static bool is (const llvm::Variable *variable) noexcept
 
static bool areOutputsCongruent (const rvsdg::Output &o1, const rvsdg::Output &o2, CommonNodeElimination::Context &context)
 
static bool checkNodesCongruent (const rvsdg::Node &node1, const rvsdg::Node &node2, CommonNodeElimination::Context &context)
 
void markNodeAsLeader (const rvsdg::Node &leader, CommonNodeElimination::Context &context)
 
void markNodesAsCongruent (const rvsdg::Node &leader, const rvsdg::Node &follower, CommonNodeElimination::Context &context)
 
const rvsdg::NodetryGetLeaderNode (const rvsdg::Node &node, CommonNodeElimination::Context &context)
 
static void markSimpleTopNode (const rvsdg::SimpleNode &node, TopNodeLeaderList &leaders, CommonNodeElimination::Context &context)
 
static void markSimpleNode (const rvsdg::SimpleNode &node, CommonNodeElimination::Context &context)
 
static void markRegion (const rvsdg::Region &, CommonNodeElimination::Context &context)
 
static void markGraphImports (const rvsdg::Region &region, CommonNodeElimination::Context &context)
 
static bool partitionArguments (const rvsdg::Region &region, const std::vector< CommonNodeElimination::Context::CongruenceSetIndex > &partitions, CommonNodeElimination::Context &context)
 
static bool markSubregionsFromInputs (const rvsdg::StructuralNode &node, CommonNodeElimination::Context &context)
 
static std::optional< CommonNodeElimination::Context::CongruenceSetIndextryGetGammaExitVarCongruenceSet (rvsdg::GammaNode::ExitVar &exitVar, CommonNodeElimination::Context &context)
 
static void markGamma (const rvsdg::GammaNode &gamma, CommonNodeElimination::Context &context)
 
static void markTheta (const rvsdg::ThetaNode &theta, CommonNodeElimination::Context &context)
 
static void markStructuralNode (const rvsdg::StructuralNode &node, CommonNodeElimination::Context &context)
 
static void divertOutput (rvsdg::Output &output, CommonNodeElimination::Context &context)
 
static void divertInRegion (rvsdg::Region &, CommonNodeElimination::Context &)
 
static void divertInStructuralNode (rvsdg::StructuralNode &node, CommonNodeElimination::Context &context)
 
static std::vector< rvsdg::Output * > routeContextVariablesToRegion (rvsdg::Region &region, const rvsdg::LambdaNode &callee)
 
static void tryRerouteMemoryStateMergeAndSplit (rvsdg::SimpleNode &callEntryMerge, rvsdg::SimpleNode &callExitSplit)
 
static void hoistInlinedAllocas (const rvsdg::LambdaNode &callee, rvsdg::LambdaNode &caller, rvsdg::SubstitutionMap &smap)
 
static std::optional< std::vector< uint64_t > > extractConstantAlternatives (const rvsdg::Output &gammaOutput)
 
static std::optional< std::unique_ptr< ThetaGammaPredicateCorrelation > > computeControlConstantCorrelation (rvsdg::ThetaNode &thetaNode)
 
static std::optional< std::unique_ptr< ThetaGammaPredicateCorrelation > > computeMatchConstantCorrelation (rvsdg::ThetaNode &thetaNode)
 
static std::optional< std::unique_ptr< ThetaGammaPredicateCorrelation > > computeMatchCorrelation (rvsdg::ThetaNode &thetaNode)
 
std::optional< std::unique_ptr< ThetaGammaPredicateCorrelation > > computeThetaGammaPredicateCorrelation (rvsdg::ThetaNode &thetaNode)
 
static std::optional< std::unique_ptr< GammaGammaPredicateCorrelation > > computeMatchCorrelation (rvsdg::GammaNode &gammaNode1)
 
std::optional< std::unique_ptr< GammaGammaPredicateCorrelation > > computeGammaGammaPredicateCorrelation (rvsdg::GammaNode &gammaNode)
 
std::optional< GammaSubregionRolesdetermineGammaSubregionRoles (const ThetaGammaPredicateCorrelation &correlation)
 
static bool empty (const rvsdg::GammaNode *gamma)
 
static bool isSingleSuccessor (const rvsdg::Node &node, const rvsdg::Node &singleSuccessor)
 
static void pullin_node (rvsdg::GammaNode *gamma, rvsdg::Node *node)
 
static void cleanup (rvsdg::GammaNode *gamma, rvsdg::Node *node)
 
void pullin_top (rvsdg::GammaNode *gamma)
 
static size_t is_used_in_nsubregions (const rvsdg::GammaNode *gamma, const rvsdg::Node *node)
 
void pull (rvsdg::GammaNode *gamma)
 
void pull (rvsdg::Region *region)
 
static void pull (rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector)
 
bool DependsOnLoopVariable (const rvsdg::Output &variable, ScalarEvolution::IVDependencyGraph &dependencyGraph)
 
bool isNonZeroConstant (const SCEVConstant *c)
 
static bool is_eqcmp (const rvsdg::Operation &op)
 
static bool is_theta_invariant (const jlm::rvsdg::Output *output)
 
static rvsdg::Outputpush_from_theta (jlm::rvsdg::Output *output)
 
static bool is_idv (jlm::rvsdg::Input *input)
 
static void unroll_body (const rvsdg::ThetaNode *theta, rvsdg::Region *target, rvsdg::SubstitutionMap &smap, size_t factor)
 
static void copy_body_and_unroll (const rvsdg::ThetaNode *theta, size_t factor)
 
static void unroll_theta (const LoopUnrollInfo &ui, rvsdg::SubstitutionMap &smap, size_t factor)
 
static void add_remainder (const LoopUnrollInfo &ui, rvsdg::SubstitutionMap &smap, size_t factor)
 
static void unroll_known_theta (const LoopUnrollInfo &ui, size_t factor)
 
static jlm::rvsdg::Outputcreate_unrolled_gamma_predicate (const LoopUnrollInfo &ui, size_t factor)
 
static jlm::rvsdg::Outputcreate_unrolled_theta_predicate (rvsdg::Region *, const rvsdg::SubstitutionMap &smap, const LoopUnrollInfo &ui, size_t factor)
 
static jlm::rvsdg::Outputcreate_residual_gamma_predicate (const rvsdg::SubstitutionMap &smap, const LoopUnrollInfo &ui)
 
static void unroll_unknown_theta (const LoopUnrollInfo &ui, size_t factor)
 
void unroll (rvsdg::ThetaNode *otheta, size_t factor)
 
static bool unroll (rvsdg::Region *region, size_t factor)
 

Variables

static const rvsdg::unop_reduction_path_t sext_reduction_bitunary = 128
 
static const rvsdg::unop_reduction_path_t sext_reduction_bitbinary = 129
 

Detailed Description

Global memory state passed between functions.

This file contains various helpers to manage the memory state as it is passed between llvm functions represented as lambda operations, and the chosen memory model for this mapping.

Typedef Documentation

◆ BasicBlockMap

Definition at line 33 of file LlvmConversionContext.hpp.

◆ IntegerValueRepresentation

Definition at line 19 of file IntegerOperations.hpp.

◆ MemoryNodeId

using jlm::llvm::MemoryNodeId = typedef std::size_t

Definition at line 17 of file MemoryStateOperations.hpp.

◆ tacsvector_t

typedef std::vector<std::unique_ptr<llvm::ThreeAddressCode> > jlm::llvm::tacsvector_t

Definition at line 202 of file tac.hpp.

◆ TopNodeLeaderList

using jlm::llvm::TopNodeLeaderList = typedef std::vector<const rvsdg::Node *>

Definition at line 403 of file CommonNodeElimination.cpp.

Enumeration Type Documentation

◆ cmp

enum jlm::llvm::cmp
strong
Enumerator
eq 
ne 
gt 
ge 
lt 
le 

Definition at line 684 of file operators.hpp.

◆ CorrelationType

The different types of predicate correlations that are supported.

Enumerator
ControlConstantCorrelation 

The predicate correlates with control constants from subregions of a gamma node.

MatchConstantCorrelation 

The predicate correlates with a MatchNode that gets its input from constants originating from subregions of a gamma node.

MatchCorrelation 

The predicate correlates with a MatchNode that also serves as predicate producer for a gamma node.

Definition at line 38 of file PredicateCorrelation.hpp.

◆ fpcmp

enum jlm::llvm::fpcmp
strong
Enumerator
TRUE 
FALSE 
oeq 
ogt 
oge 
olt 
ole 
one 
ord 
ueq 
ugt 
uge 
ult 
ule 
une 
uno 

Definition at line 904 of file operators.hpp.

◆ fpop

enum jlm::llvm::fpop
strong
Enumerator
add 
sub 
mul 
div 
mod 

Definition at line 1124 of file operators.hpp.

◆ fpsize

enum jlm::llvm::fpsize
strong
Enumerator
half 
flt 
dbl 
x86fp80 
fp128 

Definition at line 110 of file types.hpp.

◆ Linkage

enum jlm::llvm::Linkage
strong

Types of linkage for global variables, constants and functions. Based on LLVM's "::llvm::GlobalValue::LinkageTypes"

Enumerator
externalLinkage 
availableExternallyLinkage 
linkOnceAnyLinkage 
linkOnceOdrLinkage 
weakAnyLinkage 
weakOdrLinkage 
appendingLinkage 
internalLinkage 
privateLinkage 
externalWeakLinkage 
commonLinkage 

Definition at line 18 of file Linkage.hpp.

Function Documentation

◆ add_remainder()

static void jlm::llvm::add_remainder ( const LoopUnrollInfo ui,
rvsdg::SubstitutionMap smap,
size_t  factor 
)
static

Definition at line 268 of file unroll.cpp.

◆ AddIOBarrier()

static const Variable* jlm::llvm::AddIOBarrier ( tacsvector_t tacs,
const Variable operand,
const Context ctx 
)
static

Definition at line 618 of file LlvmInstructionConversion.cpp.

◆ AddToWorklist()

static void jlm::llvm::AddToWorklist ( std::deque< rvsdg::Input * > &  worklist,
rvsdg::Output output 
)
static

Definition at line 21 of file CallSummary.cpp.

◆ aggregate() [1/2]

std::unique_ptr< AggregationNode > jlm::llvm::aggregate ( ControlFlowGraph cfg)

Aggregate a properly structured CFG to a aggregation tree.

This function reduces a properly structured CFG to an aggregation tree. The CFG is only allowed to consist of the following subgraphs:

  1. Linear subgraphs, such as:
    dot_inline_dotgraph_1.png
  2. Branch subgraphs, such as:
    dot_inline_dotgraph_2.png
  3. Tail-Controlled Loops, such as:
    dot_inline_dotgraph_3.png

These subgraphs can be arbitrarily nested. Please refer to Reissmann et al. - RVSDG: An Intermediate Representation for Optimizing Compilers [https://doi.org/10.1145/3391902] for more information.

Definition at line 489 of file aggregation.cpp.

◆ aggregate() [2/2]

static ControlFlowGraphNode * jlm::llvm::aggregate ( ControlFlowGraphNode entry,
ControlFlowGraphNode exit,
AggregationMap map 
)
static

This function takes the entry and the exit of a single-entry/single-exit (SESE) subgraph, i.e. entry must always dominate exit, and reduces the subgraph to an aggregation subtree. The subgraph is then replaced by a single basic block in the CFG and this CFG is associated with the aggregation subtree in the aggregation map.

The function consists of two recursively nested phases:

  1. Loop aggregation
  2. Acyclic SESE aggregation.

The first phase finds all tail-controlled loops and recursively invokes the aggregation procedure on a loops' body to reduce it to a single node. Once all loops in the subgraph have been reduced, the Acyclic SESE aggregation reduces the rest of the acyclic graph into a tree.

Definition at line 479 of file aggregation.cpp.

◆ aggregate_acyclic_sese()

static void jlm::llvm::aggregate_acyclic_sese ( ControlFlowGraphNode node,
ControlFlowGraphNode **  entry,
ControlFlowGraphNode **  exit,
AggregationMap map 
)
static

Definition at line 391 of file aggregation.cpp.

◆ aggregate_loops()

static void jlm::llvm::aggregate_loops ( ControlFlowGraphNode entry,
ControlFlowGraphNode exit,
AggregationMap map 
)
static

Find all tail-controlled loops in an SESE subgraph and reduce each loop to a single node.

Definition at line 373 of file aggregation.cpp.

◆ AggregateControlFlowGraph()

static std::unique_ptr<AggregationNode> jlm::llvm::AggregateControlFlowGraph ( ControlFlowGraph controlFlowGraph,
const std::string &  functionName,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 874 of file InterProceduralGraphConversion.cpp.

◆ Annotate()

std::unique_ptr< AnnotationMap > jlm::llvm::Annotate ( const AggregationNode aggregationTreeRoot)

Definition at line 492 of file Annotation.cpp.

◆ AnnotateAggregationTree()

static std::unique_ptr<AnnotationMap> jlm::llvm::AnnotateAggregationTree ( const AggregationNode aggregationTreeRoot,
const std::string &  functionName,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 896 of file InterProceduralGraphConversion.cpp.

◆ AnnotateDemandSet() [1/8]

static void jlm::llvm::AnnotateDemandSet ( const AggregationNode aggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 472 of file Annotation.cpp.

◆ AnnotateDemandSet() [2/8]

template<class T >
static void jlm::llvm::AnnotateDemandSet ( const AggregationNode aggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 462 of file Annotation.cpp.

◆ AnnotateDemandSet() [3/8]

static void jlm::llvm::AnnotateDemandSet ( const BasicBlockAggregationNode basicBlockAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 397 of file Annotation.cpp.

◆ AnnotateDemandSet() [4/8]

static void jlm::llvm::AnnotateDemandSet ( const BranchAggregationNode branchAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 423 of file Annotation.cpp.

◆ AnnotateDemandSet() [5/8]

static void jlm::llvm::AnnotateDemandSet ( const EntryAggregationNode entryAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 374 of file Annotation.cpp.

◆ AnnotateDemandSet() [6/8]

static void jlm::llvm::AnnotateDemandSet ( const ExitAggregationNode exitAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 387 of file Annotation.cpp.

◆ AnnotateDemandSet() [7/8]

static void jlm::llvm::AnnotateDemandSet ( const LinearAggregationNode linearAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 408 of file Annotation.cpp.

◆ AnnotateDemandSet() [8/8]

static void jlm::llvm::AnnotateDemandSet ( const LoopAggregationNode loopAggregationNode,
VariableSet workingSet,
AnnotationMap demandMap 
)
static

Definition at line 448 of file Annotation.cpp.

◆ AnnotateReadWrite() [1/7]

static void jlm::llvm::AnnotateReadWrite ( const AggregationNode aggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 335 of file Annotation.cpp.

◆ AnnotateReadWrite() [2/7]

static void jlm::llvm::AnnotateReadWrite ( const BasicBlockAggregationNode basicBlockAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 227 of file Annotation.cpp.

◆ AnnotateReadWrite() [3/7]

static void jlm::llvm::AnnotateReadWrite ( const BranchAggregationNode branchAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 295 of file Annotation.cpp.

◆ AnnotateReadWrite() [4/7]

static void jlm::llvm::AnnotateReadWrite ( const EntryAggregationNode entryAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 200 of file Annotation.cpp.

◆ AnnotateReadWrite() [5/7]

static void jlm::llvm::AnnotateReadWrite ( const ExitAggregationNode exitAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 216 of file Annotation.cpp.

◆ AnnotateReadWrite() [6/7]

static void jlm::llvm::AnnotateReadWrite ( const LinearAggregationNode linearAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 272 of file Annotation.cpp.

◆ AnnotateReadWrite() [7/7]

static void jlm::llvm::AnnotateReadWrite ( const LoopAggregationNode loopAggregationNode,
AnnotationMap demandMap 
)
static

Definition at line 322 of file Annotation.cpp.

◆ AppendBranch()

static void jlm::llvm::AppendBranch ( BasicBlock basicBlock,
const Variable operand 
)
static

Definition at line 107 of file ControlFlowRestructuring.cpp.

◆ AppendConstantAssignment()

static void jlm::llvm::AppendConstantAssignment ( BasicBlock basicBlock,
const ThreeAddressCodeVariable variable,
const size_t  value 
)
static

Definition at line 115 of file ControlFlowRestructuring.cpp.

◆ areOutputsCongruent()

static bool jlm::llvm::areOutputsCongruent ( const rvsdg::Output o1,
const rvsdg::Output o2,
CommonNodeElimination::Context context 
)
static

Checks if the given outputs are congruent by using the existing context. The outputs must belong to the same region. Both outputs must already belong to a congruence set.

Parameters
o1the first output
o2the second output
contextthe common node elimination context
Returns
true if the outputs are considered congruent, false otherwise

Definition at line 272 of file CommonNodeElimination.cpp.

◆ breadth_first()

std::vector< ControlFlowGraphNode * > jlm::llvm::breadth_first ( const ControlFlowGraph cfg)

Order CFG nodes breadth-first

Note, all nodes that are not dominated by the entry node are ignored.

param cfg Control flow graph

return A vector with all CFG nodes ordered breadth-first

Definition at line 233 of file cfg.cpp.

◆ build_domtree()

static std::unique_ptr<DominatorTreeNode> jlm::llvm::build_domtree ( std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &  doms,
ControlFlowGraphNode root 
)
static

Definition at line 30 of file domtree.cpp.

◆ check_operands()

static void jlm::llvm::check_operands ( const rvsdg::SimpleOperation operation,
const std::vector< const Variable * > &  operands 
)
static

Definition at line 22 of file tac.cpp.

◆ check_results()

static void jlm::llvm::check_results ( const rvsdg::SimpleOperation operation,
const std::vector< std::unique_ptr< ThreeAddressCodeVariable >> &  results 
)
static

Definition at line 39 of file tac.cpp.

◆ CheckMemoryNodeIds()

static void jlm::llvm::CheckMemoryNodeIds ( const std::vector< MemoryNodeId > &  memoryNodeIds)
static

Definition at line 286 of file MemoryStateOperations.cpp.

◆ checkNodesCongruent()

static bool jlm::llvm::checkNodesCongruent ( const rvsdg::Node node1,
const rvsdg::Node node2,
CommonNodeElimination::Context context 
)
static

Checks if the given nodes appear congruent by comparing their operations and using the context to compare the origins of their inputs. All inputs of both nodes must have origins that already have congruence sets.

This function can only detect congruence between simple nodes.

Parameters
node1the first node
node2the second node
contextthe current context of the mark phase
Returns
true if the nodes appear congruent, otherwise false

Definition at line 299 of file CommonNodeElimination.cpp.

◆ cleanup()

static void jlm::llvm::cleanup ( rvsdg::GammaNode gamma,
rvsdg::Node node 
)
static

Definition at line 116 of file pull.cpp.

◆ CollectNestedMemoryStateMergeOrJoinOperands()

template<class TMemoryStateMergeOrJoinOperation >
std::vector<rvsdg::Output *> jlm::llvm::CollectNestedMemoryStateMergeOrJoinOperands ( const std::vector< rvsdg::Output * > &  operands)

Definition at line 64 of file MemoryStateOperations.cpp.

◆ compute_deadnodes()

static std::unordered_set<ControlFlowGraphNode *> jlm::llvm::compute_deadnodes ( ControlFlowGraph cfg)
static

Definition at line 729 of file cfg-structure.cpp.

◆ compute_live_sinks()

static std::unordered_set<BasicBlock *> jlm::llvm::compute_live_sinks ( const std::unordered_set< ControlFlowGraphNode * > &  deadnodes)
static

Definition at line 750 of file cfg-structure.cpp.

◆ compute_livenodes()

static std::unordered_set<const ControlFlowGraphNode *> jlm::llvm::compute_livenodes ( const ControlFlowGraph cfg)
static

Definition at line 704 of file cfg-structure.cpp.

◆ ComputeCallSummary()

CallSummary jlm::llvm::ComputeCallSummary ( const rvsdg::LambdaNode lambdaNode)

Definition at line 30 of file CallSummary.cpp.

◆ ComputeContinuation()

static Continuation jlm::llvm::ComputeContinuation ( const ControlFlowGraphNode headBranch)
static

Definition at line 367 of file ControlFlowRestructuring.cpp.

◆ computeControlConstantCorrelation()

static std::optional<std::unique_ptr<ThetaGammaPredicateCorrelation> > jlm::llvm::computeControlConstantCorrelation ( rvsdg::ThetaNode thetaNode)
static

Definition at line 78 of file PredicateCorrelation.cpp.

◆ ComputeDominatorGraph()

static util::HashSet<ControlFlowGraphNode *> jlm::llvm::ComputeDominatorGraph ( const ControlFlowGraphEdge edge)
static

Definition at line 323 of file ControlFlowRestructuring.cpp.

◆ computeGammaGammaPredicateCorrelation()

std::optional< std::unique_ptr< GammaGammaPredicateCorrelation > > jlm::llvm::computeGammaGammaPredicateCorrelation ( rvsdg::GammaNode gammaNode)

Definition at line 201 of file PredicateCorrelation.cpp.

◆ ComputeHeadBranch()

static ControlFlowGraphNode& jlm::llvm::ComputeHeadBranch ( ControlFlowGraphNode start,
ControlFlowGraphNode end 
)
static

Definition at line 308 of file ControlFlowRestructuring.cpp.

◆ computeMatchConstantCorrelation()

static std::optional<std::unique_ptr<ThetaGammaPredicateCorrelation> > jlm::llvm::computeMatchConstantCorrelation ( rvsdg::ThetaNode thetaNode)
static

Definition at line 101 of file PredicateCorrelation.cpp.

◆ computeMatchCorrelation() [1/2]

static std::optional<std::unique_ptr<GammaGammaPredicateCorrelation> > jlm::llvm::computeMatchCorrelation ( rvsdg::GammaNode gammaNode1)
static

Definition at line 176 of file PredicateCorrelation.cpp.

◆ computeMatchCorrelation() [2/2]

static std::optional<std::unique_ptr<ThetaGammaPredicateCorrelation> > jlm::llvm::computeMatchCorrelation ( rvsdg::ThetaNode thetaNode)
static

Definition at line 131 of file PredicateCorrelation.cpp.

◆ computeThetaGammaPredicateCorrelation()

std::optional< std::unique_ptr< ThetaGammaPredicateCorrelation > > jlm::llvm::computeThetaGammaPredicateCorrelation ( rvsdg::ThetaNode thetaNode)

Computes a theta-gamma predicate correlation for thetaNode if there is any.

Parameters
thetaNodeThe theta node for which to compute the predicate correlation.
Returns
A theta-gamma predicate correlation if any, otherwise std::nullopt.

Definition at line 155 of file PredicateCorrelation.cpp.

◆ convert() [1/5]

template<class INSTRUCTIONTYPE >
static const Variable* jlm::llvm::convert ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1255 of file LlvmInstructionConversion.cpp.

◆ convert() [2/5]

static const Variable* jlm::llvm::convert ( ::llvm::ShuffleVectorInst *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1148 of file LlvmInstructionConversion.cpp.

◆ convert() [3/5]

static const Variable* jlm::llvm::convert ( ::llvm::UnaryOperator *  unaryOperator,
tacsvector_t threeAddressCodeVector,
Context ctx 
)
static

Definition at line 1176 of file LlvmInstructionConversion.cpp.

◆ convert() [4/5]

static const Variable* jlm::llvm::convert ( const ::llvm::BinaryOperator *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1047 of file LlvmInstructionConversion.cpp.

◆ convert() [5/5]

static const Variable* jlm::llvm::convert ( const ::llvm::ICmpInst *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 529 of file LlvmInstructionConversion.cpp.

◆ Convert() [1/7]

static void jlm::llvm::Convert ( const BasicBlockAggregationNode blockAggregationNode,
const AnnotationMap ,
rvsdg::LambdaNode ,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 647 of file InterProceduralGraphConversion.cpp.

◆ Convert() [2/7]

static void jlm::llvm::Convert ( const BranchAggregationNode branchAggregationNode,
const AnnotationMap demandMap,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 671 of file InterProceduralGraphConversion.cpp.

◆ Convert() [3/7]

static void jlm::llvm::Convert ( const EntryAggregationNode entryAggregationNode,
const AnnotationMap demandMap,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 582 of file InterProceduralGraphConversion.cpp.

◆ Convert() [4/7]

static void jlm::llvm::Convert ( const ExitAggregationNode exitAggregationNode,
const AnnotationMap ,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 629 of file InterProceduralGraphConversion.cpp.

◆ Convert() [5/7]

static void jlm::llvm::Convert ( const LinearAggregationNode linearAggregationNode,
const AnnotationMap demandMap,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 660 of file InterProceduralGraphConversion.cpp.

◆ Convert() [6/7]

template<class TNode , class TOperation >
static void jlm::llvm::Convert ( const llvm::ThreeAddressCode threeAddressCode,
rvsdg::Region region,
llvm::VariableMap variableMap 
)
static

Definition at line 507 of file InterProceduralGraphConversion.cpp.

◆ Convert() [7/7]

static void jlm::llvm::Convert ( const LoopAggregationNode loopAggregationNode,
const AnnotationMap demandMap,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 739 of file InterProceduralGraphConversion.cpp.

◆ convert_alloca_instruction()

static const Variable* jlm::llvm::convert_alloca_instruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 1103 of file LlvmInstructionConversion.cpp.

◆ convert_apint()

static rvsdg::BitValueRepresentation jlm::llvm::convert_apint ( const ::llvm::APInt &  value)
static

Definition at line 74 of file LlvmInstructionConversion.cpp.

◆ convert_argument()

static std::unique_ptr<llvm::Argument> jlm::llvm::convert_argument ( const ::llvm::Argument argument,
Context ctx 
)
static

Definition at line 288 of file LlvmModuleConversion.cpp.

◆ convert_attributes()

static AttributeSet jlm::llvm::convert_attributes ( const ::llvm::AttributeSet as,
Context ctx 
)
static

Definition at line 257 of file LlvmModuleConversion.cpp.

◆ convert_basic_blocks()

static BasicBlockMap jlm::llvm::convert_basic_blocks ( ::llvm::Function &  f,
ControlFlowGraph cfg 
)
static

Definition at line 96 of file LlvmModuleConversion.cpp.

◆ convert_bitvalue_repr()

::llvm::APInt jlm::llvm::convert_bitvalue_repr ( const rvsdg::BitValueRepresentation vr)
static

Definition at line 165 of file IpGraphToLlvmConverter.cpp.

◆ convert_blockAddress()

static const Variable* jlm::llvm::convert_blockAddress ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  ,
Context  
)
static

Definition at line 188 of file LlvmInstructionConversion.cpp.

◆ convert_call_instruction()

static const Variable* jlm::llvm::convert_call_instruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 855 of file LlvmInstructionConversion.cpp.

◆ convert_cast_instruction()

static const Variable* jlm::llvm::convert_cast_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1209 of file LlvmInstructionConversion.cpp.

◆ convert_constantAggregateZero()

static const Variable* jlm::llvm::convert_constantAggregateZero ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 199 of file LlvmInstructionConversion.cpp.

◆ convert_constantArray()

static const Variable* jlm::llvm::convert_constantArray ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 213 of file LlvmInstructionConversion.cpp.

◆ convert_constantDataArray()

static const Variable* jlm::llvm::convert_constantDataArray ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 235 of file LlvmInstructionConversion.cpp.

◆ convert_constantDataVector()

static const Variable* jlm::llvm::convert_constantDataVector ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 253 of file LlvmInstructionConversion.cpp.

◆ convert_constantExpr()

static const Variable* jlm::llvm::convert_constantExpr ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 123 of file LlvmInstructionConversion.cpp.

◆ convert_constantFP()

static const Variable* jlm::llvm::convert_constantFP ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 148 of file LlvmInstructionConversion.cpp.

◆ convert_constantPointerNull()

static const Variable* jlm::llvm::convert_constantPointerNull ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 173 of file LlvmInstructionConversion.cpp.

◆ convert_constantVector()

static const Variable* jlm::llvm::convert_constantVector ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 289 of file LlvmInstructionConversion.cpp.

◆ convert_extractelement_instruction()

static const Variable* jlm::llvm::convert_extractelement_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 1136 of file LlvmInstructionConversion.cpp.

◆ convert_extractvalue()

static const Variable* jlm::llvm::convert_extractvalue ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1124 of file LlvmInstructionConversion.cpp.

◆ convert_fcmp_instruction()

static const Variable* jlm::llvm::convert_fcmp_instruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 573 of file LlvmInstructionConversion.cpp.

◆ convert_free_call()

static const Variable* jlm::llvm::convert_free_call ( const ::llvm::CallInst *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 768 of file LlvmInstructionConversion.cpp.

◆ convert_function() [1/2]

static const Variable* jlm::llvm::convert_function ( ::llvm::Constant *  c,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 318 of file LlvmInstructionConversion.cpp.

◆ convert_function() [2/2]

static void jlm::llvm::convert_function ( ::llvm::Function &  function,
Context ctx 
)
static

Definition at line 441 of file LlvmModuleConversion.cpp.

◆ convert_getelementptr_instruction()

static const Variable* jlm::llvm::convert_getelementptr_instruction ( ::llvm::Instruction *  inst,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 727 of file LlvmInstructionConversion.cpp.

◆ convert_global_value()

static void jlm::llvm::convert_global_value ( ::llvm::GlobalVariable gv,
Context ctx 
)
static

Definition at line 532 of file LlvmModuleConversion.cpp.

◆ convert_globalAlias()

static const Variable* jlm::llvm::convert_globalAlias ( ::llvm::Constant *  constant,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  ,
Context  
)
inlinestatic

Definition at line 307 of file LlvmInstructionConversion.cpp.

◆ convert_globals()

static void jlm::llvm::convert_globals ( ::llvm::Module &  lm,
Context ctx 
)
static

Definition at line 542 of file LlvmModuleConversion.cpp.

◆ convert_globalVariable()

static const Variable* jlm::llvm::convert_globalVariable ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 163 of file LlvmInstructionConversion.cpp.

◆ convert_insertelement_instruction()

static const Variable* jlm::llvm::convert_insertelement_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 1163 of file LlvmInstructionConversion.cpp.

◆ convert_instructions()

static std::vector<::llvm::PHINode *> jlm::llvm::convert_instructions ( ::llvm::Function &  function,
Context ctx 
)
static

Definition at line 23 of file LlvmModuleConversion.cpp.

◆ convert_int_constant()

static const Variable* jlm::llvm::convert_int_constant ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< ThreeAddressCode >> &  tacs,
Context  
)
static

Definition at line 93 of file LlvmInstructionConversion.cpp.

◆ convert_linkage()

static const llvm::Linkage& jlm::llvm::convert_linkage ( const ::llvm::GlobalValue::LinkageTypes &  linkage)
static

Definition at line 454 of file LlvmModuleConversion.cpp.

◆ convert_load_instruction()

static const Variable* jlm::llvm::convert_load_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 627 of file LlvmInstructionConversion.cpp.

◆ convert_malloc_call()

static const Variable* jlm::llvm::convert_malloc_call ( const ::llvm::CallInst *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 747 of file LlvmInstructionConversion.cpp.

◆ convert_memcpy_call()

static const Variable* jlm::llvm::convert_memcpy_call ( const ::llvm::CallInst *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 805 of file LlvmInstructionConversion.cpp.

◆ convert_return_instruction()

static const Variable* jlm::llvm::convert_return_instruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 392 of file LlvmInstructionConversion.cpp.

◆ convert_select_instruction()

static const Variable* jlm::llvm::convert_select_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 969 of file LlvmInstructionConversion.cpp.

◆ convert_store_instruction()

static const Variable* jlm::llvm::convert_store_instruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
inlinestatic

Definition at line 673 of file LlvmInstructionConversion.cpp.

◆ convert_undefvalue()

static const Variable* jlm::llvm::convert_undefvalue ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
inlinestatic

Definition at line 109 of file LlvmInstructionConversion.cpp.

◆ convert_unreachable_instruction()

static const Variable* jlm::llvm::convert_unreachable_instruction ( ::llvm::Instruction *  i,
tacsvector_t ,
Context ctx 
)
inlinestatic

Definition at line 468 of file LlvmInstructionConversion.cpp.

◆ ConvertAggregationNode()

static void jlm::llvm::ConvertAggregationNode ( const AggregationNode aggregationNode,
const AnnotationMap demandMap,
rvsdg::LambdaNode lambdaNode,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 819 of file InterProceduralGraphConversion.cpp.

◆ ConvertAggregationTreeToLambda()

static rvsdg::Output* jlm::llvm::ConvertAggregationTreeToLambda ( const AggregationNode aggregationTreeRoot,
const AnnotationMap demandMap,
RegionalizedVariableMap scopedVariableMap,
const std::string &  functionName,
std::shared_ptr< const rvsdg::FunctionType functionType,
const Linkage functionLinkage,
const AttributeSet functionAttributes,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 908 of file InterProceduralGraphConversion.cpp.

◆ ConvertAssignment()

static void jlm::llvm::ConvertAssignment ( const llvm::ThreeAddressCode threeAddressCode,
rvsdg::Region ,
llvm::VariableMap variableMap 
)
static

Definition at line 465 of file InterProceduralGraphConversion.cpp.

◆ ConvertAttributeKind()

Attribute::kind jlm::llvm::ConvertAttributeKind ( const ::llvm::Attribute::AttrKind &  kind)

Definition at line 107 of file LlvmModuleConversion.cpp.

◆ ConvertBasicBlock()

static void jlm::llvm::ConvertBasicBlock ( const ThreeAddressCodeList basicBlock,
rvsdg::Region region,
llvm::VariableMap variableMap 
)
static

Definition at line 565 of file InterProceduralGraphConversion.cpp.

◆ ConvertBranch()

static void jlm::llvm::ConvertBranch ( const llvm::ThreeAddressCode threeAddressCode,
rvsdg::Region ,
llvm::VariableMap  
)
static

Definition at line 497 of file InterProceduralGraphConversion.cpp.

◆ ConvertBranchInstruction()

static const Variable* jlm::llvm::ConvertBranchInstruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 409 of file LlvmInstructionConversion.cpp.

◆ ConvertConstant() [1/4]

const Variable * jlm::llvm::ConvertConstant ( ::llvm::Constant *  ,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  ,
Context  
)

Definition at line 348 of file LlvmInstructionConversion.cpp.

◆ ConvertConstant() [2/4]

std::vector< std::unique_ptr< llvm::ThreeAddressCode > > jlm::llvm::ConvertConstant ( ::llvm::Constant *  c,
Context ctx 
)

Definition at line 382 of file LlvmInstructionConversion.cpp.

◆ ConvertConstant() [3/4]

template<class T >
static const Variable* jlm::llvm::ConvertConstant ( ::llvm::Constant *  constant,
tacsvector_t threeAddressCodeVector,
Context context 
)
static

Definition at line 338 of file LlvmInstructionConversion.cpp.

◆ ConvertConstant() [4/4]

static const Variable* jlm::llvm::ConvertConstant ( ::llvm::PoisonValue *  poisonValue,
tacsvector_t threeAddressCodeVector,
Context context 
)
static

Definition at line 325 of file LlvmInstructionConversion.cpp.

◆ ConvertConstantStruct()

static const Variable* jlm::llvm::ConvertConstantStruct ( ::llvm::Constant *  c,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)
static

Definition at line 271 of file LlvmInstructionConversion.cpp.

◆ ConvertControlFlowGraph()

static rvsdg::Output* jlm::llvm::ConvertControlFlowGraph ( const FunctionNode functionNode,
RegionalizedVariableMap regionalizedVariableMap,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 939 of file InterProceduralGraphConversion.cpp.

◆ ConvertDataNode()

static rvsdg::Output* jlm::llvm::ConvertDataNode ( const DataNode dataNode,
RegionalizedVariableMap regionalizedVariableMap,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 1012 of file InterProceduralGraphConversion.cpp.

◆ ConvertDataNodeInitialization()

static rvsdg::Output* jlm::llvm::ConvertDataNodeInitialization ( const DataNodeInit init,
rvsdg::Region region,
RegionalizedVariableMap regionalizedVariableMap 
)
static

Definition at line 999 of file InterProceduralGraphConversion.cpp.

◆ ConvertEnumAttribute()

static EnumAttribute jlm::llvm::ConvertEnumAttribute ( const ::llvm::Attribute attribute)
static

Definition at line 214 of file LlvmModuleConversion.cpp.

◆ ConvertFloatingPointBinaryOperation()

static std::unique_ptr<rvsdg::BinaryOperation> jlm::llvm::ConvertFloatingPointBinaryOperation ( const ::llvm::Instruction::BinaryOps  binaryOperation,
fpsize  floatingPointSize 
)
static

Definition at line 1025 of file LlvmInstructionConversion.cpp.

◆ ConvertFMulAddIntrinsic()

static const Variable* jlm::llvm::ConvertFMulAddIntrinsic ( const ::llvm::CallInst &  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 844 of file LlvmInstructionConversion.cpp.

◆ ConvertFunctionNode()

static rvsdg::Output* jlm::llvm::ConvertFunctionNode ( const FunctionNode functionNode,
RegionalizedVariableMap regionalizedVariableMap,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 972 of file InterProceduralGraphConversion.cpp.

◆ ConvertInstruction()

const Variable * jlm::llvm::ConvertInstruction ( ::llvm::Instruction *  i,
std::vector< std::unique_ptr< llvm::ThreeAddressCode >> &  tacs,
Context ctx 
)

Definition at line 1262 of file LlvmInstructionConversion.cpp.

◆ ConvertIntAttribute()

static IntAttribute jlm::llvm::ConvertIntAttribute ( const ::llvm::Attribute attribute)
static

Definition at line 222 of file LlvmModuleConversion.cpp.

◆ ConvertIntegerBinaryOperation()

static std::unique_ptr<rvsdg::BinaryOperation> jlm::llvm::ConvertIntegerBinaryOperation ( const ::llvm::Instruction::BinaryOps  binaryOperation,
std::size_t  numBits 
)
static

Definition at line 987 of file LlvmInstructionConversion.cpp.

◆ ConvertIntegerIcmpPredicate()

static std::unique_ptr<rvsdg::BinaryOperation> jlm::llvm::ConvertIntegerIcmpPredicate ( const ::llvm::CmpInst::Predicate  predicate,
const std::size_t  numBits 
)
static

Definition at line 477 of file LlvmInstructionConversion.cpp.

◆ ConvertInterProceduralGraphModule() [1/2]

static std::unique_ptr<LlvmRvsdgModule> jlm::llvm::ConvertInterProceduralGraphModule ( InterProceduralGraphModule interProceduralGraphModule,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 1187 of file InterProceduralGraphConversion.cpp.

◆ ConvertInterProceduralGraphModule() [2/2]

std::unique_ptr< LlvmRvsdgModule > jlm::llvm::ConvertInterProceduralGraphModule ( InterProceduralGraphModule interProceduralGraphModule,
util::StatisticsCollector statisticsCollector 
)

Definition at line 1213 of file InterProceduralGraphConversion.cpp.

◆ ConvertInterProceduralGraphNode()

static rvsdg::Output* jlm::llvm::ConvertInterProceduralGraphNode ( const InterProceduralGraphNode ipgNode,
RegionalizedVariableMap regionalizedVariableMap,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 1081 of file InterProceduralGraphConversion.cpp.

◆ ConvertLlvmModule()

std::unique_ptr< InterProceduralGraphModule > jlm::llvm::ConvertLlvmModule ( ::llvm::Module &  llvmModule)

Definition at line 552 of file LlvmModuleConversion.cpp.

◆ ConvertPhiInstruction()

static const Variable* jlm::llvm::ConvertPhiInstruction ( ::llvm::Instruction *  i,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 715 of file LlvmInstructionConversion.cpp.

◆ ConvertPointerIcmpPredicate()

static std::unique_ptr<rvsdg::BinaryOperation> jlm::llvm::ConvertPointerIcmpPredicate ( const ::llvm::CmpInst::Predicate  predicate)
static

Definition at line 507 of file LlvmInstructionConversion.cpp.

◆ ConvertSelect()

static void jlm::llvm::ConvertSelect ( const llvm::ThreeAddressCode threeAddressCode,
rvsdg::Region ,
llvm::VariableMap variableMap 
)
static

Definition at line 478 of file InterProceduralGraphConversion.cpp.

◆ ConvertStringAttribute()

static StringAttribute jlm::llvm::ConvertStringAttribute ( const ::llvm::Attribute attribute)
static

Definition at line 250 of file LlvmModuleConversion.cpp.

◆ ConvertStronglyConnectedComponent()

static void jlm::llvm::ConvertStronglyConnectedComponent ( const std::unordered_set< const InterProceduralGraphNode * > &  stronglyConnectedComponent,
rvsdg::Graph graph,
RegionalizedVariableMap regionalizedVariableMap,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 1096 of file InterProceduralGraphConversion.cpp.

◆ ConvertSwitchInstruction()

static const Variable* jlm::llvm::ConvertSwitchInstruction ( ::llvm::Instruction *  instruction,
tacsvector_t tacs,
Context ctx 
)
static

Definition at line 437 of file LlvmInstructionConversion.cpp.

◆ ConvertThreeAddressCode()

static void jlm::llvm::ConvertThreeAddressCode ( const llvm::ThreeAddressCode threeAddressCode,
rvsdg::Region region,
llvm::VariableMap variableMap 
)
static

Definition at line 532 of file InterProceduralGraphConversion.cpp.

◆ ConvertTypeAttribute()

static TypeAttribute jlm::llvm::ConvertTypeAttribute ( const ::llvm::Attribute attribute,
Context ctx 
)
static

Definition at line 230 of file LlvmModuleConversion.cpp.

◆ ConvertValue()

const Variable * jlm::llvm::ConvertValue ( ::llvm::Value *  v,
tacsvector_t tacs,
Context ctx 
)

Definition at line 51 of file LlvmInstructionConversion.cpp.

◆ ConvertValueOrFunction()

const Variable* jlm::llvm::ConvertValueOrFunction ( ::llvm::Value *  v,
tacsvector_t tacs,
Context ctx 
)

Definition at line 28 of file LlvmInstructionConversion.cpp.

◆ copy_body_and_unroll()

static void jlm::llvm::copy_body_and_unroll ( const rvsdg::ThetaNode theta,
size_t  factor 
)
static

Definition at line 202 of file unroll.cpp.

◆ copy_structural()

static std::unique_ptr<ControlFlowGraph> jlm::llvm::copy_structural ( const ControlFlowGraph in)
static

Definition at line 147 of file cfg-structure.cpp.

◆ create_cfg()

static std::unique_ptr<ControlFlowGraph> jlm::llvm::create_cfg ( ::llvm::Function &  f,
Context ctx 
)
static

Definition at line 365 of file LlvmModuleConversion.cpp.

◆ create_gblvalue()

static std::unique_ptr<GlobalValue> jlm::llvm::create_gblvalue ( DataNode node)
inlinestatic

Definition at line 49 of file ipgraph-module.hpp.

◆ create_initialization()

static std::unique_ptr<DataNodeInit> jlm::llvm::create_initialization ( ::llvm::GlobalVariable gv,
Context ctx 
)
static

Definition at line 518 of file LlvmModuleConversion.cpp.

◆ create_residual_gamma_predicate()

static jlm::rvsdg::Output* jlm::llvm::create_residual_gamma_predicate ( const rvsdg::SubstitutionMap smap,
const LoopUnrollInfo ui 
)
static

Definition at line 388 of file unroll.cpp.

◆ create_unop()

template<class OP >
static std::unique_ptr<rvsdg::SimpleOperation> jlm::llvm::create_unop ( std::shared_ptr< const rvsdg::Type st,
std::shared_ptr< const rvsdg::Type dt 
)
static

Definition at line 1203 of file LlvmInstructionConversion.cpp.

◆ create_unrolled_gamma_predicate()

static jlm::rvsdg::Output* jlm::llvm::create_unrolled_gamma_predicate ( const LoopUnrollInfo ui,
size_t  factor 
)
static

Definition at line 337 of file unroll.cpp.

◆ create_unrolled_theta_predicate()

static jlm::rvsdg::Output* jlm::llvm::create_unrolled_theta_predicate ( rvsdg::Region ,
const rvsdg::SubstitutionMap smap,
const LoopUnrollInfo ui,
size_t  factor 
)
static

Definition at line 356 of file unroll.cpp.

◆ CreateContinuationVariable()

static const ThreeAddressCodeVariable* jlm::llvm::CreateContinuationVariable ( BasicBlock bb,
std::shared_ptr< const rvsdg::ControlType type 
)
static

Definition at line 69 of file ControlFlowRestructuring.cpp.

◆ CreateLoopEntryVariable()

static const ThreeAddressCodeVariable& jlm::llvm::CreateLoopEntryVariable ( BasicBlock bb,
std::shared_ptr< const rvsdg::ControlType type 
)
static

Definition at line 87 of file ControlFlowRestructuring.cpp.

◆ CreateLoopExitVariable()

static const ThreeAddressCodeVariable& jlm::llvm::CreateLoopExitVariable ( BasicBlock bb,
std::shared_ptr< const rvsdg::ControlType type 
)
static

Definition at line 77 of file ControlFlowRestructuring.cpp.

◆ CreateLoopRepetitionVariable()

static const ThreeAddressCodeVariable& jlm::llvm::CreateLoopRepetitionVariable ( BasicBlock basicBlock)
static

Definition at line 97 of file ControlFlowRestructuring.cpp.

◆ declare_globals()

static void jlm::llvm::declare_globals ( ::llvm::Module &  lm,
Context ctx 
)
static

Definition at line 475 of file LlvmModuleConversion.cpp.

◆ DependsOnLoopVariable()

bool jlm::llvm::DependsOnLoopVariable ( const rvsdg::Output variable,
ScalarEvolution::IVDependencyGraph dependencyGraph 
)

Definition at line 356 of file ScalarEvolution.cpp.

◆ destruct_ssa()

void jlm::llvm::destruct_ssa ( ControlFlowGraph cfg)

Definition at line 18 of file ssa.cpp.

◆ determineGammaSubregionRoles()

std::optional< GammaSubregionRoles > jlm::llvm::determineGammaSubregionRoles ( const ThetaGammaPredicateCorrelation correlation)

Tries to assign the respective roles (exit or repetition) to the subregions of a gamma node that statically correlates with the predicate of a theta node.

Parameters
correlationThe predicate correlation between a theta and gamma node.
Returns
The roles of the gamma subregions, otherwise std::nullopt.

Definition at line 212 of file PredicateCorrelation.cpp.

◆ divertInRegion()

static void jlm::llvm::divertInRegion ( rvsdg::Region region,
CommonNodeElimination::Context context 
)
static

Definition at line 947 of file CommonNodeElimination.cpp.

◆ divertInStructuralNode()

static void jlm::llvm::divertInStructuralNode ( rvsdg::StructuralNode node,
CommonNodeElimination::Context context 
)
static

Definition at line 910 of file CommonNodeElimination.cpp.

◆ divertOutput()

static void jlm::llvm::divertOutput ( rvsdg::Output output,
CommonNodeElimination::Context context 
)
static

Definition at line 895 of file CommonNodeElimination.cpp.

◆ domtree()

std::unique_ptr< DominatorTreeNode > jlm::llvm::domtree ( ControlFlowGraph cfg)

Definition at line 91 of file domtree.cpp.

◆ emit_basic_block()

static std::string jlm::llvm::emit_basic_block ( const ControlFlowGraphNode node)
inlinestatic

Definition at line 132 of file print.cpp.

◆ emit_data_node()

static std::string jlm::llvm::emit_data_node ( const InterProceduralGraphNode clg_node)
static

Definition at line 67 of file print.cpp.

◆ emit_entry_dot()

static std::string jlm::llvm::emit_entry_dot ( const ControlFlowGraphNode node)
inlinestatic

Definition at line 100 of file print.cpp.

◆ emit_exit_dot()

static std::string jlm::llvm::emit_exit_dot ( const ControlFlowGraphNode node)
inlinestatic

Definition at line 116 of file print.cpp.

◆ emit_function_node()

static std::string jlm::llvm::emit_function_node ( const InterProceduralGraphNode clg_node)
static

Definition at line 34 of file print.cpp.

◆ emit_header()

static std::string jlm::llvm::emit_header ( const ControlFlowGraphNode node)
inlinestatic

Definition at line 145 of file print.cpp.

◆ emit_node()

static std::string jlm::llvm::emit_node ( const ControlFlowGraphNode node)
inlinestatic

Definition at line 157 of file print.cpp.

◆ emit_tacs()

static std::string jlm::llvm::emit_tacs ( const tacsvector_t tacs)
static

Definition at line 24 of file print.cpp.

◆ empty()

static bool jlm::llvm::empty ( const rvsdg::GammaNode gamma)
static

Definition at line 48 of file pull.cpp.

◆ EnsureSingleInEdgeToExitNode()

static void jlm::llvm::EnsureSingleInEdgeToExitNode ( ControlFlowGraph cfg)
static

Definition at line 300 of file LlvmModuleConversion.cpp.

◆ extractConstantAlternatives()

static std::optional<std::vector<uint64_t> > jlm::llvm::extractConstantAlternatives ( const rvsdg::Output gammaOutput)
static

Takes the output of a gamma node and if the output's respective branch results in every subregion originate from a constant, then it returns a vector of the constant alternatives.

Parameters
gammaOutputThe output of a gamma node.
Returns
The constant alternatives for each of the gamma node's subregion, or std::nullopt;

Definition at line 31 of file PredicateCorrelation.cpp.

◆ ExtractLoop()

static TailControlledLoop jlm::llvm::ExtractLoop ( ControlFlowGraphNode loopEntry,
ControlFlowGraphNode loopExit 
)
static

Definition at line 30 of file ControlFlowRestructuring.cpp.

◆ find_join()

static jlm::llvm::ControlFlowGraphNode* jlm::llvm::find_join ( const jlm::llvm::ControlFlowGraphNode split)
inlinestaticnoexcept

Definition at line 194 of file cfg-structure.cpp.

◆ find_sccs() [1/2]

std::vector< StronglyConnectedComponent > jlm::llvm::find_sccs ( const ControlFlowGraph cfg)

Compute a Control Flow Graph's Strongly Connected Components.

Definition at line 127 of file cfg-structure.cpp.

◆ find_sccs() [2/2]

std::vector< StronglyConnectedComponent > jlm::llvm::find_sccs ( ControlFlowGraphNode entry,
ControlFlowGraphNode exit 
)

Compute all Strongly Connected Components of a single-entry/single-exit region. The entry parameter must dominate the exit parameter.

Definition at line 135 of file cfg-structure.cpp.

◆ get_match()

static const llvm::ThreeAddressCode* jlm::llvm::get_match ( const llvm::ThreeAddressCode branch)
static

Definition at line 1481 of file IpGraphToLlvmConverter.cpp.

◆ GetEntryVariableBlock()

static BasicBlock* jlm::llvm::GetEntryVariableBlock ( ControlFlowGraphNode node)
static

Definition at line 226 of file ControlFlowRestructuring.cpp.

◆ GetMemoryStateRegionArgument()

rvsdg::Output & jlm::llvm::GetMemoryStateRegionArgument ( const rvsdg::LambdaNode lambdaNode)
noexcept

Determines the formal argument representing global memory state

Parameters
lambdaNodeThe lambda node to query the memory state for.
Returns
The memory state argument of the lambda subregion.
Precondition
The lambdaNode must conform to the modelling assumptions behind llvm function representation as lambdas and memory state encoding.

Definition at line 13 of file LambdaMemoryState.cpp.

◆ GetMemoryStateRegionResult()

rvsdg::Input & jlm::llvm::GetMemoryStateRegionResult ( const rvsdg::LambdaNode lambdaNode)
noexcept

Determines the formal return value representing global memory state

Parameters
lambdaNodeThe lambda node to query the memory state for.
Returns
The memory state result of the lambda subregion.
Precondition
The lambdaNode must conform to the modelling assumptions behind llvm function representation as lambdas and memory state encoding.

Definition at line 22 of file LambdaMemoryState.cpp.

◆ GetTypeAlignment()

size_t jlm::llvm::GetTypeAlignment ( const rvsdg::Type type)

Returns the natural alignment of the given type, in bytes. Types are not guaranteed to be stored at their natural alignment, so instead check the alignment of the store and load operations. A non-packed struct will add padding to maintain alignment.

Parameters
typethe ValueType
Returns
the byte alignment of the type

Definition at line 485 of file types.cpp.

◆ GetTypeAllocSize()

size_t jlm::llvm::GetTypeAllocSize ( const rvsdg::Type type)

Returns the size of the given type's representation, in bytes. It corresponds to the sizeof() operator in C, so the size is a multiple of the type's alignment. This is the offset between consecutive elements in an array, and also the size of the stack allocation created by an alloca operation with the given type.

See also
GetTypeStoreSize() for the number of bytes that are actually overwritten when storing.
Parameters
typethe ValueType
Returns
the byte size of the type

Definition at line 473 of file types.cpp.

◆ GetTypeStoreSize()

size_t jlm::llvm::GetTypeStoreSize ( const rvsdg::Type type)

Returns the size of the given type's representation, in bytes. More specifically, the size is the number of bytes affected when storing value of the given type to memory. Unlike C's sizeof() operator, the size is not rounded up to a multiple of alignment.

See also
GetTypeAllocSize() for the size rounded up to a multiple of alignment.
Parameters
typethe ValueType
Returns
the byte size of the type

Definition at line 386 of file types.cpp.

◆ has_return_value()

static bool jlm::llvm::has_return_value ( const ControlFlowGraph cfg)
static

Definition at line 1489 of file IpGraphToLlvmConverter.cpp.

◆ has_valid_entry()

static bool jlm::llvm::has_valid_entry ( const ControlFlowGraph cfg)
static

Definition at line 529 of file cfg-structure.cpp.

◆ has_valid_exit()

static bool jlm::llvm::has_valid_exit ( const ControlFlowGraph cfg)
static

Definition at line 541 of file cfg-structure.cpp.

◆ has_valid_phis()

static bool jlm::llvm::has_valid_phis ( const BasicBlock bb)
static

Definition at line 481 of file cfg-structure.cpp.

◆ hasMemoryState()

bool jlm::llvm::hasMemoryState ( const rvsdg::Node node)

Checks if the given node takes any inputs, or produces any outputs, that are of the memory state type.

Parameters
nodethe node in question
Returns
true if any input or output is a memory state, otherwise false.

Definition at line 754 of file MemoryStateOperations.cpp.

◆ hoistInlinedAllocas()

static void jlm::llvm::hoistInlinedAllocas ( const rvsdg::LambdaNode callee,
rvsdg::LambdaNode caller,
rvsdg::SubstitutionMap smap 
)
static

Finds alloca nodes from the callee that have been copied into the caller. Moves the alloca nodes to the top level of the caller, and routes their outputs to their users. This avoids having allocas inside theta nodes, which could otherwise cause the stack to overflow.

Parameters
calleethe function that has been inlined into the caller
callerthe function that now has a copy of callee copied inside it
smapthe substitution map used during copying

Definition at line 236 of file inlining.cpp.

◆ intersect()

static ControlFlowGraphNode* jlm::llvm::intersect ( ControlFlowGraphNode b1,
ControlFlowGraphNode b2,
const std::unordered_map< ControlFlowGraphNode *, size_t > &  indices,
const std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &  doms 
)
static

Definition at line 70 of file domtree.cpp.

◆ is() [1/4]

template<class T >
static bool jlm::llvm::is ( const AggregationNode node)
inlinestatic

Definition at line 163 of file aggregation.hpp.

◆ is() [2/4]

template<class T >
static bool jlm::llvm::is ( const ControlFlowGraphNode node)
inlinestaticnoexcept

Definition at line 214 of file cfg-node.hpp.

◆ is() [3/4]

template<class T >
static bool jlm::llvm::is ( const llvm::ThreeAddressCode tac)
inlinestatic

Definition at line 194 of file tac.hpp.

◆ is() [4/4]

template<class T >
static bool jlm::llvm::is ( const llvm::Variable variable)
inlinestaticnoexcept

Definition at line 74 of file variable.hpp.

◆ is_acyclic()

static bool jlm::llvm::is_acyclic ( const ControlFlowGraph cfg)
inlinestatic

Definition at line 183 of file cfg-structure.hpp.

◆ is_bitbinary_reducible()

static bool jlm::llvm::is_bitbinary_reducible ( const rvsdg::Output operand)
static

Definition at line 23 of file sext.cpp.

◆ is_bitunary_reducible()

static bool jlm::llvm::is_bitunary_reducible ( const rvsdg::Output operand)
static

Definition at line 17 of file sext.cpp.

◆ is_branch() [1/2]

static bool jlm::llvm::is_branch ( const ControlFlowGraphNode split)
staticnoexcept

Definition at line 192 of file aggregation.cpp.

◆ is_branch() [2/2]

static bool jlm::llvm::is_branch ( const jlm::llvm::ControlFlowGraphNode split)
inlinestaticnoexcept

Definition at line 214 of file cfg-structure.cpp.

◆ is_branch_join()

static bool jlm::llvm::is_branch_join ( const ControlFlowGraphNode node)
staticnoexcept

Definition at line 186 of file aggregation.cpp.

◆ is_branch_split()

static bool jlm::llvm::is_branch_split ( const ControlFlowGraphNode node)
staticnoexcept

Definition at line 180 of file aggregation.cpp.

◆ is_closed()

bool jlm::llvm::is_closed ( const ControlFlowGraph cfg)

Definition at line 566 of file cfg-structure.cpp.

◆ is_eqcmp()

static bool jlm::llvm::is_eqcmp ( const rvsdg::Operation op)
static

Definition at line 50 of file unroll.cpp.

◆ is_identity_mapping()

static bool jlm::llvm::is_identity_mapping ( const rvsdg::MatchOperation op)
static

Definition at line 285 of file IpGraphToLlvmConverter.cpp.

◆ is_idv()

static bool jlm::llvm::is_idv ( jlm::rvsdg::Input input)
static

Definition at line 95 of file unroll.cpp.

◆ is_inverse_reducible()

static bool jlm::llvm::is_inverse_reducible ( const SExtOperation op,
const rvsdg::Output operand 
)
static

Definition at line 29 of file sext.cpp.

◆ is_linear() [1/2]

bool jlm::llvm::is_linear ( const ControlFlowGraph cfg)

Definition at line 580 of file cfg-structure.cpp.

◆ is_linear() [2/2]

static bool jlm::llvm::is_linear ( const ControlFlowGraphNode node)
staticnoexcept

Definition at line 215 of file aggregation.cpp.

◆ is_linear_reduction()

static bool jlm::llvm::is_linear_reduction ( const jlm::llvm::ControlFlowGraphNode node)
inlinestaticnoexcept

Definition at line 182 of file cfg-structure.cpp.

◆ is_load_alloca_reducible()

static bool jlm::llvm::is_load_alloca_reducible ( const std::vector< rvsdg::Output * > &  operands)
static

Definition at line 53 of file Load.cpp.

◆ is_load_store_state_reducible()

static bool jlm::llvm::is_load_store_state_reducible ( const LoadNonVolatileOperation op,
const std::vector< rvsdg::Output * > &  operands 
)
static

Definition at line 100 of file Load.cpp.

◆ is_loop()

static bool jlm::llvm::is_loop ( const jlm::llvm::ControlFlowGraphNode node)
inlinestaticnoexcept

Definition at line 176 of file cfg-structure.cpp.

◆ is_multiple_origin_reducible() [1/2]

static bool jlm::llvm::is_multiple_origin_reducible ( const std::vector< jlm::rvsdg::Output * > &  operands)
static

Definition at line 108 of file Store.cpp.

◆ is_multiple_origin_reducible() [2/2]

static bool jlm::llvm::is_multiple_origin_reducible ( const std::vector< rvsdg::Output * > &  operands)
static

Definition at line 133 of file Load.cpp.

◆ is_proper_branch()

static bool jlm::llvm::is_proper_branch ( const jlm::llvm::ControlFlowGraphNode split)
inlinestaticnoexcept

Definition at line 239 of file cfg-structure.cpp.

◆ is_proper_structured()

bool jlm::llvm::is_proper_structured ( const ControlFlowGraph cfg)

Definition at line 623 of file cfg-structure.cpp.

◆ is_reducible()

bool jlm::llvm::is_reducible ( const ControlFlowGraph cfg)

Definition at line 629 of file cfg-structure.cpp.

◆ is_reducible_state()

static bool jlm::llvm::is_reducible_state ( const rvsdg::Output state,
const rvsdg::Node loadalloca 
)
static

Definition at line 73 of file Load.cpp.

◆ is_sese_basic_block()

static bool jlm::llvm::is_sese_basic_block ( const ControlFlowGraphNode node)
staticnoexcept

Definition at line 174 of file aggregation.cpp.

◆ is_store_alloca_reducible()

static bool jlm::llvm::is_store_alloca_reducible ( const std::vector< jlm::rvsdg::Output * > &  operands)
static

Definition at line 88 of file Store.cpp.

◆ is_store_mux_reducible()

static bool jlm::llvm::is_store_mux_reducible ( const std::vector< jlm::rvsdg::Output * > &  operands)
static

Definition at line 40 of file Store.cpp.

◆ is_store_store_reducible()

static bool jlm::llvm::is_store_store_reducible ( const StoreNonVolatileOperation op,
const std::vector< jlm::rvsdg::Output * > &  operands 
)
static

Definition at line 58 of file Store.cpp.

◆ is_structured()

bool jlm::llvm::is_structured ( const ControlFlowGraph cfg)

Definition at line 617 of file cfg-structure.cpp.

◆ is_T1()

static bool jlm::llvm::is_T1 ( const jlm::llvm::ControlFlowGraphNode node)
inlinestaticnoexcept

Definition at line 262 of file cfg-structure.cpp.

◆ is_T2()

static bool jlm::llvm::is_T2 ( const jlm::llvm::ControlFlowGraphNode node)
inlinestaticnoexcept

Definition at line 274 of file cfg-structure.cpp.

◆ is_theta_invariant()

static bool jlm::llvm::is_theta_invariant ( const jlm::rvsdg::Output output)
static

Definition at line 59 of file unroll.cpp.

◆ is_used_in_nsubregions()

static size_t jlm::llvm::is_used_in_nsubregions ( const rvsdg::GammaNode gamma,
const rvsdg::Node node 
)
static

Definition at line 274 of file pull.cpp.

◆ is_valid()

bool jlm::llvm::is_valid ( const ControlFlowGraph cfg)

Definition at line 547 of file cfg-structure.cpp.

◆ is_valid_basic_block()

static bool jlm::llvm::is_valid_basic_block ( const BasicBlock bb)
static

Definition at line 517 of file cfg-structure.cpp.

◆ IsAggregateType()

bool jlm::llvm::IsAggregateType ( const jlm::rvsdg::Type type)
inline

Given a type, determines if it is one of LLVM's aggregate types. Vectors are not considered to be aggregate types, despite being based on a subtype.

Parameters
typethe type to check
Returns
true if the type is an aggregate type, false otherwise

Definition at line 520 of file types.hpp.

◆ isDiscardableIfUnused()

bool jlm::llvm::isDiscardableIfUnused ( const Linkage  linkage)
inline

Determines if a function / global variable with the given linkage can be removed, if it is not used within the current module.

Parameters
linkagethe linkage type
Returns
true if the global value can be discarded.
Note
Based on LLVM's "::llvm::GlobalValue::isDiscardableIfUnused"

Definition at line 44 of file Linkage.hpp.

◆ IsFMulAddIntrinsic()

static bool jlm::llvm::IsFMulAddIntrinsic ( const ::llvm::Instruction &  instruction)
static

Definition at line 837 of file LlvmInstructionConversion.cpp.

◆ isNonZeroConstant()

bool jlm::llvm::isNonZeroConstant ( const SCEVConstant c)

Definition at line 529 of file ScalarEvolution.cpp.

◆ IsOrContains()

template<class ELEMENTYPE >
bool jlm::llvm::IsOrContains ( const jlm::rvsdg::Type type)
inline

Definition at line 490 of file types.hpp.

◆ isPrivateOrInternal()

bool jlm::llvm::isPrivateOrInternal ( const Linkage  linkage)
inline

Checks if the given linkage is private or internal.

Parameters
linkagethe linkage
Returns
true if the linkage type is private or internal

Definition at line 65 of file Linkage.hpp.

◆ isSingleSuccessor()

static bool jlm::llvm::isSingleSuccessor ( const rvsdg::Node node,
const rvsdg::Node singleSuccessor 
)
static

Determines whether singleSuccessor is the only successor of node. The method returns false iff:

  1. Another node than singleSuccessor is connected to node.
  2. A region result is connected to node.
Parameters
nodeThe node for which to check the successors
singleSuccessorThe single successor for which to check for
Returns
True, if singleSuccessor is the only successor of node, otherwise false.

Definition at line 70 of file pull.cpp.

◆ IsVolatile()

static bool jlm::llvm::IsVolatile ( const ::llvm::Value &  value)
static

In LLVM, the memcpy intrinsic is modeled as a call instruction. It expects four arguments, with the fourth argument being a ConstantInt of bit width 1 to encode the volatile flag for the memcpy instruction. This function takes this argument and converts it to a boolean flag.

Parameters
valueThe volatile argument of the memcpy intrinsic.
Returns
Boolean flag indicating whether the memcpy is volatile.

Definition at line 793 of file LlvmInstructionConversion.cpp.

◆ linkageFromString()

Linkage jlm::llvm::linkageFromString ( const std::string_view  stringValue)

Definition at line 42 of file Linkage.cpp.

◆ linkageToString()

std::string_view jlm::llvm::linkageToString ( const Linkage  linkage)

Definition at line 17 of file Linkage.cpp.

◆ markGamma()

static void jlm::llvm::markGamma ( const rvsdg::GammaNode gamma,
CommonNodeElimination::Context context 
)
static

Marks the arguments of the gamma subregions, and the nodes within the subregions. Uses the origins of the branch results of exit variables to assign congruence sets to each exit variable's output.

Parameters
gammathe gamma node to mark
contextthe current context of the marking phase.

Definition at line 724 of file CommonNodeElimination.cpp.

◆ markGraphImports()

static void jlm::llvm::markGraphImports ( const rvsdg::Region region,
CommonNodeElimination::Context context 
)
static

Makes all arguments as the leader of their own congruence set.

Parameters
regionthe region whose arguments should be marked.
contextthe current context of the marking phase.

Definition at line 547 of file CommonNodeElimination.cpp.

◆ markNodeAsLeader()

void jlm::llvm::markNodeAsLeader ( const rvsdg::Node leader,
CommonNodeElimination::Context context 
)

Makes each output of the given node be the leader of its own congruence set.

Parameters
leaderthe node whose outputs should all be leaders.
contextthe current context of the mark phase.

Definition at line 334 of file CommonNodeElimination.cpp.

◆ markNodesAsCongruent()

void jlm::llvm::markNodesAsCongruent ( const rvsdg::Node leader,
const rvsdg::Node follower,
CommonNodeElimination::Context context 
)

Marks every output of the follower node as a follower of the leader node's respective output. The two nodes must have the same number of outputs, and be from the same region. The leader must come before the follower in the TopDown traverser. The leader must already have congruence sets associated with its outputs.

Parameters
leaderthe node whose outputs' congruence sets are used,
followerthe node whose outputs will follow the other congruence sets,
contextthe current context of the mark phase.

Definition at line 353 of file CommonNodeElimination.cpp.

◆ markRegion()

static void jlm::llvm::markRegion ( const rvsdg::Region region,
CommonNodeElimination::Context context 
)
static

Traverses every node in the region and places their outputs in congruence sets. Also recurses into the subregions of structural nodes. Expects the arguments of region to already belong to congruence sets.

Parameters
regionthe region to perform marking in.
contextthe current context of the marking phase.

Definition at line 865 of file CommonNodeElimination.cpp.

◆ markSimpleNode()

static void jlm::llvm::markSimpleNode ( const rvsdg::SimpleNode node,
CommonNodeElimination::Context context 
)
static

Places the given node in a congruence set, based on its operation and inputs. If the node already has a congruence set, it gets double-checked against the leader. The node must not be a top node.

See also
markSimpleTopNode.
Parameters
nodethe node to find a congruence set for.
contextthe current context of the marking phase

Definition at line 465 of file CommonNodeElimination.cpp.

◆ markSimpleTopNode()

static void jlm::llvm::markSimpleTopNode ( const rvsdg::SimpleNode node,
TopNodeLeaderList leaders,
CommonNodeElimination::Context context 
)
static

Function for marking the given top node node, marking it congruent with a previously marked top node if their operations are identical. Otherwise it becomes a leader. Maintains a separate list of leader top nodes in the region.

Parameters
nodethe top node to mark.
leadersthe list of all leader top nodes in the region.
contextthe current context of the marking phase.

Definition at line 414 of file CommonNodeElimination.cpp.

◆ markStructuralNode()

static void jlm::llvm::markStructuralNode ( const rvsdg::StructuralNode node,
CommonNodeElimination::Context context 
)
static

Definition at line 818 of file CommonNodeElimination.cpp.

◆ markSubregionsFromInputs()

static bool jlm::llvm::markSubregionsFromInputs ( const rvsdg::StructuralNode node,
CommonNodeElimination::Context context 
)
static

Marks all arguments in all subregions of the given structural node.

Arguments that correspond to structural inputs can only be congruent if the structural inputs have congruent origins.

This function can be called several times on the same node, and will progressively partition the argument congruence sets. It will never combine arguments from distinct congruence sets back together.

Whenever this method causes changes in the congruence sets of a subregion's arguments, it also marks the subregion.

Parameters
nodethe structural node
contextthe current context of the marking phase
Returns
true if this operation changed any congruence sets

Definition at line 637 of file CommonNodeElimination.cpp.

◆ markTheta()

static void jlm::llvm::markTheta ( const rvsdg::ThetaNode theta,
CommonNodeElimination::Context context 
)
static

Marks the loop variables and subregion of the given theta node. The loop variables are initially partitioned based on the origins of their inputs. After marking the subregion, the partitioning of the loop variable post results are used to further partition loop variables. The subregion is re-marked until the loop variable partitioning reaches a fixed point. The outputs of the theta node are partitioned based on the loop variables, except for loop invariants, which are made congruent with their origin.

Parameters
thetathe theta node to mark.
contextthe current context of the mark phase.

Definition at line 761 of file CommonNodeElimination.cpp.

◆ ntacs() [1/3]

size_t jlm::llvm::ntacs ( const AggregationNode root)

Definition at line 500 of file aggregation.cpp.

◆ ntacs() [2/3]

size_t jlm::llvm::ntacs ( const ControlFlowGraph cfg)

Definition at line 258 of file cfg.cpp.

◆ ntacs() [3/3]

static size_t jlm::llvm::ntacs ( const InterProceduralGraphModule im)
inlinestatic

Definition at line 181 of file ipgraph-module.hpp.

◆ partitionArguments()

static bool jlm::llvm::partitionArguments ( const rvsdg::Region region,
const std::vector< CommonNodeElimination::Context::CongruenceSetIndex > &  partitions,
CommonNodeElimination::Context context 
)
static

Uses the provided list of partition indices to partition the arguments of the given region. Each argument has a corresponding value in the partitions list. The exact partition value is not important, but only arguments with identical partition value are allowed to remain in the same congruence set. If a pair of arguments are already in different congruence sets, they will remain separate.

Parameters
regionthe region whose arguments should be partitioned.
partitionsintegers used to partition arguments. Must have length equal to the number of arguments in region.
contextthe current context of the marking phase.
Returns
true if any congruence sets were created from this operation.

Definition at line 571 of file CommonNodeElimination.cpp.

◆ PatchPhiOperands()

static void jlm::llvm::PatchPhiOperands ( const std::vector<::llvm::PHINode * > &  phis,
Context ctx 
)
static

During conversion of LLVM instructions, phi instructions were created without operands. Once all instructions have been converted, this function goes over all phi instructions and assigns proper operands.

Definition at line 58 of file LlvmModuleConversion.cpp.

◆ perform_bitbinary_reduction()

static rvsdg::Output* jlm::llvm::perform_bitbinary_reduction ( const SExtOperation op,
rvsdg::Output operand 
)
static

Definition at line 54 of file sext.cpp.

◆ perform_bitunary_reduction()

static rvsdg::Output* jlm::llvm::perform_bitunary_reduction ( const SExtOperation op,
rvsdg::Output operand 
)
static

Definition at line 40 of file sext.cpp.

◆ perform_inverse_reduction()

static rvsdg::Output* jlm::llvm::perform_inverse_reduction ( const SExtOperation op,
rvsdg::Output operand 
)
static

Definition at line 71 of file sext.cpp.

◆ perform_load_alloca_reduction()

static std::vector<rvsdg::Output *> jlm::llvm::perform_load_alloca_reduction ( const LoadNonVolatileOperation op,
const std::vector< rvsdg::Output * > &  operands 
)
static

Definition at line 140 of file Load.cpp.

◆ perform_load_store_state_reduction()

static std::vector<rvsdg::Output *> jlm::llvm::perform_load_store_state_reduction ( const LoadNonVolatileOperation op,
const std::vector< rvsdg::Output * > &  operands 
)
static

Definition at line 170 of file Load.cpp.

◆ perform_multiple_origin_reduction() [1/2]

static std::vector<rvsdg::Output *> jlm::llvm::perform_multiple_origin_reduction ( const LoadNonVolatileOperation op,
const std::vector< rvsdg::Output * > &  operands 
)
static

Definition at line 205 of file Load.cpp.

◆ perform_multiple_origin_reduction() [2/2]

static std::vector<jlm::rvsdg::Output *> jlm::llvm::perform_multiple_origin_reduction ( const StoreNonVolatileOperation operation,
const std::vector< jlm::rvsdg::Output * > &  operands 
)
static

Definition at line 163 of file Store.cpp.

◆ perform_store_alloca_reduction()

static std::vector<jlm::rvsdg::Output *> jlm::llvm::perform_store_alloca_reduction ( const StoreNonVolatileOperation op,
const std::vector< jlm::rvsdg::Output * > &  operands 
)
static

Definition at line 144 of file Store.cpp.

◆ perform_store_mux_reduction()

static std::vector<jlm::rvsdg::Output *> jlm::llvm::perform_store_mux_reduction ( const StoreNonVolatileOperation op,
const std::vector< jlm::rvsdg::Output * > &  operands 
)
static

Definition at line 115 of file Store.cpp.

◆ perform_store_store_reduction()

static std::vector<jlm::rvsdg::Output *> jlm::llvm::perform_store_store_reduction ( const StoreNonVolatileOperation op,
const std::vector< jlm::rvsdg::Output * > &  operands 
)
static

Definition at line 131 of file Store.cpp.

◆ postorder()

std::vector< ControlFlowGraphNode * > jlm::llvm::postorder ( const ControlFlowGraph cfg)

Definition at line 194 of file cfg.cpp.

◆ print() [1/3]

void jlm::llvm::print ( const AggregationNode n,
const AnnotationMap dm,
FILE *  out 
)

Definition at line 255 of file print.cpp.

◆ print() [2/3]

static void jlm::llvm::print ( const AggregationNode n,
FILE *  out 
)
inlinestatic

Definition at line 86 of file print.hpp.

◆ print() [3/3]

static void jlm::llvm::print ( const InterProceduralGraphModule im,
FILE *  out 
)
inlinestatic

Definition at line 65 of file print.hpp.

◆ print_ascii()

static void jlm::llvm::print_ascii ( const InterProceduralGraph ipg,
FILE *  out 
)
inlinestatic

Definition at line 43 of file print.hpp.

◆ print_dot() [1/2]

static void jlm::llvm::print_dot ( const ControlFlowGraph cfg,
FILE *  out 
)
inlinestatic

Definition at line 28 of file print.hpp.

◆ print_dot() [2/2]

static void jlm::llvm::print_dot ( const InterProceduralGraph ipg,
FILE *  out 
)
inlinestatic

Definition at line 50 of file print.hpp.

◆ prune()

void jlm::llvm::prune ( ControlFlowGraph cfg)

Removes unreachable nodes from the control flow graph.

Parameters
cfgthe control flow graph of a function

Definition at line 816 of file cfg-structure.cpp.

◆ pull() [1/3]

void jlm::llvm::pull ( rvsdg::GammaNode gamma)

Definition at line 325 of file pull.cpp.

◆ pull() [2/3]

void jlm::llvm::pull ( rvsdg::Region region)

Definition at line 368 of file pull.cpp.

◆ pull() [3/3]

static void jlm::llvm::pull ( rvsdg::RvsdgModule module,
util::StatisticsCollector statisticsCollector 
)
static

Definition at line 384 of file pull.cpp.

◆ pullin_node()

static void jlm::llvm::pullin_node ( rvsdg::GammaNode gamma,
rvsdg::Node node 
)
static

Definition at line 86 of file pull.cpp.

◆ pullin_top()

void jlm::llvm::pullin_top ( rvsdg::GammaNode gamma)

Definition at line 134 of file pull.cpp.

◆ purge()

void jlm::llvm::purge ( ControlFlowGraph cfg)

Remove all basic blocks without instructions.

Definition at line 664 of file cfg-structure.cpp.

◆ push_from_theta()

static rvsdg::Output* jlm::llvm::push_from_theta ( jlm::rvsdg::Output output)
static

Definition at line 76 of file unroll.cpp.

◆ reduce()

static bool jlm::llvm::reduce ( const ControlFlowGraph cfg,
const std::function< bool(llvm::ControlFlowGraphNode *, std::unordered_set< llvm::ControlFlowGraphNode * > &)> &  f 
)
inlinestatic

Definition at line 594 of file cfg-structure.cpp.

◆ reduce_branch() [1/2]

static ControlFlowGraphNode* jlm::llvm::reduce_branch ( ControlFlowGraphNode split,
ControlFlowGraphNode **  entry,
AggregationMap map 
)
static

Reduces a branch subgraph to a single node and creates an aggregation subtree for the subgraph. A branch subgraph of the following form:

dot_inline_dotgraph_4.png

is reduced to the following aggregation subtree:

dot_inline_dotgraph_5.png

Only the split node and the individual branch nodes are reduced. The join node is not reduced.

Definition at line 278 of file aggregation.cpp.

◆ reduce_branch() [2/2]

static void jlm::llvm::reduce_branch ( jlm::llvm::ControlFlowGraphNode split,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 336 of file cfg-structure.cpp.

◆ reduce_linear() [1/2]

static ControlFlowGraphNode* jlm::llvm::reduce_linear ( ControlFlowGraphNode source,
ControlFlowGraphNode **  entry,
ControlFlowGraphNode **  exit,
AggregationMap map 
)
static

Reduce a linear subgraph to a single node and create an aggregation subtree for the subgraph. A linear subgraph of the following form:

dot_inline_dotgraph_6.png

is reduced to the following aggregation subtree:

dot_inline_dotgraph_7.png

Definition at line 338 of file aggregation.cpp.

◆ reduce_linear() [2/2]

static void jlm::llvm::reduce_linear ( jlm::llvm::ControlFlowGraphNode entry,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 316 of file cfg-structure.cpp.

◆ reduce_loop() [1/2]

static void jlm::llvm::reduce_loop ( const StronglyConnectedComponentStructure sccstruct,
AggregationMap map 
)
static

Reduces a tail-controlled loop subgraph to a single node and creates an aggregation subtree for the subgraph.

Definition at line 235 of file aggregation.cpp.

◆ reduce_loop() [2/2]

static void jlm::llvm::reduce_loop ( jlm::llvm::ControlFlowGraphNode node,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 290 of file cfg-structure.cpp.

◆ reduce_proper_branch()

static void jlm::llvm::reduce_proper_branch ( jlm::llvm::ControlFlowGraphNode split,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 362 of file cfg-structure.cpp.

◆ reduce_proper_structured()

static bool jlm::llvm::reduce_proper_structured ( jlm::llvm::ControlFlowGraphNode node,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 409 of file cfg-structure.cpp.

◆ reduce_reducible()

static bool jlm::llvm::reduce_reducible ( jlm::llvm::ControlFlowGraphNode node,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 461 of file cfg-structure.cpp.

◆ reduce_structured()

static bool jlm::llvm::reduce_structured ( jlm::llvm::ControlFlowGraphNode node,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 435 of file cfg-structure.cpp.

◆ reduce_T1()

static void jlm::llvm::reduce_T1 ( jlm::llvm::ControlFlowGraphNode node)
inlinestatic

Definition at line 381 of file cfg-structure.cpp.

◆ reduce_T2()

static void jlm::llvm::reduce_T2 ( jlm::llvm::ControlFlowGraphNode node,
std::unordered_set< jlm::llvm::ControlFlowGraphNode * > &  to_visit 
)
inlinestatic

Definition at line 396 of file cfg-structure.cpp.

◆ ReinsertLoop()

static void jlm::llvm::ReinsertLoop ( const TailControlledLoop loop)
static

Definition at line 55 of file ControlFlowRestructuring.cpp.

◆ remove_deadnodes()

static void jlm::llvm::remove_deadnodes ( const std::unordered_set< ControlFlowGraphNode * > &  deadnodes)
static

Definition at line 805 of file cfg-structure.cpp.

◆ requiresExport()

static bool jlm::llvm::requiresExport ( const InterProceduralGraphNode ipgNode)
static

Definition at line 459 of file InterProceduralGraphConversion.cpp.

◆ RestructureBranches() [1/2]

void jlm::llvm::RestructureBranches ( ControlFlowGraph cfg)

Definition at line 499 of file ControlFlowRestructuring.cpp.

◆ RestructureBranches() [2/2]

static void jlm::llvm::RestructureBranches ( ControlFlowGraphNode entry,
ControlFlowGraphNode exit 
)
static

Definition at line 403 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlow() [1/2]

void jlm::llvm::RestructureControlFlow ( ControlFlowGraph cfg)

Definition at line 517 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlow() [2/2]

static void jlm::llvm::RestructureControlFlow ( ControlFlowGraphNode entry,
ControlFlowGraphNode exit,
std::vector< TailControlledLoop > &  tailControlledLoops 
)
static

Definition at line 507 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlowGraph()

static void jlm::llvm::RestructureControlFlowGraph ( ControlFlowGraph controlFlowGraph,
const std::string &  functionName,
InterProceduralGraphToRvsdgStatisticsCollector statisticsCollector 
)
static

Definition at line 856 of file InterProceduralGraphConversion.cpp.

◆ RestructureLoopEntry()

static void jlm::llvm::RestructureLoopEntry ( const StronglyConnectedComponentStructure sccStructure,
BasicBlock newEntryNode,
const ThreeAddressCodeVariable entryVariable 
)
static

Definition at line 130 of file ControlFlowRestructuring.cpp.

◆ RestructureLoopExit()

static void jlm::llvm::RestructureLoopExit ( const StronglyConnectedComponentStructure sccStructure,
BasicBlock newRepetitionNode,
BasicBlock newExitNode,
ControlFlowGraphNode regionExit,
const ThreeAddressCodeVariable repetitionVariable,
const ThreeAddressCodeVariable exitVariable 
)
static

Definition at line 156 of file ControlFlowRestructuring.cpp.

◆ RestructureLoopRepetition()

static void jlm::llvm::RestructureLoopRepetition ( const StronglyConnectedComponentStructure sccStructure,
ControlFlowGraphNode newRepetitionNode,
const ThreeAddressCodeVariable entryVariable,
const ThreeAddressCodeVariable repetitionVariable 
)
static

Definition at line 203 of file ControlFlowRestructuring.cpp.

◆ RestructureLoops() [1/2]

void jlm::llvm::RestructureLoops ( ControlFlowGraph cfg)

Definition at line 487 of file ControlFlowRestructuring.cpp.

◆ RestructureLoops() [2/2]

static void jlm::llvm::RestructureLoops ( ControlFlowGraphNode regionEntry,
ControlFlowGraphNode regionExit,
std::vector< TailControlledLoop > &  loops 
)
static

Definition at line 244 of file ControlFlowRestructuring.cpp.

◆ reverse_postorder()

std::vector< ControlFlowGraphNode * > jlm::llvm::reverse_postorder ( const ControlFlowGraph cfg)

Definition at line 225 of file cfg.cpp.

◆ routeContextVariablesToRegion()

static std::vector<rvsdg::Output *> jlm::llvm::routeContextVariablesToRegion ( rvsdg::Region region,
const rvsdg::LambdaNode callee 
)
static

A function body has access to the function's context variables, so inlining requires these context variables to be routed into the call's region.

Parameters
regionthe region to make the context variables available in
calleethe function being called
Returns
an output inside the given region, for each context variable in callee

Definition at line 101 of file inlining.cpp.

◆ straighten()

void jlm::llvm::straighten ( ControlFlowGraph cfg)

Finds all pairs of basic blocks A, B where the edge A -> B is A's only out-edge, and B's only in-edge.

B may not have any Phi operations.

For each such pair, A and B are merged into a single basic block.

Parameters
cfgthe control flow graph for a function

Definition at line 635 of file cfg-structure.cpp.

◆ strongconnect()

static void jlm::llvm::strongconnect ( ControlFlowGraphNode node,
ControlFlowGraphNode exit,
std::unordered_map< ControlFlowGraphNode *, std::pair< size_t, size_t >> &  map,
std::vector< ControlFlowGraphNode * > &  node_stack,
size_t &  index,
std::vector< StronglyConnectedComponent > &  sccs 
)
static

Tarjan's SCC algorithm

Definition at line 79 of file cfg-structure.cpp.

◆ to_dot() [1/2]

std::string jlm::llvm::to_dot ( const ControlFlowGraph cfg)

Definition at line 171 of file print.cpp.

◆ to_dot() [2/2]

std::string jlm::llvm::to_dot ( const InterProceduralGraph clg)

Definition at line 215 of file print.cpp.

◆ to_str() [1/4]

static std::string jlm::llvm::to_str ( const AggregationNode n)
inlinestatic

Definition at line 77 of file print.hpp.

◆ to_str() [2/4]

std::string jlm::llvm::to_str ( const AggregationNode n,
const AnnotationMap dm 
)

Definition at line 234 of file print.cpp.

◆ to_str() [3/4]

std::string jlm::llvm::to_str ( const InterProceduralGraph clg)

Definition at line 80 of file print.cpp.

◆ to_str() [4/4]

static std::string jlm::llvm::to_str ( const InterProceduralGraphModule im)
inlinestatic

Definition at line 59 of file print.hpp.

◆ ToString()

static std::string jlm::llvm::ToString ( const std::vector< MemoryNodeId > &  memoryNodeIds)
static

Definition at line 296 of file MemoryStateOperations.cpp.

◆ traceOutput() [1/2]

const rvsdg::Output& jlm::llvm::traceOutput ( const rvsdg::Output output)
inline

Definition at line 39 of file Trace.hpp.

◆ traceOutput() [2/2]

rvsdg::Output & jlm::llvm::traceOutput ( rvsdg::Output output)

Traces the origin of the given output to find the origin of the value. Traces through everything handled by jlm::rvsdg::traceOutput, with the addition of LLVM-specific operations.

Parameters
outputthe output to start tracing from
Returns
the maximally traced output

Definition at line 39 of file Trace.cpp.

◆ tryGetConstantSignedInteger()

std::optional< int64_t > jlm::llvm::tryGetConstantSignedInteger ( const rvsdg::Output output)

Attempts to find the constant integer value of a given output, by normalizing it back to its source operation. If it is a constant integer operation, the constant is returned as a signed 64-bit integer.

Parameters
outputan output that may be a constant integer.
Returns
the constant integer value if found, otherwise nullopt.

Definition at line 46 of file Trace.cpp.

◆ tryGetGammaExitVarCongruenceSet()

static std::optional<CommonNodeElimination::Context::CongruenceSetIndex> jlm::llvm::tryGetGammaExitVarCongruenceSet ( rvsdg::GammaNode::ExitVar exitVar,
CommonNodeElimination::Context context 
)
static

Checks if the given gamma exitVar is always a copy of some other origin in the region the gamma is in. This happens if each branch result of the exit var is a copy of an entry variable, and all copied entry variables take their value from congruent origins outside the gamma. If this is the case, the congruence set of that origin is returned.

Parameters
exitVarthe exit variable in question
contextthe current context of the marking phase.
Returns
the congruence set index of the shared origin, or nullopt if no shared origin exists.

Definition at line 685 of file CommonNodeElimination.cpp.

◆ tryGetLeaderNode()

const rvsdg::Node* jlm::llvm::tryGetLeaderNode ( const rvsdg::Node node,
CommonNodeElimination::Context context 
)

Checks if the given node has been visited already during the mark phase. If so, it returns the leader it is congruent with. All outputs of node are congruent with the respective output of the leader.

Parameters
nodethe node in question.
contextthe current context of the mark phase.
Returns
the leader of this node's congruence sets, or nullptr if this node has not been marked.

Definition at line 379 of file CommonNodeElimination.cpp.

◆ tryGetMemoryStateEntrySplit()

rvsdg::SimpleNode * jlm::llvm::tryGetMemoryStateEntrySplit ( const rvsdg::LambdaNode lambdaNode)
noexcept

Determines the memory state split node at entry.

Parameters
lambdaNodeThe lambda node to query the memory state entry split node for.
Returns
The LambdaEntryMemoryStateSplitOperation node connected to the memory state input if present, otherwise nullptr.
Precondition
The lambdaNode must conform to the modelling assumptions behind llvm function representation as lambdas and memory state encoding.
See also
GetMemoryStateExitMerge()

Definition at line 40 of file LambdaMemoryState.cpp.

◆ tryGetMemoryStateExitMerge()

rvsdg::SimpleNode * jlm::llvm::tryGetMemoryStateExitMerge ( const rvsdg::LambdaNode lambdaNode)
noexcept

Determines the memory state merge node at exit.

Parameters
lambdaNodeThe lambda node to query the memory state exit mux node for.
Returns
The LambdaEntryMemoryStateMergeOperation node connected to the memory state input if present, otherwise nullptr.
Precondition
The lambdaNode must conform to the modelling assumptions behind llvm function representation as lambdas and memory state encoding.
See also
GetMemoryStateEntrySplit()

Definition at line 31 of file LambdaMemoryState.cpp.

◆ tryRerouteMemoryStateMergeAndSplit()

static void jlm::llvm::tryRerouteMemoryStateMergeAndSplit ( rvsdg::SimpleNode callEntryMerge,
rvsdg::SimpleNode callExitSplit 
)
static

After the body of a function has been copied to the region of a call node, and inputs and outputs of the call have been routed to the copied body, we may have a graph that looks like:

  |       |       |
  V       V       V
 [4]     [7]     [9]

CallEntryMemoryStateMerge | V LambdaEntryMemoryStateSplit [4] [9] | | V V

[ rest of function ] [ body goes here ]

| | V V [4] [9] LambdaExitMemoryStateMerge | V CallExitMemoryStateSplit [4] [7] [9] | | | V V V

In these cases, we want to remove all the merge and split nodes, and route the relevant memory states into the function body directly. Memory state IDs that are unused within the function, such as [9] in the example above, are instead routed around from the call merge. Memory states IDs that only exist inside the function body are given undef nodes.

Parameters
callEntryMergethe call entry merge node in the diagram above
callExitSplitthe call exit split node in the diagram above

Definition at line 156 of file inlining.cpp.

◆ unroll() [1/2]

static bool jlm::llvm::unroll ( rvsdg::Region region,
size_t  factor 
)
static

Definition at line 498 of file unroll.cpp.

◆ unroll() [2/2]

void jlm::llvm::unroll ( rvsdg::ThetaNode node,
size_t  factor 
)

Try to unroll the given theta.

Parameters
nodeThe theta to attempt the unrolling on.
factorThe number of times to unroll the loop, e.g., if the factor is two then the loop body is duplicated in the unrolled loop.

Definition at line 482 of file unroll.cpp.

◆ unroll_body()

static void jlm::llvm::unroll_body ( const rvsdg::ThetaNode theta,
rvsdg::Region target,
rvsdg::SubstitutionMap smap,
size_t  factor 
)
static

Definition at line 179 of file unroll.cpp.

◆ unroll_known_theta()

static void jlm::llvm::unroll_known_theta ( const LoopUnrollInfo ui,
size_t  factor 
)
static

Definition at line 304 of file unroll.cpp.

◆ unroll_theta()

static void jlm::llvm::unroll_theta ( const LoopUnrollInfo ui,
rvsdg::SubstitutionMap smap,
size_t  factor 
)
static

Definition at line 218 of file unroll.cpp.

◆ unroll_unknown_theta()

static void jlm::llvm::unroll_unknown_theta ( const LoopUnrollInfo ui,
size_t  factor 
)
static

Definition at line 402 of file unroll.cpp.

◆ update_phi_operands() [1/2]

static void jlm::llvm::update_phi_operands ( const std::unordered_set< BasicBlock * > &  sinks,
const std::unordered_set< ControlFlowGraphNode * > &  deadnodes 
)
static

Definition at line 788 of file cfg-structure.cpp.

◆ update_phi_operands() [2/2]

static void jlm::llvm::update_phi_operands ( llvm::ThreeAddressCode phitac,
const std::unordered_set< ControlFlowGraphNode * > &  deadnodes 
)
static

Definition at line 767 of file cfg-structure.cpp.

Variable Documentation

◆ sext_reduction_bitbinary

const rvsdg::unop_reduction_path_t jlm::llvm::sext_reduction_bitbinary = 129
static

Definition at line 14 of file sext.cpp.

◆ sext_reduction_bitunary

const rvsdg::unop_reduction_path_t jlm::llvm::sext_reduction_bitunary = 128
static

Definition at line 13 of file sext.cpp.