Jlm
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
jlm::llvm Namespace Reference

Global memory state passed between functions. More...

Namespaces

namespace  aa
 

Classes

class  AbsOperation
 
class  AggregateAllocaSplitting
 Aggregate Alloca Splitting Transformation. More...
 
class  AggregationMap
 
class  AggregationNode
 
class  AggregationStatistics
 
class  AggregationTreeToLambdaStatistics
 
struct  AliasQueryResponseCounter
 
class  AllMemoryNodesTest
 RVSDG module with one of each memory node type. More...
 
class  AllocaOperation
 
class  AnnotationMap
 
class  AnnotationSet
 
class  AnnotationStatistics
 
class  Argument
 Function argument. More...
 
class  ArrayType
 
class  AssignmentOperation
 
class  Attribute
 Attribute. More...
 
class  AttributeList
 
class  AttributeSet
 Attribute set. More...
 
class  BasicBlock
 
class  BasicBlockAggregationNode
 
class  BasicBlockAnnotationSet
 
class  BitCastOperation
 
class  BitCastTest
 BitCastTest class. More...
 
class  Bits2PtrTest
 Bits2PtrTest class. More...
 
class  BranchAggregationNode
 
class  BranchAnnotationSet
 
class  BranchOperation
 
class  BSwapOperation
 
class  CallEntryMemoryStateMergeOperation
 
class  CallExitMemoryStateSplitOperation
 
class  CallOperation
 Call operation class. More...
 
class  CallSummary
 
class  CallTest1
 CallTest1 class. More...
 
class  CallTest2
 CallTest2 class. More...
 
class  CallTypeClassifier
 Call node classifier. More...
 
class  CeilOperation
 
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  ConstantAggregateZeroOperation
 
class  ConstantArrayOperation
 
class  ConstantDataArrayOperation
 
class  ConstantDataVectorOperation
 
class  ConstantFP
 
class  ConstantPointerNullOperation
 ConstantPointerNullOperation class. More...
 
class  ConstantPointerNullTest
 ConstantPointerNullTest class. More...
 
class  ConstantStructOperation
 
class  ConstantVectorOperation
 
class  Context
 
struct  Continuation
 
class  ControlFlowGraph
 
class  ControlFlowGraphEdge
 
class  ControlFlowGraphNode
 
class  ControlFlowRestructuringStatistics
 
class  ControlToIntOperation
 
class  CopysignOperation
 
class  CtlzOperation
 
class  CtpopOperation
 
class  CttzOperation
 
class  DataNode
 
class  DataNodeInit
 
class  DataNodeToDeltaStatistics
 
class  DeadNodeElimination
 Dead Node Elimination Optimization. More...
 
class  DeltaTest1
 DeltaTest1 class. More...
 
class  DeltaTest2
 DeltaTest2 class. More...
 
class  DeltaTest3
 DeltaTest3 class. More...
 
class  DominatorTreeNode
 
class  EntryAggregationNode
 
class  EntryAnnotationSet
 
class  EntryNode
 
class  EnumAttribute
 Enum attribute. More...
 
class  EscapedMemoryTest1
 EscapedMemoryTest1 class. More...
 
class  EscapedMemoryTest2
 EscapedMemoryTest2 class. More...
 
class  EscapedMemoryTest3
 EscapedMemoryTest3 class. More...
 
class  EscapingLocalFunctionTest
 RVSDG module with a static function escaping through another function. More...
 
class  ExitAggregationNode
 
class  ExitAnnotationSet
 
class  ExitNode
 
class  ExternalCallTest1
 
class  ExternalCallTest2
 
class  ExternalMemoryTest
 ExternalMemoryTest class. More...
 
class  ExtractElementOperation
 
class  ExtractValueOperation
 
class  FAbsOperation
 
class  FBinaryOperation
 
class  FCmpOperation
 
class  FixedVectorType
 
class  FloatingPointType
 
class  FloorOperation
 
class  FMulAddIntrinsicOperation
 
class  FNegOperation
 
class  FPExtOperation
 
class  FPToSIOperation
 
class  FPToUIOperation
 
class  FPTruncOperation
 
class  FreeNullTest
 RVSDG module with a call to free(NULL). More...
 
class  FreeOperation
 
class  FreezeOperation
 FreezeOperation class. More...
 
class  FShlOperation
 
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  FunctionNode
 
class  FunctionToPointerOperation
 Get address of compiled function object. More...
 
class  FunctionVariable
 
class  GammaGammaPredicateCorrelation
 
struct  GammaSubregionRoles
 
class  GammaTest
 GammaTest class. More...
 
class  GammaTest2
 GammaTest2 class. More...
 
class  GetElementPtrOperation
 
class  GetElementPtrTest
 GetElementPtrTest class. More...
 
class  GlobalValue
 
class  GlobalVariable
 
class  IfConversion
 If-Conversion Transformation. More...
 
class  IfConversionStatistics
 If-Conversion Transformation statistics. More...
 
class  ImportTest
 ImportTest class. More...
 
class  IndirectCallTest1
 IndirectCallTest1 class. More...
 
class  IndirectCallTest2
 IndirectCallTest2 class. More...
 
class  InsertElementOperation
 
class  InsertValueOperation
 
class  IntAttribute
 Integer attribute. More...
 
class  IntegerAddOperation
 
class  IntegerAndOperation
 
class  IntegerAShrOperation
 
class  IntegerBinaryOperation
 
class  IntegerConstantOperation
 
class  IntegerEqOperation
 
class  IntegerLShrOperation
 
class  IntegerMulOperation
 
class  IntegerNeOperation
 
class  IntegerOrOperation
 
class  IntegerSDivOperation
 
class  IntegerSgeOperation
 
class  IntegerSgtOperation
 
class  IntegerShlOperation
 
class  IntegerSleOperation
 
class  IntegerSltOperation
 
class  IntegerSRemOperation
 
class  IntegerSubOperation
 
class  IntegerUDivOperation
 
class  IntegerUgeOperation
 
class  IntegerUgtOperation
 
class  IntegerUleOperation
 
class  IntegerUltOperation
 
class  IntegerURemOperation
 
class  IntegerXorOperation
 
class  InterProceduralGraph
 
class  InterProceduralGraphModule
 
class  InterProceduralGraphNode
 
class  InterProceduralGraphToRvsdgStatistics
 
class  InterProceduralGraphToRvsdgStatisticsCollector
 
class  IntToPtrOperation
 
class  InvariantValueRedirection
 Invariant Value Redirection. More...
 
class  IOBarrierElimination
 
class  IOBarrierOperation
 
class  IOStateType
 Input/Output state type. More...
 
class  IpGraphToLlvmConverter
 
class  IsConstantOperation
 
class  IsFPClassOperation
 
class  LambdaCallArgumentMismatch
 RVSDG module containing a static function that is called with the wrong number of arguments. More...
 
class  LambdaEntryMemoryStateSplitOperation
 
class  LambdaExitMemoryStateMergeOperation
 
class  LinearAggregationNode
 
class  LinearAnnotationSet
 
class  LinkedListTest
 LinkedListTest class. More...
 
class  LlvmDeltaOperation
 Delta operation. More...
 
class  LlvmDotWriter
 
class  LlvmGraphImport
 
class  LlvmLambdaOperation
 Lambda operation. More...
 
class  LlvmRvsdgModule
 
class  LoadChainSeparation
 
class  LoadFromUndefTest
 LoadFromUndefTest class. More...
 
class  LoadNonVolatileOperation
 
class  LoadOperation
 
class  LoadTest1
 LoadTest1 class. More...
 
class  LoadTest2
 LoadTest2 class. More...
 
class  LoadTracingInfo
 
class  LoadVolatileOperation
 
class  LoopAggregationNode
 
class  LoopAnnotationSet
 
class  LoopStrengthReduction
 
class  LoopUnrollInfo
 
class  LoopUnrolling
 Optimization that attempts to unroll loops (thetas). More...
 
class  LoopUnswitching
 LoopUnswitching. More...
 
class  LoopUnswitchingDefaultHeuristic
 
class  LoopUnswitchingHeuristic
 
class  MallocOperation
 
class  MemCpyNonVolatileOperation
 
class  MemCpyOperation
 
class  MemcpyTest
 MemcpyTest class. More...
 
class  MemcpyTest2
 
class  MemcpyTest3
 
class  MemCpyVolatileOperation
 
class  MemMoveNonVolatileOperation
 
class  MemMoveOperation
 
class  MemoryHoistBarrierOperation
 
class  MemoryStateJoinOperation
 
class  MemoryStateMergeOperation
 
class  MemoryStateOperation
 
class  MemoryStateSplitOperation
 
class  MemoryStateType
 Memory state type class. More...
 
class  MemSetNonVolatileOperation
 
class  MemSetOperation
 
class  NAllocaNodesTest
 RVSDG module with an arbitrary amount of alloca nodes. More...
 
class  NodeHoisting
 Node Hoisting Transformation. More...
 
class  NodeReduction
 
class  NodeSinking
 Node Sinking Optimization. More...
 
class  OutputTracer
 
class  PhiTest1
 PhiTest1 class. More...
 
class  PhiTest2
 PhiTest2 class. More...
 
class  PhiWithDeltaTest
 
class  PointerToFunctionOperation
 Interpret pointer as callable function. More...
 
class  PointerType
 PointerType class. More...
 
class  PoisonValueOperation
 PoisonValueOperation class. More...
 
class  PredicateCorrelation
 
class  PtrCmpOperation
 
class  PtrMaskOperation
 
class  PtrToIntOperation
 
class  RegionalizedVariableMap
 
class  RIntOperation
 
class  RoundOperation
 
struct  RvsdgNodeLocation
 
class  RvsdgTest
 RvsdgTest class. More...
 
class  RvsdgToIpGraphConverter
 
class  RvsdgTreePrinter
 RVSDG tree printer debug pass. More...
 
class  SAddWithOverflowOperation
 
class  ScalableVectorType
 
class  ScalarEvolution
 
class  SCEV
 
class  SCEVAddExpr
 
class  SCEVBinaryExpr
 
class  SCEVChainRecurrence
 
class  SCEVConstant
 
class  SCEVInit
 
class  SCEVMulExpr
 
class  SCEVNAryAddExpr
 
class  SCEVNAryExpr
 
class  SCEVNAryMulExpr
 
class  SCEVPlaceholder
 
class  SCEVUnknown
 
class  SelectOperation
 
class  SExtOperation
 
class  ShuffleVectorOperation
 
class  SIToFPOperation
 
class  SMaxOperation
 
class  SMinOperation
 
class  SMulWithOverflowOperation
 
class  SsaPhiOperation
 
class  SSubWithOverflowOperation
 
class  StoreNonVolatileOperation
 
class  StoreOperation
 
class  StoreTest1
 StoreTest1 class. More...
 
class  StoreTest2
 StoreTest2 class. More...
 
class  StoreValueForwarding
 Store Value Forwarding Optimization. More...
 
class  StoreVolatileOperation
 
class  StringAttribute
 String attribute. More...
 
class  StronglyConnectedComponent
 Strongly Connected Component. More...
 
class  StronglyConnectedComponentStructure
 Strongly Connected Component Structure. More...
 
class  StructType
 StructType class. More...
 
struct  TailControlledLoop
 
class  ThetaGammaPredicateCorrelation
 
class  ThetaTest
 ThetaTest class. More...
 
class  ThreeAddressCode
 
class  ThreeAddressCodeList
 
class  ThreeAddressCodeVariable
 
struct  TraceCollection
 
struct  TracedPointerOrigin
 
class  TruncIntrinsicOperation
 
class  TruncOperation
 
class  TypeAttribute
 Type attribute. More...
 
class  TypeConverter
 
class  UAddWithOverflowOperation
 
class  UIToFPOperation
 
class  UMaxOperation
 
class  UMinOperation
 
class  UMulWithOverflowOperation
 
class  UndefValueOperation
 UndefValueOperation class. More...
 
struct  ValueOrigin
 
class  Variable
 
class  VariableArgumentType
 
class  VariableMap
 
class  VariableSet
 
class  VariadicArgumentListOperation
 
class  VariadicFunctionTest1
 
class  VariadicFunctionTest2
 
class  VectorBinaryOperation
 
struct  VectorHash
 
class  VectorSelectOperation
 
class  VectorType
 
class  VectorUnaryOperation
 
class  ZExtOperation
 

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 VectorNodeHashMap = std::unordered_map< std::vector< uint64_t >, rvsdg::Node *, VectorHash >
 
using TopNodeLeaderList = std::vector< const rvsdg::Node * >
 

Enumerations

enum class  CallingConvention {
  C , Default = C , Fast , Cold ,
  Tail
}
 
enum class  Linkage {
  externalLinkage , availableExternallyLinkage , linkOnceAnyLinkage , linkOnceOdrLinkage ,
  weakAnyLinkage , weakOdrLinkage , appendingLinkage , internalLinkage ,
  privateLinkage , externalWeakLinkage , commonLinkage
}
 
enum class  ICmpPredicate {
  Eq , Ne , Ugt , Uge ,
  Ult , Ule , Sgt , Sge ,
  Slt , Sle
}
 
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 }
 
enum class  StoreNodeInfo { ValueForwarding , ClobberNoForward , NoClobber }
 
enum class  LoadNodeInfo { ValueForwarding , NoClobber }
 

Functions

::llvm::APInt convert_bitvalue_repr (const rvsdg::BitValueRepresentation &vr)
 
static bool is_identity_mapping (const rvsdg::MatchOperation &op)
 
static const llvm::ThreeAddressCode * get_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 ThreeAddressCodeVariable * CreateContinuationVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & CreateLoopExitVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & CreateLoopEntryVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & CreateLoopRepetitionVariable (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 BasicBlock * GetEntryVariableBlock (ControlFlowGraphNode *node)
 
static void RestructureControlFlow (ControlFlowGraphNode &, ControlFlowGraphNode &, std::vector< TailControlledLoop > &)
 
static std::unique_ptr< rvsdg::MatchOperation > invertMatchOperation (const rvsdg::MatchOperation &matchOperation)
 
static void adjustLoopRepetitionEdge (const StronglyConnectedComponentStructure &sccStructure)
 
static void RestructureLoops (ControlFlowGraphNode &regionEntry, ControlFlowGraphNode &regionExit, std::vector< TailControlledLoop > &loops)
 
static ControlFlowGraphNode & ComputeHeadBranch (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< AggregationNode > AggregateControlFlowGraph (ControlFlowGraph &controlFlowGraph, const std::string &functionName, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static std::unique_ptr< AnnotationMap > AnnotateAggregationTree (const AggregationNode &aggregationTreeRoot, const std::string &functionName, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::Output * ConvertAggregationTreeToLambda (const AggregationNode &aggregationTreeRoot, const AnnotationMap &demandMap, RegionalizedVariableMap &scopedVariableMap, const std::string &functionName, std::shared_ptr< const rvsdg::FunctionType > functionType, const Linkage &functionLinkage, const CallingConvention &functionCallingConvention, const AttributeSet &functionAttributes, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::Output * ConvertControlFlowGraph (const FunctionNode &functionNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::Output * ConvertFunctionNode (const FunctionNode &functionNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::Output * ConvertDataNodeInitialization (const DataNodeInit &init, rvsdg::Region &region, RegionalizedVariableMap &regionalizedVariableMap)
 
static rvsdg::Output * ConvertDataNode (const DataNode &dataNode, RegionalizedVariableMap &regionalizedVariableMap, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
static rvsdg::Output * ConvertInterProceduralGraphNode (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< LlvmRvsdgModule > ConvertInterProceduralGraphModule (InterProceduralGraphModule &interProceduralGraphModule, InterProceduralGraphToRvsdgStatisticsCollector &statisticsCollector)
 
std::unique_ptr< LlvmRvsdgModule > ConvertInterProceduralGraphModule (InterProceduralGraphModule &interProceduralGraphModule, util::StatisticsCollector &statisticsCollector)
 
static const Variable * ConvertConstant (::llvm::Constant *, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &, Context &)
 
static const Variable * convertInstruction (::llvm::Instruction *instruction, std::vector< std::unique_ptr< ThreeAddressCode > > &threeAddressCodes, Context &context)
 
const Variable * ConvertValueOrFunction (::llvm::Value *v, tacsvector_t &tacs, Context &ctx)
 
const Variable * ConvertValue (::llvm::Value *v, tacsvector_t &tacs, Context &ctx)
 
static rvsdg::BitValueRepresentation convert_apint (const ::llvm::APInt &value)
 
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, TypeConverter &typeConverter)
 
static StringAttribute ConvertStringAttribute (const ::llvm::Attribute &attribute)
 
static AttributeSet convert_attributes (const ::llvm::AttributeSet &as, TypeConverter &typeConverter)
 
AttributeList convertAttributeList (const ::llvm::AttributeList &attributeList, const size_t numParameters, TypeConverter &typeConverter)
 
static const Variable * convert_int_constant (::llvm::Constant *c, std::vector< std::unique_ptr< ThreeAddressCode > > &tacs, Context &)
 
static const Variable * convert_undefvalue (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantExpr (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantFP (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_globalVariable (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantPointerNull (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_blockAddress (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &, Context &)
 
static const Variable * convert_constantAggregateZero (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantArray (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantDataArray (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantDataVector (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * ConvertConstantStruct (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_constantVector (::llvm::Constant *c, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &tacs, Context &ctx)
 
static const Variable * convert_globalAlias (::llvm::Constant *constant, std::vector< std::unique_ptr< llvm::ThreeAddressCode > > &, Context &)
 
static const Variable * convert_function (::llvm::Constant *c, tacsvector_t &tacs, Context &ctx)
 
static const Variable * ConvertConstant (::llvm::PoisonValue *poisonValue, tacsvector_t &threeAddressCodeVector, Context &context)
 
template<class T >
static const Variable * ConvertConstant (::llvm::Constant *constant, tacsvector_t &threeAddressCodeVector, Context &context)
 
static std::vector< std::unique_ptr< llvm::ThreeAddressCode > > ConvertConstant (::llvm::Constant *c, Context &ctx)
 
static const Variable * convert_return_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * ConvertBranchInstruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convertSwitchInstruction (::llvm::SwitchInst *switchInstruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_unreachable_instruction (::llvm::Instruction *i, tacsvector_t &, Context &ctx)
 
static std::unique_ptr< rvsdg::BinaryOperation > ConvertIntegerIcmpPredicate (const ::llvm::CmpInst::Predicate predicate, const std::size_t numBits)
 
static std::unique_ptr< rvsdg::BinaryOperation > ConvertPointerIcmpPredicate (const ::llvm::CmpInst::Predicate predicate)
 
static const Variable * convert (const ::llvm::ICmpInst *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_fcmp_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * AddIOBarrier (tacsvector_t &tacs, const Variable *operand, const Context &ctx)
 
static const Variable * addMemoryHoistBarrier (tacsvector_t &tacs, const Variable *address, const Context &ctx)
 
static const Variable * convert_load_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_store_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * ConvertPhiInstruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_getelementptr_instruction (::llvm::Instruction *inst, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convertMallocCall (const ::llvm::CallInst &instruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * convertFreeCall (const ::llvm::CallInst &instruction, tacsvector_t &threeAddressCodes, Context &context)
 
static bool IsVolatile (const ::llvm::Value &value)
 
static const Variable * convertMemCpyCall (const ::llvm::IntrinsicInst *instruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * convertMemSetCall (const ::llvm::IntrinsicInst &instruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * convertMemMoveCall (const ::llvm::IntrinsicInst &instruction, tacsvector_t &threeAddressCodes, Context &context)
 
static bool isMallocCall (const ::llvm::CallInst &callInstruction)
 
static bool isFreeCall (const ::llvm::CallInst &callInstruction)
 
static const Variable * convertFMulAddIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convertCeilIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertRIntIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertTruncIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertFloorIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertRoundIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertFShlIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertSMaxIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertUMaxIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertSMinIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertUMinIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertCopysignIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertPtrMaskIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertFAbsIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertAbsIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertBSwapIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertCtlzIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertCttzIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertCtpopIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertIsConstantIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertIsFPClassIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertSAddWithOverflowIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertUAddWithOverflowIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertSSubWithOverflowIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertSMulWithOverflowIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convertUMulWithOverflowIntrinsic (const ::llvm::CallInst &instruction, tacsvector_t &tacs, Context &context)
 
std::vector< const Variable * > convertCallArguments (const ::llvm::CallInst &callInstruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * createCall (const ::llvm::CallInst &callInstruction, tacsvector_t &threeAddressCodes, Context &context)
 
static bool shouldIgnoreIntrinsic (::llvm::Intrinsic::ID intrinsicId)
 
static const Variable * convertIntrinsicInstruction (const ::llvm::IntrinsicInst &intrinsicInstruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * convertCallInstruction (const ::llvm::CallInst &callInstruction, tacsvector_t &threeAddressCodes, Context &context)
 
static const Variable * convert_select_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static std::unique_ptr< rvsdg::BinaryOperation > ConvertIntegerBinaryOperation (const ::llvm::Instruction::BinaryOps binaryOperation, std::size_t numBits)
 
static std::unique_ptr< rvsdg::BinaryOperation > ConvertFloatingPointBinaryOperation (const ::llvm::Instruction::BinaryOps binaryOperation, fpsize floatingPointSize)
 
static const Variable * convert (const ::llvm::BinaryOperator *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_alloca_instruction (::llvm::Instruction *instruction, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_extractvalue (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convertInsertValueInstruction (const ::llvm::InsertValueInst &instruction, tacsvector_t &tacs, Context &context)
 
static const Variable * convert_extractelement_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert (::llvm::ShuffleVectorInst *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert_insertelement_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convertFreezeInstruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
static const Variable * convert (::llvm::UnaryOperator *unaryOperator, tacsvector_t &threeAddressCodeVector, Context &ctx)
 
template<class OP >
static std::unique_ptr< rvsdg::SimpleOperation > create_unop (std::shared_ptr< const rvsdg::Type > st, std::shared_ptr< const rvsdg::Type > dt)
 
static const Variable * convert_cast_instruction (::llvm::Instruction *i, tacsvector_t &tacs, Context &ctx)
 
template<class INSTRUCTIONTYPE >
static const Variable * convert (::llvm::Instruction *instruction, tacsvector_t &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)
 
static std::unique_ptr< llvm::Argument > convert_argument (const ::llvm::Argument &argument, Context &ctx)
 
static void EnsureSingleInEdgeToExitNode (ControlFlowGraph &cfg)
 
static std::unique_ptr< ControlFlowGraph > create_cfg (::llvm::Function &f, Context &ctx)
 
static void convert_function (::llvm::Function &function, Context &ctx)
 
static const llvm::Linkage & convert_linkage (const ::llvm::GlobalValue::LinkageTypes &linkage)
 
static void declare_globals (::llvm::Module &lm, Context &ctx)
 
static std::unique_ptr< DataNodeInit > create_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< InterProceduralGraphModule > ConvertLlvmModule (::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 ControlFlowGraphNode * aggregate (ControlFlowGraphNode *, ControlFlowGraphNode *, AggregationMap &)
 
static void reduceLoop (const StronglyConnectedComponentStructure &sccStruct, AggregationMap &map)
 
static ControlFlowGraphNode * reduce_branch (ControlFlowGraphNode *split, ControlFlowGraphNode **entry, AggregationMap &map)
 
static ControlFlowGraphNode * reduce_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< AggregationNode > aggregate (ControlFlowGraph &cfg)
 Aggregate a properly structured CFG to a aggregation tree.
 
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< AnnotationMap > Annotate (const AggregationNode &aggregationTreeRoot)
 
static const util::BijectiveMap<::llvm::CallingConv::ID, CallingConvention > & getCallingConventionMap ()
 
jlm::llvm::CallingConvention convertCallingConventionToJlm (::llvm::CallingConv::ID cc)
 
::llvm::CallingConv::ID convertCallingConventionToLlvm (jlm::llvm::CallingConvention cc)
 
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< StronglyConnectedComponent > find_sccs (const ControlFlowGraph &cfg)
 
std::vector< StronglyConnectedComponent > find_sccs (ControlFlowGraphNode *entry, ControlFlowGraphNode *exit)
 
static std::unique_ptr< ControlFlowGraph > copy_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::ControlFlowGraphNode * find_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.
 
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< DominatorTreeNode > build_domtree (std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &doms, ControlFlowGraphNode *root)
 
static ControlFlowGraphNode * intersect (ControlFlowGraphNode *b1, ControlFlowGraphNode *b2, const std::unordered_map< ControlFlowGraphNode *, size_t > &indices, const std::unordered_map< ControlFlowGraphNode *, ControlFlowGraphNode * > &doms)
 
std::unique_ptr< DominatorTreeNode > domtree (ControlFlowGraph &cfg)
 
static std::unique_ptr< GlobalValue > create_gblvalue (DataNode *node)
 
static size_t ntacs (const InterProceduralGraphModule &im)
 
rvsdg::Output & GetMemoryStateRegionArgument (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::Input & GetMemoryStateRegionResult (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::SimpleNode * tryGetMemoryStateExitMerge (const rvsdg::LambdaNode &lambdaNode) noexcept
 
rvsdg::SimpleNode * tryGetMemoryStateEntrySplit (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)
 
std::optional< std::vector< rvsdg::Output * > > foldMatchOperationWithConstant (const rvsdg::MatchOperation &matchOperation, const std::vector< rvsdg::Output * > &operands)
 
 TEST (ControlOperationsTests, foldConstants)
 
static const ::llvm::fltSemantics & mapToLlvmFltSemantics (const fpsize size)
 
 TEST (ConversionOperationsTests, SExtConstantFolding)
 
 TEST (ConversionOperationsTests, ZExtConstantFolding)
 
 TEST (ConversionOperationsTests, TruncConstantFolding)
 
 TEST (ConversionOperationsTests, fpExtConstantFolding)
 
 TEST (ConversionOperationsTests, fpTruncConstantFolding)
 
 TEST (ConversionOperationsTests, FunctionToPointerInversion)
 
 TEST (ConversionOperationsTests, PointerToFunctionInversion)
 
bool reduceStaticallyKnownPredicate (rvsdg::GammaNode &gammaNode)
 
 TEST (GammaTests, test_predicate_reduction)
 
 TEST (GetElemenPtrOperationTests, typeChecks)
 
 TEST (GetElementPtrOperationTests, TestOperationEquality)
 
 TEST (GetElementPtrTests, TryGetAsConstantTest)
 
 TEST (GetElementPtrTests, TestGetElementPtrOperationConstant_OffestInBytes)
 
 TEST (GetElementPtrTests, normalizeIdempotentReduction)
 
template<typename TBinOp >
static IntegerValueRepresentation foldBinaryOperation (const IntegerValueRepresentation &r1, const IntegerValueRepresentation &r2)
 
template<typename TBinOp >
static std::optional< std::vector< rvsdg::Output * > > foldBinaryOperationConstants (const std::vector< rvsdg::Output * > &operands)
 
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands (const std::vector< rvsdg::Output * > &operands, const std::int64_t result)
 
template<typename Operation >
static void TestFoldConstants (const FoldConstantsTestInput &input)
 
template<typename Operation >
static void testNormalizeIdenticalOperands (const std::uint64_t expected)
 
 TEST (IntegerEqOperationTest, foldConstants)
 
 TEST (IntegerNeOperationTest, foldConstants)
 
 TEST (IntegerSgeOperationTest, foldConstants)
 
 TEST (IntegerSgtOperationTest, foldConstants)
 
 TEST (IntegerSleOperationTest, foldConstants)
 
 TEST (IntegerSltOperationTest, foldConstants)
 
 TEST (IntegerUgeOperationTest, foldConstants)
 
 TEST (IntegerUgtOperationTest, foldConstants)
 
 TEST (IntegerUleOperationTest, foldConstants)
 
 TEST (IntegerUltOperationTest, foldConstants)
 
 TEST (IntegerOrOperationTest, foldConstants)
 
 TEST (IntegerOrOperationTest, normalizeIdempotent)
 
 TEST (IntegerAndOperationTest, foldConstants)
 
 TEST (IntegerXorOperationTest, foldConstants)
 
 TEST (IntegerAddOperationTest, foldConstants)
 
 TEST (IntegerSubOperationTest, foldConstants)
 
 TEST (IntegerMulOperationTest, foldConstants)
 
 TEST (IntegerSDivOperationTest, foldConstants)
 
 TEST (IntegerUDivOperationTest, foldConstants)
 
 TEST (IntegerSRemOperationTest, foldConstants)
 
 TEST (IntegerURemOperationTest, foldConstants)
 
 TEST (IntegerAShrOperationTest, foldConstants)
 
 TEST (IntegerShlOperationTest, foldConstants)
 
 TEST (IntegerLShrOperationTest, foldConstants)
 
 TEST (IntegerSubOperationTests, normalizeAdditiveInverse)
 
 TEST (IntegerEqOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerNeOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerSgeOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerSgtOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerSleOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerSltOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerUgeOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerUgtOperationTests, normalizeIdenticalOperands)
 
 TEST (IntegerUltOperationTests, normalizeIdenticalOperands)
 
 TEST (MemoryHoistBarrierTests, normalizeNestedMemoryHoistBarriers)
 
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)
 
static std::optional< size_t > getAllocationSizeInBytes (const rvsdg::Output &output)
 
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 const util::BijectiveMap<::llvm::CmpInst::Predicate, ICmpPredicate > & getICmpPredicateMap ()
 
ICmpPredicate convertICmpPredicateToJlm (::llvm::CmpInst::Predicate predicate)
 
::llvm::CmpInst::Predicate convertICmpPredicateToLlvm (ICmpPredicate predicate)
 
std::string_view iCmpPredicateToString (ICmpPredicate predicate)
 
template<typename TOperation >
static bool isOutputOf (rvsdg::Output &operand)
 
static bool isAllocationSide (rvsdg::Output &output)
 
template<ICmpPredicate Predicate>
static void testPtrCmpNormalizeIdenticalOperands (const std::uint64_t expected)
 
 TEST (PtrCmpOperationTests, testNormalizeNullPointerComparison)
 
 TEST (PtrCmpOperationTests, testNormalizeIdenticalOperands)
 
 TEST (FCmpOperationTests, testFoldConstants)
 
 TEST (FBinaryOperationTests, testFoldConstants)
 
static bool is_store_mux_reducible (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_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::optional< size_t > getAllocationSizeInBytes (const rvsdg::Output &output)
 
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)
 
std::string to_str (const AggregationNode &n, const AnnotationMap &dm)
 
void print (const AggregationNode &n, const AnnotationMap &dm, FILE *out)
 
static void print_ascii (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::Output & traceOutput (rvsdg::Output &output, bool mayEnterSubregions, const rvsdg::Region *withinRegion)
 
std::optional< int64_t > tryGetConstantSignedInteger (const rvsdg::Output &output)
 
TracedPointerOrigin TracePointerOriginPrecise (const rvsdg::Output &p)
 
static bool traceAllPointerOriginsInternal (const rvsdg::Output *basePointer, std::optional< int64_t > offsetInBytes, TraceCollection &traceCollection, const size_t maxTraceCollectionSize)
 
bool TraceAllPointerOrigins (TracedPointerOrigin p, TraceCollection &traceCollection, const size_t maxTraceCollectionSize)
 
const rvsdg::Output & traceOutput (const rvsdg::Output &output, bool mayEnterSubregions, const rvsdg::Region *withinRegion=nullptr)
 
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 >
bool isVectorOf (const rvsdg::Type &type)
 
template<class T >
bool isVectorOfSize (const rvsdg::Type &type, const size_t size)
 
template<class T >
static bool is (const llvm::Variable *variable) noexcept
 
static VectorNodeHashMap createElementAllocaNodes (rvsdg::SimpleNode &allocaNode)
 
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::SimpleNode * tryGetLeaderNode (const rvsdg::SimpleNode &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::CongruenceSetIndex > tryGetGammaExitVarCongruenceSet (rvsdg::GammaNode::ExitVar &exitVar, CommonNodeElimination::Context &context)
 
static size_t getGammaExitVariableHash (const rvsdg::GammaNode::ExitVar &exitVar, CommonNodeElimination::Context &context)
 
static bool areGammaExitVariablesCongruent (const rvsdg::GammaNode::ExitVar &first, const rvsdg::GammaNode::ExitVar &second, CommonNodeElimination::Context &context)
 
static void insertGammaExitVarInHashmap (rvsdg::GammaNode::ExitVar &exitVar, CommonNodeElimination::Context::CongruenceSetIndex congruenceSet, std::unordered_map< size_t, CommonNodeElimination::Context::CongruenceSetIndex > &leaderHashes, CommonNodeElimination::Context &context)
 
static void lookupOrInsertGammaExitVarInHashmap (const rvsdg::GammaNode::ExitVar &exitVar, const rvsdg::GammaNode &gamma, std::unordered_map< size_t, CommonNodeElimination::Context::CongruenceSetIndex > &leaderHashes, 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)
 
 TEST (CommonNodeEliminationTests, test_simple)
 
 TEST (CommonNodeEliminationTests, test_gamma)
 
 TEST (CommonNodeEliminationTests, test_gamma_congruent_exit_vars)
 
 TEST (CommonNodeEliminationTests, test_theta)
 
 TEST (CommonNodeEliminationTests, test_theta2)
 
 TEST (CommonNodeEliminationTests, test_theta3)
 
 TEST (CommonNodeEliminationTests, test_theta4)
 
 TEST (CommonNodeEliminationTests, test_theta5)
 
 TEST (CommonNodeEliminationTests, MultipleThetas)
 
 TEST (CommonNodeEliminationTests, MultipleThetasPassthrough)
 
 TEST (CommonNodeEliminationTests, test_lambda)
 
 TEST (CommonNodeEliminationTests, test_phi)
 
 TEST (CommonNodeEliminationTests, EmptyTheta)
 
 TEST (CommonNodeEliminationTests, GammaInTheta)
 
 TEST (CommonNodeEliminationTests, InvariantThetaInTheta)
 
 TEST (CommonNodeEliminationTests, InvariantLoopOutputs)
 
static bool isLoadNonVolatileMemoryStateOutput (const rvsdg::Output &output)
 
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 rvsdg::Node * getConstant (const rvsdg::Output &output)
 
static void RunInvariantValueRedirection (jlm::llvm::LlvmRvsdgModule &rvsdgModule)
 
 TEST (InvariantValueRedirectionTests, TestGamma)
 
 TEST (InvariantValueRedirectionTests, testGammaControlConstantRedirection_Success)
 
 TEST (InvariantValueRedirectionTests, testGammaControlConstantRedirection_Failure)
 
 TEST (InvariantValueRedirectionTests, testGammaIntegerConstantRedirection_Success)
 
 TEST (InvariantValueRedirectionTests, testGammaIntegerConstantRedirection_Failure)
 
 TEST (InvariantValueRedirectionTests, TestTheta)
 
 TEST (InvariantValueRedirectionTests, testThetaConstantRedirection)
 
 TEST (InvariantValueRedirectionTests, TestCall)
 
 TEST (InvariantValueRedirectionTests, TestCallWithMemoryStateNodes)
 
 TEST (InvariantValueRedirectionTests, TestCallWithMissingMemoryStateNodes)
 
 TEST (InvariantValueRedirectionTests, TestCallWithDifferentExternalCompression)
 
 TEST (InvariantValueRedirectionTests, TestLambdaCallArgumentMismatch)
 
 TEST (InvariantValueRedirectionTests, testThetaGammaRedirection)
 
 TEST (InvariantValueRedirectionTests, testLoadWithDeadLoadedValue)
 
static std::vector< rvsdg::SimpleNode * > collectMemoryHoistBarrierNodes (rvsdg::Output &output)
 
static std::optional< rvsdg::SimpleNode * > selectMemoryHoistBarrierNode (const std::vector< rvsdg::SimpleNode * > &hoistBarrierNodes, const std::variant< rvsdg::Node *, rvsdg::Region * > ioStateOwner)
 
static void divertUsersToMemoryHoistBarrierNode (rvsdg::Output &output, rvsdg::SimpleNode &memoryHoistBarrierNode)
 
static std::optional< rvsdg::GammaNode::EntryVar > getIOStateEntryVar (const rvsdg::GammaNode &gammaNode)
 
static void runIOBarrierElimination (LlvmRvsdgModule &rvsdgModule)
 
 TEST (IOBarrierEliminationTests, testLambdaArgument)
 
 TEST (IOBarrierEliminationTests, testSizeIsRespected)
 
 TEST (IOBarrierEliminationTests, testSuccess)
 
 TEST (IOBarrierEliminationTests, testInvidiualIOBarrierUserRerouting)
 
 TEST (IOBarrierEliminationTests, testGamma)
 
 TEST (IOBarrierEliminationTests, testOnlyLoadsInGamma)
 
 TEST (IOBarrierEliminationTests, testOnlyLoadsInGammaFailure)
 
 TEST (IOBarrierEliminationTests, testLoadsInGammaNoReturn)
 
 TEST (IOBarrierEliminationTest, testNormalizeation)
 
 TEST (IOBarrierElimination, testStoreMarking)
 
 TEST (IOBarrierEliminationTests, testNormalizationFromLoadedAddress)
 
static bool hasOnlyValueInputs (const rvsdg::Node &node)
 
static rvsdg::Region & limitTargetRegion (const rvsdg::Node &node, rvsdg::Region &targetRegion)
 
static rvsdg::Input * mapStateOutputToInput (rvsdg::Output &output)
 
 TEST (NodeHoistingTests, simpleGamma)
 
 TEST (NodeHoistingTests, nestedGamma)
 
 TEST (NodeHoistingTests, simpleTheta)
 
 TEST (NodeHoistingTests, invariantMemoryOperation)
 
 TEST (NodeHoistingTests, statefulOperations)
 
 TEST (NodeHoistingTests, controlConstants)
 
 TEST (NodeHoistingTests, hoistLoadNodesOutOfGamma)
 
 TEST (NodeHoistingTests, hoistLoadNodesOutofNestedGamma)
 
 TEST (NodeHoistingTests, hoistLoadNodeOutOfGammaInTheta)
 
static std::vector< rvsdg::NodeNormalization< rvsdg::MatchOperation > > matchOperationNormalizations ({ foldMatchOperationWithConstant })
 
static std::vector< rvsdg::NodeNormalization< SExtOperation > > sextOperationNormalizations ({ SExtOperation::foldConstant })
 
static std::vector< rvsdg::NodeNormalization< ZExtOperation > > zextOperationNormalizations ({ ZExtOperation::foldConstant })
 
static std::vector< rvsdg::NodeNormalization< TruncOperation > > truncOperationNormalizations ({ TruncOperation::foldConstant })
 
static std::vector< rvsdg::NodeNormalization< FPExtOperation > > fpExtOperationNormalizations ({ FPExtOperation::foldConstant })
 
static std::vector< rvsdg::NodeNormalization< FPTruncOperation > > fpTruncOperationNormalizations ({ FPTruncOperation::foldConstant })
 
static std::vector< rvsdg::NodeNormalization< IntegerEqOperation > > integerEqNormalizations ({ IntegerEqOperation::foldConstants, IntegerEqOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerNeOperation > > integerNeNormalizations ({ IntegerNeOperation::foldConstants, IntegerNeOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerSgeOperation > > integerSgeNormalizations ({ IntegerSgeOperation::foldConstants, IntegerSgeOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerSgtOperation > > integerSgtNormalizations ({ IntegerSgtOperation::foldConstants, IntegerSgtOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerSleOperation > > integerSleNormalizations ({ IntegerSleOperation::foldConstants, IntegerSleOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerSltOperation > > integerSltNormalizations ({ IntegerSltOperation::foldConstants, IntegerSltOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerUgeOperation > > integerUgeNormalizations ({ IntegerUgeOperation::foldConstants, IntegerUgeOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerUgtOperation > > integerUgtNormalizations ({ IntegerUgtOperation::foldConstants, IntegerUgtOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerUleOperation > > integerUleNormalizations ({ IntegerUleOperation::foldConstants, IntegerUleOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerUltOperation > > integerUltNormalizations ({ IntegerUltOperation::foldConstants, IntegerUltOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< IntegerAddOperation > > integerAddNormalizations ({ IntegerAddOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerSubOperation > > integerSubNormalizations ({ IntegerSubOperation::normalizeAdditiveInverse, IntegerSubOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerMulOperation > > integerMulNormalizations ({ IntegerMulOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerSDivOperation > > integerSDivNormalizations ({ IntegerSDivOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerUDivOperation > > integerUDivNormalizations ({ IntegerUDivOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerSRemOperation > > integerSRemNormalizations ({ IntegerSRemOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerURemOperation > > integerURemNormalizations ({ IntegerURemOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerAShrOperation > > integerAShrNormalizations ({ IntegerAShrOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerShlOperation > > integerShlNormalizations ({ IntegerShlOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerLShrOperation > > integerLShrNormalizations ({ IntegerLShrOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerAndOperation > > integerAndNormalizations ({ IntegerAndOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< IntegerOrOperation > > integerOrNormalizations ({ IntegerOrOperation::foldConstants, IntegerOrOperation::normalizeIdempotent })
 
static std::vector< rvsdg::NodeNormalization< IntegerXorOperation > > integerXorNormalizations ({ IntegerXorOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< FBinaryOperation > > fpBinaryOpNormalizations ({ FBinaryOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< LoadNonVolatileOperation > > loadNonVolatileNormalizations ({ LoadNonVolatileOperation::NormalizeLoadStore, LoadNonVolatileOperation::NormalizeLoadAlloca, LoadNonVolatileOperation::NormalizeDuplicateStates, LoadNonVolatileOperation::NormalizeLoadStoreState, LoadNonVolatileOperation::normalizeMemoryHoistBarrierAddress })
 
static std::vector< rvsdg::NodeNormalization< StoreNonVolatileOperation > > storeNonVolatileNormalizations ({ StoreNonVolatileOperation::NormalizeStoreMux, StoreNonVolatileOperation::normalizeStoreStore, StoreNonVolatileOperation::NormalizeStoreAlloca, StoreNonVolatileOperation::NormalizeDuplicateStates, StoreNonVolatileOperation::normalizeMemoryHoistBarrierAddress, StoreNonVolatileOperation::normalizeStoreAllocaSingleUser })
 
static std::vector< rvsdg::NodeNormalization< MemoryStateMergeOperation > > memoryStateMergeNormalizations ({ MemoryStateMergeOperation::NormalizeSingleOperand, MemoryStateMergeOperation::NormalizeDuplicateOperands, MemoryStateMergeOperation::NormalizeNestedMerges, MemoryStateMergeOperation::NormalizeMergeSplit })
 
static std::vector< rvsdg::NodeNormalization< MemoryStateJoinOperation > > memoryStateJoinNormalizations ({ MemoryStateJoinOperation::NormalizeSingleOperand, MemoryStateJoinOperation::NormalizeDuplicateOperands })
 
static std::vector< rvsdg::NodeNormalization< MemoryStateSplitOperation > > memoryStateSplitNormalizations ({ MemoryStateSplitOperation::NormalizeSingleResult, MemoryStateSplitOperation::NormalizeNestedSplits, MemoryStateSplitOperation::NormalizeSplitMerge })
 
static std::vector< rvsdg::NodeNormalization< LambdaExitMemoryStateMergeOperation > > lambdaExitMemoryStateMergeNormalizations ({ LambdaExitMemoryStateMergeOperation::NormalizeLoadFromAlloca, LambdaExitMemoryStateMergeOperation::NormalizeStoreToAlloca, LambdaExitMemoryStateMergeOperation::NormalizeAlloca })
 
static std::vector< rvsdg::NodeNormalization< PtrCmpOperation > > ptrCmpNormalizations ({ PtrCmpOperation::normalizeNullPointerComparison, PtrCmpOperation::normalizeIdenticalOperands })
 
static std::vector< rvsdg::NodeNormalization< GetElementPtrOperation > > getElementPtrNormalizations ({ GetElementPtrOperation::normalizeIdempotent })
 
static std::vector< rvsdg::NodeNormalization< FCmpOperation > > fCmpNormalizations ({ FCmpOperation::foldConstants })
 
static std::vector< rvsdg::NodeNormalization< MemoryHoistBarrierOperation > > memoryHoistBarrierNormalizations ({ MemoryHoistBarrierOperation::normalizeNestedMemoryHoistBarriers })
 
static std::vector< rvsdg::NodeNormalization< rvsdg::BinaryOperation > > binaryOperationNormalizations ({ rvsdg::NormalizeBinaryOperation })
 
template<typename TOperation >
static rvsdg::NodeNormalization< TOperation > createNormalizer (const std::vector< rvsdg::NodeNormalization< TOperation > > &nodeNormalizations)
 
template<class TOperation >
static bool reduceSimpleNode (rvsdg::SimpleNode &simpleNode, const std::vector< rvsdg::NodeNormalization< TOperation > > &normalizations, size_t &counter)
 
 TEST (NodeReductionTests, MultipleReductionsPerRegion)
 
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< GammaSubregionRoles > determineGammaSubregionRoles (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)
 
static RegionSlice computeRegionSlice (rvsdg::Output &output)
 
static void copyRegionSlice (rvsdg::Region &targetRegion, const RegionSlice &regionSlice, rvsdg::SubstitutionMap &substitutionMap)
 
static rvsdg::Output & copyDeltaRegionSlice (rvsdg::Output &output, rvsdg::Region &targetRegion)
 
static rvsdg::Output & copyDeltaElement (const uint64_t elementOffsetInBytes, rvsdg::Output &output, rvsdg::Region &targetRegion, const std::shared_ptr< const rvsdg::Type > &loadedType)
 
static std::unique_ptr< aa::AliasAnalysis > createAliasAnalysis (rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector)
 
static bool is_eqcmp (const rvsdg::Operation &op)
 
static bool is_theta_invariant (const jlm::rvsdg::Output *output)
 
static rvsdg::Output * push_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::Output * create_unrolled_gamma_predicate (const LoopUnrollInfo &ui, size_t factor)
 
static jlm::rvsdg::Output * create_unrolled_theta_predicate (rvsdg::Region *, const rvsdg::SubstitutionMap &smap, const LoopUnrollInfo &ui, size_t factor)
 
static jlm::rvsdg::Output * create_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 util::StatisticsCollector statisticsCollector
 
static const bool USE_TRIVIAL_LOCALAA = std::getenv("JLM_SVF_USE_TRIVIAL_LOCALAA")
 
static const bool ENABLE_PTGAA = std::getenv("JLM_ENABLE_SVF_PTGAA")
 
static const bool ENABLE_REGION_PREDICATE_CHECK
 
static const bool DISABLE_LOAD_LOAD_FORWARDING = std::getenv("JLM_DISABLE_LOAD_LOAD_FORWARDING")
 

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

using jlm::llvm::BasicBlockMap = typedef util::BijectiveMap<const ::llvm::BasicBlock *, BasicBlock *>

Definition at line 41 of file LlvmModuleConversion.cpp.

◆ 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 223 of file tac.hpp.

◆ TopNodeLeaderList

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

Definition at line 417 of file CommonNodeElimination.cpp.

◆ VectorNodeHashMap

using jlm::llvm::VectorNodeHashMap = typedef std::unordered_map<std::vector<uint64_t>, rvsdg::Node *, VectorHash>

Definition at line 496 of file AggregateAllocaSplitting.cpp.

Enumeration Type Documentation

◆ CallingConvention

enum class jlm::llvm::CallingConvention
strong

Types of calling conventions. Based on LLVM's "::llvm::CallingConv" namespace. LLVM allows arbitrary numbers to be used as calling convention identifiers, but jlm limits the set of possible values to this enum.

Enumerator
C 
Default 
Fast 
Cold 
Tail 

Definition at line 20 of file CallingConvention.hpp.

◆ CorrelationType

enum class jlm::llvm::CorrelationType
strong

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 class jlm::llvm::fpcmp
strong
Enumerator
TRUE 
FALSE 
oeq 
ogt 
oge 
olt 
ole 
one 
ord 
ueq 
ugt 
uge 
ult 
ule 
une 
uno 

Definition at line 599 of file operators.hpp.

◆ fpop

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

Definition at line 879 of file operators.hpp.

◆ fpsize

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

Definition at line 110 of file types.hpp.

◆ ICmpPredicate

enum class jlm::llvm::ICmpPredicate
strong

The set of possible types of predicates for integer and pointer comparisons. Based on the integer comparison predicates defined in "::llvm::CmpInst".

Enumerator
Eq 
Ne 
Ugt 
Uge 
Ult 
Ule 
Sgt 
Sge 
Slt 
Sle 

Definition at line 375 of file operators.hpp.

◆ Linkage

enum class 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.

◆ LoadNodeInfo

enum class jlm::llvm::LoadNodeInfo
strong
Enumerator
ValueForwarding 
NoClobber 

Definition at line 319 of file StoreValueForwarding.cpp.

◆ StoreNodeInfo

enum class jlm::llvm::StoreNodeInfo
strong
Enumerator
ValueForwarding 
ClobberNoForward 
NoClobber 

Definition at line 309 of file StoreValueForwarding.cpp.

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 975 of file LlvmModuleConversion.cpp.

◆ addMemoryHoistBarrier()

static const Variable * jlm::llvm::addMemoryHoistBarrier ( tacsvector_t &  tacs,
const Variable *  address,
const Context &  ctx 
)
static

Definition at line 984 of file LlvmModuleConversion.cpp.

◆ AddToWorklist()

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

Definition at line 21 of file CallSummary.cpp.

◆ adjustLoopRepetitionEdge()

static void jlm::llvm::adjustLoopRepetitionEdge ( const StronglyConnectedComponentStructure &  sccStructure)
static

The RVSDG theta node expects that the repetition of its body always happens on control value 1. Thus, we need to ensure that the repetition edge of the tail-controlled loop has index 1 in order to avoid miscompilations.

Parameters
sccStructureThe StronglyConnectedComponentStructure that represents the tail-controlled loop.

Definition at line 276 of file ControlFlowRestructuring.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 491 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 481 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 393 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 375 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 878 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 900 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.

◆ areGammaExitVariablesCongruent()

static bool jlm::llvm::areGammaExitVariablesCongruent ( const rvsdg::GammaNode::ExitVar &  first,
const rvsdg::GammaNode::ExitVar &  second,
CommonNodeElimination::Context &  context 
)
static

Checks if the two given exit variables are congruent, by comparing the origins of their branch results in each subregion. Unlike comparing hashes, this function never yields false positives.

Parameters
firstthe first exit variable
secondthe second exit variable
contextthe context of the common node elimination pass
Returns
true if the exit variables are congruent
Precondition
the exit variables belong to the same gamma node

Definition at line 774 of file CommonNodeElimination.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 291 of file CommonNodeElimination.cpp.

◆ binaryOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< rvsdg::BinaryOperation > > jlm::llvm::binaryOperationNormalizations ( { rvsdg::NormalizeBinaryOperation }  )
static

◆ 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 322 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 318 of file CommonNodeElimination.cpp.

◆ cleanup()

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

Definition at line 117 of file pull.cpp.

◆ collectMemoryHoistBarrierNodes()

static std::vector< rvsdg::SimpleNode * > jlm::llvm::collectMemoryHoistBarrierNodes ( rvsdg::Output &  output)
static

Definition at line 190 of file IOBarrierElimination.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 448 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 404 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 389 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.

◆ computeRegionSlice()

static RegionSlice jlm::llvm::computeRegionSlice ( rvsdg::Output &  output)
static

Definition at line 1087 of file StoreValueForwarding.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 2177 of file LlvmModuleConversion.cpp.

◆ convert() [2/5]

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

Definition at line 2050 of file LlvmModuleConversion.cpp.

◆ convert() [3/5]

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

Definition at line 2089 of file LlvmModuleConversion.cpp.

◆ convert() [4/5]

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

Definition at line 1934 of file LlvmModuleConversion.cpp.

◆ convert() [5/5]

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

Definition at line 886 of file LlvmModuleConversion.cpp.

◆ Convert() [1/7]

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

Definition at line 651 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 675 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 586 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 633 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 664 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 511 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 743 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 1990 of file LlvmModuleConversion.cpp.

◆ convert_apint()

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

Definition at line 230 of file LlvmModuleConversion.cpp.

◆ convert_argument()

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

Definition at line 2362 of file LlvmModuleConversion.cpp.

◆ convert_attributes()

static AttributeSet jlm::llvm::convert_attributes ( const ::llvm::AttributeSet &  as,
TypeConverter &  typeConverter 
)
static

Definition at line 399 of file LlvmModuleConversion.cpp.

◆ convert_basic_blocks()

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

Definition at line 2351 of file LlvmModuleConversion.cpp.

◆ convert_bitvalue_repr()

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

Definition at line 174 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 547 of file LlvmModuleConversion.cpp.

◆ convert_cast_instruction()

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

Definition at line 2122 of file LlvmModuleConversion.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 558 of file LlvmModuleConversion.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 572 of file LlvmModuleConversion.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 594 of file LlvmModuleConversion.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 612 of file LlvmModuleConversion.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 482 of file LlvmModuleConversion.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 507 of file LlvmModuleConversion.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 532 of file LlvmModuleConversion.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 648 of file LlvmModuleConversion.cpp.

◆ convert_extractelement_instruction()

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

Definition at line 2038 of file LlvmModuleConversion.cpp.

◆ convert_extractvalue()

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

Definition at line 2011 of file LlvmModuleConversion.cpp.

◆ convert_fcmp_instruction()

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

Definition at line 930 of file LlvmModuleConversion.cpp.

◆ convert_function() [1/2]

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

Definition at line 677 of file LlvmModuleConversion.cpp.

◆ convert_function() [2/2]

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

Definition at line 2516 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 1099 of file LlvmModuleConversion.cpp.

◆ convert_global_value()

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

Definition at line 2619 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 666 of file LlvmModuleConversion.cpp.

◆ convert_globals()

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

Definition at line 2629 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 522 of file LlvmModuleConversion.cpp.

◆ convert_insertelement_instruction()

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

Definition at line 2065 of file LlvmModuleConversion.cpp.

◆ convert_instructions()

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

Definition at line 2278 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 452 of file LlvmModuleConversion.cpp.

◆ convert_linkage()

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

Definition at line 2529 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 993 of file LlvmModuleConversion.cpp.

◆ convert_return_instruction()

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

Definition at line 749 of file LlvmModuleConversion.cpp.

◆ convert_select_instruction()

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

Definition at line 1856 of file LlvmModuleConversion.cpp.

◆ convert_store_instruction()

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

Definition at line 1042 of file LlvmModuleConversion.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 468 of file LlvmModuleConversion.cpp.

◆ convert_unreachable_instruction()

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

Definition at line 840 of file LlvmModuleConversion.cpp.

◆ convertAbsIntrinsic()

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

Definition at line 1460 of file LlvmModuleConversion.cpp.

◆ ConvertAggregationNode()

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

Definition at line 823 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 CallingConvention &  functionCallingConvention,
const AttributeSet &  functionAttributes,
InterProceduralGraphToRvsdgStatisticsCollector &  statisticsCollector 
)
static

Definition at line 912 of file InterProceduralGraphConversion.cpp.

◆ ConvertAssignment()

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

Definition at line 469 of file InterProceduralGraphConversion.cpp.

◆ ConvertAttributeKind()

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

Definition at line 249 of file LlvmModuleConversion.cpp.

◆ convertAttributeList()

AttributeList jlm::llvm::convertAttributeList ( const ::llvm::AttributeList &  attributeList,
const size_t  numParameters,
TypeConverter &  typeConverter 
)

Definition at line 430 of file LlvmModuleConversion.cpp.

◆ ConvertBasicBlock()

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

Definition at line 569 of file InterProceduralGraphConversion.cpp.

◆ ConvertBranch()

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

Definition at line 501 of file InterProceduralGraphConversion.cpp.

◆ ConvertBranchInstruction()

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

Definition at line 766 of file LlvmModuleConversion.cpp.

◆ convertBSwapIntrinsic()

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

Definition at line 1470 of file LlvmModuleConversion.cpp.

◆ convertCallArguments()

std::vector< const Variable * > jlm::llvm::convertCallArguments ( const ::llvm::CallInst &  callInstruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)

Definition at line 1598 of file LlvmModuleConversion.cpp.

◆ convertCallingConventionToJlm()

jlm::llvm::CallingConvention jlm::llvm::convertCallingConventionToJlm ( ::llvm::CallingConv::ID  cc)

Converts the given calling convention from LLVM to jlm.

Parameters
ccthe calling convention
Returns
the same calling convention as a jlm enum value
Exceptions
jlm::util::Errorif the calling convention is unknown

Definition at line 28 of file CallingConvention.cpp.

◆ convertCallingConventionToLlvm()

llvm::CallingConv::ID jlm::llvm::convertCallingConventionToLlvm ( jlm::llvm::CallingConvention  cc)

Converts the given calling convention from jlm to LLVM.

Parameters
ccthe calling convention
Returns
the same calling convention as an LLVM enum value
Exceptions
jlm::util::Errorif the calling convention is unknown

Definition at line 36 of file CallingConvention.cpp.

◆ convertCallInstruction()

static const Variable * jlm::llvm::convertCallInstruction ( const ::llvm::CallInst &  callInstruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1838 of file LlvmModuleConversion.cpp.

◆ convertCeilIntrinsic()

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

Definition at line 1329 of file LlvmModuleConversion.cpp.

◆ ConvertConstant() [1/4]

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

Definition at line 707 of file LlvmModuleConversion.cpp.

◆ ConvertConstant() [2/4]

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

Definition at line 741 of file LlvmModuleConversion.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 697 of file LlvmModuleConversion.cpp.

◆ ConvertConstant() [4/4]

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

Definition at line 684 of file LlvmModuleConversion.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 630 of file LlvmModuleConversion.cpp.

◆ ConvertControlFlowGraph()

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

Definition at line 945 of file InterProceduralGraphConversion.cpp.

◆ convertCopysignIntrinsic()

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

Definition at line 1425 of file LlvmModuleConversion.cpp.

◆ convertCtlzIntrinsic()

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

Definition at line 1479 of file LlvmModuleConversion.cpp.

◆ convertCtpopIntrinsic()

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

Definition at line 1499 of file LlvmModuleConversion.cpp.

◆ convertCttzIntrinsic()

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

Definition at line 1489 of file LlvmModuleConversion.cpp.

◆ ConvertDataNode()

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

Definition at line 1017 of file InterProceduralGraphConversion.cpp.

◆ ConvertDataNodeInitialization()

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

Definition at line 1004 of file InterProceduralGraphConversion.cpp.

◆ ConvertEnumAttribute()

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

Definition at line 356 of file LlvmModuleConversion.cpp.

◆ convertFAbsIntrinsic()

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

Definition at line 1451 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 1912 of file LlvmModuleConversion.cpp.

◆ convertFloorIntrinsic()

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

Definition at line 1356 of file LlvmModuleConversion.cpp.

◆ convertFMulAddIntrinsic()

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

Definition at line 1318 of file LlvmModuleConversion.cpp.

◆ convertFreeCall()

static const Variable * jlm::llvm::convertFreeCall ( const ::llvm::CallInst &  instruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1144 of file LlvmModuleConversion.cpp.

◆ convertFreezeInstruction()

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

Definition at line 2078 of file LlvmModuleConversion.cpp.

◆ convertFShlIntrinsic()

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

Definition at line 1374 of file LlvmModuleConversion.cpp.

◆ ConvertFunctionNode()

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

Definition at line 979 of file InterProceduralGraphConversion.cpp.

◆ convertICmpPredicateToJlm()

ICmpPredicate jlm::llvm::convertICmpPredicateToJlm ( ::llvm::CmpInst::Predicate  predicate)

Converts the given comparison predicate from an LLVM to the corresponding Jlm enum.

Exceptions
ifthe predicate is not an integer comparison predicate

Definition at line 197 of file operators.cpp.

◆ convertICmpPredicateToLlvm()

llvm::CmpInst::Predicate jlm::llvm::convertICmpPredicateToLlvm ( ICmpPredicate  predicate)

Converts the given comparison predicate from an LLVM to the corresponding Jlm enum.

Exceptions
ifthe predicate is not a valid enum value

Definition at line 204 of file operators.cpp.

◆ convertInsertValueInstruction()

static const Variable * jlm::llvm::convertInsertValueInstruction ( const ::llvm::InsertValueInst &  instruction,
tacsvector_t &  tacs,
Context &  context 
)
static

Definition at line 2023 of file LlvmModuleConversion.cpp.

◆ convertInstruction()

static const Variable * jlm::llvm::convertInstruction ( ::llvm::Instruction *  instruction,
std::vector< std::unique_ptr< ThreeAddressCode > > &  threeAddressCodes,
Context &  context 
)
static

Definition at line 2184 of file LlvmModuleConversion.cpp.

◆ ConvertIntAttribute()

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

Definition at line 364 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 1874 of file LlvmModuleConversion.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 849 of file LlvmModuleConversion.cpp.

◆ ConvertInterProceduralGraphModule() [1/2]

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

Definition at line 1194 of file InterProceduralGraphConversion.cpp.

◆ ConvertInterProceduralGraphModule() [2/2]

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

Definition at line 1220 of file InterProceduralGraphConversion.cpp.

◆ ConvertInterProceduralGraphNode()

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

Definition at line 1088 of file InterProceduralGraphConversion.cpp.

◆ convertIntrinsicInstruction()

static const Variable * jlm::llvm::convertIntrinsicInstruction ( const ::llvm::IntrinsicInst &  intrinsicInstruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1733 of file LlvmModuleConversion.cpp.

◆ convertIsConstantIntrinsic()

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

Definition at line 1508 of file LlvmModuleConversion.cpp.

◆ convertIsFPClassIntrinsic()

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

Definition at line 1520 of file LlvmModuleConversion.cpp.

◆ ConvertLlvmModule()

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

Definition at line 2639 of file LlvmModuleConversion.cpp.

◆ convertMallocCall()

static const Variable * jlm::llvm::convertMallocCall ( const ::llvm::CallInst &  instruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1118 of file LlvmModuleConversion.cpp.

◆ convertMemCpyCall()

static const Variable * jlm::llvm::convertMemCpyCall ( const ::llvm::IntrinsicInst *  instruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1185 of file LlvmModuleConversion.cpp.

◆ convertMemMoveCall()

static const Variable * jlm::llvm::convertMemMoveCall ( const ::llvm::IntrinsicInst &  instruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1269 of file LlvmModuleConversion.cpp.

◆ convertMemSetCall()

static const Variable * jlm::llvm::convertMemSetCall ( const ::llvm::IntrinsicInst &  instruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1232 of file LlvmModuleConversion.cpp.

◆ ConvertPhiInstruction()

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

Definition at line 1087 of file LlvmModuleConversion.cpp.

◆ ConvertPointerIcmpPredicate()

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

Definition at line 879 of file LlvmModuleConversion.cpp.

◆ convertPtrMaskIntrinsic()

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

Definition at line 1438 of file LlvmModuleConversion.cpp.

◆ convertRIntIntrinsic()

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

Definition at line 1338 of file LlvmModuleConversion.cpp.

◆ convertRoundIntrinsic()

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

Definition at line 1365 of file LlvmModuleConversion.cpp.

◆ convertSAddWithOverflowIntrinsic()

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

Definition at line 1533 of file LlvmModuleConversion.cpp.

◆ ConvertSelect()

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

Definition at line 482 of file InterProceduralGraphConversion.cpp.

◆ convertSMaxIntrinsic()

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

Definition at line 1385 of file LlvmModuleConversion.cpp.

◆ convertSMinIntrinsic()

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

Definition at line 1405 of file LlvmModuleConversion.cpp.

◆ convertSMulWithOverflowIntrinsic()

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

Definition at line 1572 of file LlvmModuleConversion.cpp.

◆ convertSSubWithOverflowIntrinsic()

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

Definition at line 1559 of file LlvmModuleConversion.cpp.

◆ ConvertStringAttribute()

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

Definition at line 392 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 1103 of file InterProceduralGraphConversion.cpp.

◆ convertSwitchInstruction()

static const Variable * jlm::llvm::convertSwitchInstruction ( ::llvm::SwitchInst *  switchInstruction,
tacsvector_t &  tacs,
Context &  ctx 
)
static

Definition at line 794 of file LlvmModuleConversion.cpp.

◆ ConvertThreeAddressCode()

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

Definition at line 536 of file InterProceduralGraphConversion.cpp.

◆ convertTruncIntrinsic()

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

Definition at line 1347 of file LlvmModuleConversion.cpp.

◆ ConvertTypeAttribute()

static TypeAttribute jlm::llvm::ConvertTypeAttribute ( const ::llvm::Attribute &  attribute,
TypeConverter &  typeConverter 
)
static

Definition at line 372 of file LlvmModuleConversion.cpp.

◆ convertUAddWithOverflowIntrinsic()

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

Definition at line 1546 of file LlvmModuleConversion.cpp.

◆ convertUMaxIntrinsic()

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

Definition at line 1395 of file LlvmModuleConversion.cpp.

◆ convertUMinIntrinsic()

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

Definition at line 1415 of file LlvmModuleConversion.cpp.

◆ convertUMulWithOverflowIntrinsic()

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

Definition at line 1585 of file LlvmModuleConversion.cpp.

◆ ConvertValue()

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

Definition at line 215 of file LlvmModuleConversion.cpp.

◆ ConvertValueOrFunction()

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

Definition at line 192 of file LlvmModuleConversion.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.

◆ copyDeltaElement()

static rvsdg::Output & jlm::llvm::copyDeltaElement ( const uint64_t  elementOffsetInBytes,
rvsdg::Output &  output,
rvsdg::Region &  targetRegion,
const std::shared_ptr< const rvsdg::Type > &  loadedType 
)
static

Definition at line 1154 of file StoreValueForwarding.cpp.

◆ copyDeltaRegionSlice()

static rvsdg::Output & jlm::llvm::copyDeltaRegionSlice ( rvsdg::Output &  output,
rvsdg::Region &  targetRegion 
)
static

Definition at line 1135 of file StoreValueForwarding.cpp.

◆ copyRegionSlice()

static void jlm::llvm::copyRegionSlice ( rvsdg::Region &  targetRegion,
const RegionSlice &  regionSlice,
rvsdg::SubstitutionMap &  substitutionMap 
)
static

Definition at line 1122 of file StoreValueForwarding.cpp.

◆ create_cfg()

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

Definition at line 2440 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 2605 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 2116 of file LlvmModuleConversion.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.

◆ createAliasAnalysis()

static std::unique_ptr< aa::AliasAnalysis > jlm::llvm::createAliasAnalysis ( rvsdg::RvsdgModule &  module,
util::StatisticsCollector &  statisticsCollector 
)
static

Definition at line 1589 of file StoreValueForwarding.cpp.

◆ createCall()

static const Variable * jlm::llvm::createCall ( const ::llvm::CallInst &  callInstruction,
tacsvector_t &  threeAddressCodes,
Context &  context 
)
static

Definition at line 1627 of file LlvmModuleConversion.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.

◆ createElementAllocaNodes()

static VectorNodeHashMap jlm::llvm::createElementAllocaNodes ( rvsdg::SimpleNode &  allocaNode)
static

Definition at line 499 of file AggregateAllocaSplitting.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.

◆ createNormalizer()

template<typename TOperation >
static rvsdg::NodeNormalization< TOperation > jlm::llvm::createNormalizer ( const std::vector< rvsdg::NodeNormalization< TOperation > > &  nodeNormalizations)
static

Definition at line 296 of file NodeReduction.cpp.

◆ declare_globals()

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

Definition at line 2550 of file LlvmModuleConversion.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 1187 of file CommonNodeElimination.cpp.

◆ divertInStructuralNode()

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

Definition at line 1150 of file CommonNodeElimination.cpp.

◆ divertOutput()

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

Definition at line 1135 of file CommonNodeElimination.cpp.

◆ divertUsersToMemoryHoistBarrierNode()

static void jlm::llvm::divertUsersToMemoryHoistBarrierNode ( rvsdg::Output &  output,
rvsdg::SimpleNode &  memoryHoistBarrierNode 
)
static

Definition at line 221 of file IOBarrierElimination.cpp.

◆ domtree()

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

Definition at line 91 of file domtree.cpp.

◆ emit_data_node()

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

Definition at line 66 of file print.cpp.

◆ emit_function_node()

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

Definition at line 33 of file print.cpp.

◆ emit_tacs()

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

Definition at line 23 of file print.cpp.

◆ empty()

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

Definition at line 49 of file pull.cpp.

◆ EnsureSingleInEdgeToExitNode()

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

Definition at line 2375 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.

◆ fCmpNormalizations()

static std::vector< rvsdg::NodeNormalization< FCmpOperation > > jlm::llvm::fCmpNormalizations ( { FCmpOperation::foldConstants }  )
static

◆ 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.

◆ foldBinaryOperation()

template<typename TBinOp >
static IntegerValueRepresentation jlm::llvm::foldBinaryOperation ( const IntegerValueRepresentation &  r1,
const IntegerValueRepresentation &  r2 
)
static

Definition at line 14 of file IntegerOperations.cpp.

◆ foldBinaryOperationConstants()

template<typename TBinOp >
static std::optional< std::vector< rvsdg::Output * > > jlm::llvm::foldBinaryOperationConstants ( const std::vector< rvsdg::Output * > &  operands)
static

Performs constant folding on integer binary operations.

Template Parameters
TBinOpAn integer binary operation
Parameters
operandsThe operands of the integer binary operation.
Returns
A vector with a single element if constant folding succeeded, otherwise std::nullopt.

Definition at line 77 of file IntegerOperations.cpp.

◆ foldMatchOperationWithConstant()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::foldMatchOperationWithConstant ( const rvsdg::MatchOperation &  matchOperation,
const std::vector< rvsdg::Output * > &  operands 
)

Definition at line 14 of file ControlOperations.cpp.

◆ fpBinaryOpNormalizations()

static std::vector< rvsdg::NodeNormalization< FBinaryOperation > > jlm::llvm::fpBinaryOpNormalizations ( { FBinaryOperation::foldConstants }  )
static

◆ fpExtOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< FPExtOperation > > jlm::llvm::fpExtOperationNormalizations ( { FPExtOperation::foldConstant }  )
static

◆ fpTruncOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< FPTruncOperation > > jlm::llvm::fpTruncOperationNormalizations ( { FPTruncOperation::foldConstant }  )
static

◆ get_match()

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

Definition at line 1779 of file IpGraphToLlvmConverter.cpp.

◆ getAllocationSizeInBytes() [1/2]

static std::optional< size_t > jlm::llvm::getAllocationSizeInBytes ( const rvsdg::Output &  output)
static

Definition at line 342 of file Load.cpp.

◆ getAllocationSizeInBytes() [2/2]

static std::optional< size_t > jlm::llvm::getAllocationSizeInBytes ( const rvsdg::Output &  output)
static

Definition at line 254 of file Store.cpp.

◆ getCallingConventionMap()

static const util::BijectiveMap<::llvm::CallingConv::ID, CallingConvention > & jlm::llvm::getCallingConventionMap ( )
static

Definition at line 16 of file CallingConvention.cpp.

◆ getConstant()

static rvsdg::Node * jlm::llvm::getConstant ( const rvsdg::Output &  output)
static

Definition at line 309 of file InvariantValueRedirection.cpp.

◆ getElementPtrNormalizations()

static std::vector< rvsdg::NodeNormalization< GetElementPtrOperation > > jlm::llvm::getElementPtrNormalizations ( { GetElementPtrOperation::normalizeIdempotent }  )
static

◆ GetEntryVariableBlock()

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

Definition at line 226 of file ControlFlowRestructuring.cpp.

◆ getGammaExitVariableHash()

static size_t jlm::llvm::getGammaExitVariableHash ( const rvsdg::GammaNode::ExitVar &  exitVar,
CommonNodeElimination::Context &  context 
)
static

Calculates a hash for the given exit variable, based on the congruence sets of all its branch arguments.

Parameters
exitVarthe exit variable
contextthe context of the common node elimination pass
Returns
the calculated hash
Precondition
the gamma subregions have been traversed at least once

Definition at line 748 of file CommonNodeElimination.cpp.

◆ getICmpPredicateMap()

static const util::BijectiveMap<::llvm::CmpInst::Predicate, ICmpPredicate > & jlm::llvm::getICmpPredicateMap ( )
static

Definition at line 179 of file operators.cpp.

◆ getIOStateEntryVar()

static std::optional< rvsdg::GammaNode::EntryVar > jlm::llvm::getIOStateEntryVar ( const rvsdg::GammaNode &  gammaNode)
static

Definition at line 236 of file IOBarrierElimination.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 1787 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 670 of file MemoryStateOperations.cpp.

◆ hasOnlyValueInputs()

static bool jlm::llvm::hasOnlyValueInputs ( const rvsdg::Node &  node)
static

Definition at line 189 of file NodeHoisting.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 240 of file inlining.cpp.

◆ iCmpPredicateToString()

std::string_view jlm::llvm::iCmpPredicateToString ( ICmpPredicate  predicate)

Converts the given comparison predicate to a string

Exceptions
ifthe predicate is not a valid enum value

Definition at line 211 of file operators.cpp.

◆ insertGammaExitVarInHashmap()

static void jlm::llvm::insertGammaExitVarInHashmap ( rvsdg::GammaNode::ExitVar &  exitVar,
CommonNodeElimination::Context::CongruenceSetIndex  congruenceSet,
std::unordered_map< size_t, CommonNodeElimination::Context::CongruenceSetIndex > &  leaderHashes,
CommonNodeElimination::Context &  context 
)
static

Inserts the given exitVar as a leader in the hashmap containing exit variable leaders.

Parameters
exitVarthe exit variable to insert as a leader
congruenceSetthe index of the congruence set the exit variable is leading
leaderHashesthe hashmap to add the exit variable as a leader to
contextthe context of the current common node elimination pass
Precondition
the output of the exitVar is the leader of the given congruenceSet

Definition at line 803 of file CommonNodeElimination.cpp.

◆ integerAddNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerAddOperation > > jlm::llvm::integerAddNormalizations ( { IntegerAddOperation::foldConstants }  )
static

◆ integerAndNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerAndOperation > > jlm::llvm::integerAndNormalizations ( { IntegerAndOperation::foldConstants }  )
static

◆ integerAShrNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerAShrOperation > > jlm::llvm::integerAShrNormalizations ( { IntegerAShrOperation::foldConstants }  )
static

◆ integerEqNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerEqOperation > > jlm::llvm::integerEqNormalizations ( { IntegerEqOperation::foldConstants, IntegerEqOperation::normalizeIdenticalOperands }  )
static

◆ integerLShrNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerLShrOperation > > jlm::llvm::integerLShrNormalizations ( { IntegerLShrOperation::foldConstants }  )
static

◆ integerMulNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerMulOperation > > jlm::llvm::integerMulNormalizations ( { IntegerMulOperation::foldConstants }  )
static

◆ integerNeNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerNeOperation > > jlm::llvm::integerNeNormalizations ( { IntegerNeOperation::foldConstants, IntegerNeOperation::normalizeIdenticalOperands }  )
static

◆ integerOrNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerOrOperation > > jlm::llvm::integerOrNormalizations ( { IntegerOrOperation::foldConstants, IntegerOrOperation::normalizeIdempotent }  )
static

◆ integerSDivNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSDivOperation > > jlm::llvm::integerSDivNormalizations ( { IntegerSDivOperation::foldConstants }  )
static

◆ integerSgeNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSgeOperation > > jlm::llvm::integerSgeNormalizations ( { IntegerSgeOperation::foldConstants, IntegerSgeOperation::normalizeIdenticalOperands }  )
static

◆ integerSgtNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSgtOperation > > jlm::llvm::integerSgtNormalizations ( { IntegerSgtOperation::foldConstants, IntegerSgtOperation::normalizeIdenticalOperands }  )
static

◆ integerShlNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerShlOperation > > jlm::llvm::integerShlNormalizations ( { IntegerShlOperation::foldConstants }  )
static

◆ integerSleNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSleOperation > > jlm::llvm::integerSleNormalizations ( { IntegerSleOperation::foldConstants, IntegerSleOperation::normalizeIdenticalOperands }  )
static

◆ integerSltNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSltOperation > > jlm::llvm::integerSltNormalizations ( { IntegerSltOperation::foldConstants, IntegerSltOperation::normalizeIdenticalOperands }  )
static

◆ integerSRemNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSRemOperation > > jlm::llvm::integerSRemNormalizations ( { IntegerSRemOperation::foldConstants }  )
static

◆ integerSubNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerSubOperation > > jlm::llvm::integerSubNormalizations ( { IntegerSubOperation::normalizeAdditiveInverse, IntegerSubOperation::foldConstants }  )
static

◆ integerUDivNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerUDivOperation > > jlm::llvm::integerUDivNormalizations ( { IntegerUDivOperation::foldConstants }  )
static

◆ integerUgeNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerUgeOperation > > jlm::llvm::integerUgeNormalizations ( { IntegerUgeOperation::foldConstants, IntegerUgeOperation::normalizeIdenticalOperands }  )
static

◆ integerUgtNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerUgtOperation > > jlm::llvm::integerUgtNormalizations ( { IntegerUgtOperation::foldConstants, IntegerUgtOperation::normalizeIdenticalOperands }  )
static

◆ integerUleNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerUleOperation > > jlm::llvm::integerUleNormalizations ( { IntegerUleOperation::foldConstants, IntegerUleOperation::normalizeIdenticalOperands }  )
static

◆ integerUltNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerUltOperation > > jlm::llvm::integerUltNormalizations ( { IntegerUltOperation::foldConstants, IntegerUltOperation::normalizeIdenticalOperands }  )
static

◆ integerURemNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerURemOperation > > jlm::llvm::integerURemNormalizations ( { IntegerURemOperation::foldConstants }  )
static

◆ integerXorNormalizations()

static std::vector< rvsdg::NodeNormalization< IntegerXorOperation > > jlm::llvm::integerXorNormalizations ( { IntegerXorOperation::foldConstants }  )
static

◆ 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.

◆ invertMatchOperation()

static std::unique_ptr< rvsdg::MatchOperation > jlm::llvm::invertMatchOperation ( const rvsdg::MatchOperation &  matchOperation)
static

Inverts the control values of a rvsdg::MatchOperation with 2 alternatives.

Parameters
matchOperationThe rvsdg::MatchOperation for which to invert the control values.
Returns
A new rvsdg::MatchOperation where the control values are inverted.

Definition at line 250 of file ControlFlowRestructuring.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 215 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_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 309 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_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 57 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 104 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 83 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 137 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 77 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 63 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 45 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 275 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 531 of file types.hpp.

◆ isAllocationSide()

static bool jlm::llvm::isAllocationSide ( rvsdg::Output &  output)
static

Definition at line 286 of file operators.cpp.

◆ 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.

◆ isFreeCall()

static bool jlm::llvm::isFreeCall ( const ::llvm::CallInst &  callInstruction)
static

Definition at line 1311 of file LlvmModuleConversion.cpp.

◆ isLoadNonVolatileMemoryStateOutput()

static bool jlm::llvm::isLoadNonVolatileMemoryStateOutput ( const rvsdg::Output &  output)
static

Definition at line 177 of file DeadNodeElimination.cpp.

◆ isMallocCall()

static bool jlm::llvm::isMallocCall ( const ::llvm::CallInst &  callInstruction)
static

Definition at line 1304 of file LlvmModuleConversion.cpp.

◆ IsOrContains()

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

Definition at line 501 of file types.hpp.

◆ isOutputOf()

template<typename TOperation >
static bool jlm::llvm::isOutputOf ( rvsdg::Output &  operand)
static

Definition at line 279 of file operators.cpp.

◆ 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 71 of file pull.cpp.

◆ isVectorOf()

template<class T >
bool jlm::llvm::isVectorOf ( const rvsdg::Type &  type)

Checks if type is a vector of type T.

Template Parameters
TThe element type of the vector.
Parameters
typeThe type to check.
Returns
True, if it is a vector of type T, otherwise false.

Definition at line 545 of file types.hpp.

◆ isVectorOfSize()

template<class T >
bool jlm::llvm::isVectorOfSize ( const rvsdg::Type &  type,
const size_t  size 
)

Checks if type is a vector of type T with size size.

Template Parameters
TThe element type of the vector.
Parameters
typeThe type to check.
sizeThe size of the vector.
Returns
True, if it is a vector of type T, otherwise false.

Definition at line 565 of file types.hpp.

◆ IsVolatile()

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

In LLVM, the memcpy/memset 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/memset instruction. This function takes this argument and converts it to a boolean flag.

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

Definition at line 1173 of file LlvmModuleConversion.cpp.

◆ lambdaExitMemoryStateMergeNormalizations()

◆ limitTargetRegion()

static rvsdg::Region & jlm::llvm::limitTargetRegion ( const rvsdg::Node &  node,
rvsdg::Region &  targetRegion 
)
static

Definition at line 201 of file NodeHoisting.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.

◆ loadNonVolatileNormalizations()

◆ lookupOrInsertGammaExitVarInHashmap()

static void jlm::llvm::lookupOrInsertGammaExitVarInHashmap ( const rvsdg::GammaNode::ExitVar &  exitVar,
const rvsdg::GammaNode &  gamma,
std::unordered_map< size_t, CommonNodeElimination::Context::CongruenceSetIndex > &  leaderHashes,
CommonNodeElimination::Context &  context 
)
static

Tries to find an existing exit variable in the hashmap of exit variable leaders, that is congruent with the given exitVar. If one is found, the exitVar is registered as a follower of the existing leader.

If no existing match is found, the exitVar becomes the leader of its own congruence set, and is added to the hashmap of leaders.

Parameters
exitVarthe exit variable to lookup matches for
gammathe gamma node the exit variable belongs to
leaderHashesthe hashmap containing existing leaders, and possibly add a new leader to
contextthe context of the current common node elimination pass

Definition at line 837 of file CommonNodeElimination.cpp.

◆ mapStateOutputToInput()

static rvsdg::Input * jlm::llvm::mapStateOutputToInput ( rvsdg::Output &  output)
static

Definition at line 359 of file NodeHoisting.cpp.

◆ mapToLlvmFltSemantics()

static const ::llvm::fltSemantics & jlm::llvm::mapToLlvmFltSemantics ( const fpsize  size)
static

Definition at line 213 of file ConversionOperations.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. Exit variables can either be congruent with gamma inputs if the output is gamma-invariant, or be congruent with another exit variable.

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

Definition at line 877 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 561 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 353 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 372 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 1105 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 479 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 428 of file CommonNodeElimination.cpp.

◆ markStructuralNode()

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

Definition at line 1058 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 651 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 953 of file CommonNodeElimination.cpp.

◆ matchOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< rvsdg::MatchOperation > > jlm::llvm::matchOperationNormalizations ( { foldMatchOperationWithConstant }  )
static

◆ memoryHoistBarrierNormalizations()

static std::vector< rvsdg::NodeNormalization< MemoryHoistBarrierOperation > > jlm::llvm::memoryHoistBarrierNormalizations ( { MemoryHoistBarrierOperation::normalizeNestedMemoryHoistBarriers }  )
static

◆ memoryStateJoinNormalizations()

◆ memoryStateMergeNormalizations()

◆ memoryStateSplitNormalizations()

◆ normalizeIdenticalOperands()

static std::optional< std::vector< rvsdg::Output * > > jlm::llvm::normalizeIdenticalOperands ( const std::vector< rvsdg::Output * > &  operands,
const std::int64_t  result 
)
static

Definition at line 109 of file IntegerOperations.cpp.

◆ ntacs() [1/3]

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

Definition at line 502 of file aggregation.cpp.

◆ ntacs() [2/3]

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

Definition at line 347 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 585 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 2313 of file LlvmModuleConversion.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 144 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 174 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 209 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 125 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 106 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 90 of file Store.cpp.

◆ postorder()

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

Definition at line 283 of file cfg.cpp.

◆ print() [1/3]

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

Definition at line 120 of file print.cpp.

◆ print() [2/3]

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

Definition at line 63 of file print.hpp.

◆ print() [3/3]

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

Definition at line 42 of file print.hpp.

◆ print_ascii()

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

Definition at line 27 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.

◆ ptrCmpNormalizations()

◆ pull() [1/3]

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

Definition at line 326 of file pull.cpp.

◆ pull() [2/3]

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

Definition at line 369 of file pull.cpp.

◆ pull() [3/3]

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

Definition at line 385 of file pull.cpp.

◆ pullin_node()

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

Definition at line 87 of file pull.cpp.

◆ pullin_top()

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

Definition at line 135 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 280 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 340 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()

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.

◆ reduceLoop()

static void jlm::llvm::reduceLoop ( 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.

◆ reduceSimpleNode()

template<class TOperation >
static bool jlm::llvm::reduceSimpleNode ( rvsdg::SimpleNode &  simpleNode,
const std::vector< rvsdg::NodeNormalization< TOperation > > &  normalizations,
size_t &  counter 
)
static

Definition at line 306 of file NodeReduction.cpp.

◆ reduceStaticallyKnownPredicate()

bool jlm::llvm::reduceStaticallyKnownPredicate ( rvsdg::GammaNode &  gammaNode)

Reduces a gamma node with a statically known predicate to the respective subregion determined by the value of the predicate.

c = gamma 0 [] x = 45 [c <= x] [] y = 37 [c <= y] ... = add c + 5 => c = 45 ... = add c + 5

Parameters
gammaNodeA gamma node that is supposed to be reduced.
Returns
True, if transformation was successful, otherwise false.

Definition at line 15 of file Gamma.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 463 of file InterProceduralGraphConversion.cpp.

◆ RestructureBranches() [1/2]

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

Definition at line 580 of file ControlFlowRestructuring.cpp.

◆ RestructureBranches() [2/2]

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

Definition at line 484 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlow() [1/2]

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

Definition at line 598 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlow() [2/2]

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

Definition at line 588 of file ControlFlowRestructuring.cpp.

◆ RestructureControlFlowGraph()

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

Definition at line 860 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 568 of file ControlFlowRestructuring.cpp.

◆ RestructureLoops() [2/2]

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

Definition at line 316 of file ControlFlowRestructuring.cpp.

◆ reverse_postorder()

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

Definition at line 314 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 105 of file inlining.cpp.

◆ RunInvariantValueRedirection()

static void jlm::llvm::RunInvariantValueRedirection ( jlm::llvm::LlvmRvsdgModule &  rvsdgModule)
static

Definition at line 32 of file InvariantValueRedirectionTests.cpp.

◆ runIOBarrierElimination()

static void jlm::llvm::runIOBarrierElimination ( LlvmRvsdgModule &  rvsdgModule)
static

Definition at line 26 of file IOBarrierEliminationTests.cpp.

◆ selectMemoryHoistBarrierNode()

static std::optional< rvsdg::SimpleNode * > jlm::llvm::selectMemoryHoistBarrierNode ( const std::vector< rvsdg::SimpleNode * > &  hoistBarrierNodes,
const std::variant< rvsdg::Node *, rvsdg::Region * >  ioStateOwner 
)
static

Definition at line 207 of file IOBarrierElimination.cpp.

◆ sextOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< SExtOperation > > jlm::llvm::sextOperationNormalizations ( { SExtOperation::foldConstant }  )
static

◆ shouldIgnoreIntrinsic()

static bool jlm::llvm::shouldIgnoreIntrinsic ( ::llvm::Intrinsic::ID  intrinsicId)
static

Checks if the intrinsic with the given ID should be ignored in the frontend. Calls to ignored intrinsics become no-ops, and declarations of ignored intrisincs are skipped.

Parameters
intrinsicIdthe id of the llvm intrinsic
Returns
true if the intrinsic should be ignored, false otherwise

Definition at line 1707 of file LlvmModuleConversion.cpp.

◆ storeNonVolatileNormalizations()

◆ 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.

◆ TEST() [1/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
EmptyTheta   
)

Definition at line 672 of file CommonNodeEliminationTests.cpp.

◆ TEST() [2/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
GammaInTheta   
)

Creates a graph with a gamma node inside a theta node, that looks like:

         10
         /\
        V  V

+-----------------—+ | CTRL(0) | | | | V V V | | +----—+----—+ | | | \ | / | | | | V | V | | | +----—+----—+ | | V | | USER1 | | \ | | CTRL(0) | 7 | | V V V | +-----------------—+

After performing CNE, the USER1 should still take its value from the gamma node, and not be re-routed to one of the loop variables, despite the loop variables appearing congruent in the first iteration.

Definition at line 716 of file CommonNodeEliminationTests.cpp.

◆ TEST() [3/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
InvariantLoopOutputs   
)

Creates RVSDG that looks like

   undef   0   undef
      |    |    |
      v    v    v

+-theta------------------—+ | v v v | | CTR(0) |-----—\ | | v v | | | +-gamma—+-----—+ | | | | v | v | | | | | | | | | | | | | v | v | | | | +------—+-----—+ | | | v | | | /| /-—/ | | /-/ | | | | CTR(0) / | | | | v v v v | +------------------------—+ v v v export(x) | export(z) v export(y)

After running CNE, the exports "x", "y" and "z" should all take their value directly from the constant 0.

Definition at line 887 of file CommonNodeEliminationTests.cpp.

◆ TEST() [4/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
InvariantThetaInTheta   
)

Creates an RVSDG graph corresponding to the C code:

int f() {
int x = 0;
int y = 0;
do {
int z = 5;
do {
// z and y are routed through this inner loop
} while(0);
x += 1;
y += 2;
} while(y < 10);
return y;
}

The RVSDG looks like this:

zero := IntegerConstant(0) xOut0, yOut0 = theta zero, zero [xPre0, yPre0] { five = IntegerConstant(5); zOut1, yOut1 = theta five, yPre0 [zPre1, yPre1] { predicate1 = CTRL(0) } [predicate1, zPre1, yPre1]

one = IntegerConstant(1) xPlus1 = IntegerAdd xPre0, one

two = IntegerConstant(2) yPlus2 = IntegerAdd yOut1, two

ten = IntegerConstant(10) slt = signedLessThan xPlus1, ten predicate0 = MATCH[1->1, 0] slt }[predicate0, xPlus1, yPlus2]

The test performs common node elimination on the code, which should route value of y around the inner theta, without mixing up x and y in the outer theta.

Definition at line 781 of file CommonNodeEliminationTests.cpp.

◆ TEST() [5/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
MultipleThetas   
)

Definition at line 485 of file CommonNodeEliminationTests.cpp.

◆ TEST() [6/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
MultipleThetasPassthrough   
)

Definition at line 535 of file CommonNodeEliminationTests.cpp.

◆ TEST() [7/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_gamma   
)

Definition at line 74 of file CommonNodeEliminationTests.cpp.

◆ TEST() [8/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_gamma_congruent_exit_vars   
)

Creates an RVSDG graph that looks like c := GraphImport("c") // ControlType(2) a := GraphImport("a") // ValueType b := GraphImport("b") // ValueType a2, b2, x, y, z := gamma c, a, b [_, a0 <- a, b0 <- b] { } [a0 -> a2, b0 -> b2, a0 -> x, a0 -> y, b0 -> z] [_, a1 <- a, b1 <- b] { } [a1 -> a2, b1 -> b2, b1 -> x, b1 -> y, a1 -> z] GraphExport(a2) GraphExport(b2) GraphExport(x) GraphExport(y) GraphExport(z)

and checks the result of running CommonNodeElimination.

The exports of a2 and b2 should be redirected directly to the respective imports, while x and y should be merged into a single output. The z graph export should be left alone, as it is unique and non-invariant.

Definition at line 136 of file CommonNodeEliminationTests.cpp.

◆ TEST() [9/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_lambda   
)

Definition at line 580 of file CommonNodeEliminationTests.cpp.

◆ TEST() [10/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_phi   
)

Definition at line 618 of file CommonNodeEliminationTests.cpp.

◆ TEST() [11/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_simple   
)

Definition at line 29 of file CommonNodeEliminationTests.cpp.

◆ TEST() [12/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_theta   
)

Definition at line 213 of file CommonNodeEliminationTests.cpp.

◆ TEST() [13/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_theta2   
)

Definition at line 263 of file CommonNodeEliminationTests.cpp.

◆ TEST() [14/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_theta3   
)

Definition at line 308 of file CommonNodeEliminationTests.cpp.

◆ TEST() [15/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_theta4   
)

Definition at line 381 of file CommonNodeEliminationTests.cpp.

◆ TEST() [16/104]

jlm::llvm::TEST ( CommonNodeEliminationTests  ,
test_theta5   
)

Definition at line 436 of file CommonNodeEliminationTests.cpp.

◆ TEST() [17/104]

jlm::llvm::TEST ( ControlOperationsTests  ,
foldConstants   
)

Definition at line 17 of file ControlOperationsTests.cpp.

◆ TEST() [18/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
fpExtConstantFolding   
)

Definition at line 153 of file ConversionOperationsTests.cpp.

◆ TEST() [19/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
fpTruncConstantFolding   
)

Definition at line 198 of file ConversionOperationsTests.cpp.

◆ TEST() [20/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
FunctionToPointerInversion   
)

Definition at line 231 of file ConversionOperationsTests.cpp.

◆ TEST() [21/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
PointerToFunctionInversion   
)

Definition at line 283 of file ConversionOperationsTests.cpp.

◆ TEST() [22/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
SExtConstantFolding   
)

Definition at line 19 of file ConversionOperationsTests.cpp.

◆ TEST() [23/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
TruncConstantFolding   
)

Definition at line 107 of file ConversionOperationsTests.cpp.

◆ TEST() [24/104]

jlm::llvm::TEST ( ConversionOperationsTests  ,
ZExtConstantFolding   
)

Definition at line 63 of file ConversionOperationsTests.cpp.

◆ TEST() [25/104]

jlm::llvm::TEST ( FBinaryOperationTests  ,
testFoldConstants   
)

Definition at line 369 of file OperatorsTests.cpp.

◆ TEST() [26/104]

jlm::llvm::TEST ( FCmpOperationTests  ,
testFoldConstants   
)

Definition at line 253 of file OperatorsTests.cpp.

◆ TEST() [27/104]

jlm::llvm::TEST ( GammaTests  ,
test_predicate_reduction   
)

Definition at line 16 of file GammaTests.cpp.

◆ TEST() [28/104]

jlm::llvm::TEST ( GetElemenPtrOperationTests  ,
typeChecks   
)

Definition at line 16 of file GetElementPtrTests.cpp.

◆ TEST() [29/104]

jlm::llvm::TEST ( GetElementPtrOperationTests  ,
TestOperationEquality   
)

Definition at line 88 of file GetElementPtrTests.cpp.

◆ TEST() [30/104]

jlm::llvm::TEST ( GetElementPtrTests  ,
normalizeIdempotentReduction   
)

Definition at line 208 of file GetElementPtrTests.cpp.

◆ TEST() [31/104]

jlm::llvm::TEST ( GetElementPtrTests  ,
TestGetElementPtrOperationConstant_OffestInBytes   
)

Definition at line 176 of file GetElementPtrTests.cpp.

◆ TEST() [32/104]

jlm::llvm::TEST ( GetElementPtrTests  ,
TryGetAsConstantTest   
)

Definition at line 130 of file GetElementPtrTests.cpp.

◆ TEST() [33/104]

jlm::llvm::TEST ( IntegerAddOperationTest  ,
foldConstants   
)

Definition at line 238 of file IntegerOperationsTests.cpp.

◆ TEST() [34/104]

jlm::llvm::TEST ( IntegerAndOperationTest  ,
foldConstants   
)

Definition at line 226 of file IntegerOperationsTests.cpp.

◆ TEST() [35/104]

jlm::llvm::TEST ( IntegerAShrOperationTest  ,
foldConstants   
)

Definition at line 280 of file IntegerOperationsTests.cpp.

◆ TEST() [36/104]

jlm::llvm::TEST ( IntegerEqOperationTest  ,
foldConstants   
)

Definition at line 110 of file IntegerOperationsTests.cpp.

◆ TEST() [37/104]

jlm::llvm::TEST ( IntegerEqOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 338 of file IntegerOperationsTests.cpp.

◆ TEST() [38/104]

jlm::llvm::TEST ( IntegerLShrOperationTest  ,
foldConstants   
)

Definition at line 292 of file IntegerOperationsTests.cpp.

◆ TEST() [39/104]

jlm::llvm::TEST ( IntegerMulOperationTest  ,
foldConstants   
)

Definition at line 250 of file IntegerOperationsTests.cpp.

◆ TEST() [40/104]

jlm::llvm::TEST ( IntegerNeOperationTest  ,
foldConstants   
)

Definition at line 116 of file IntegerOperationsTests.cpp.

◆ TEST() [41/104]

jlm::llvm::TEST ( IntegerNeOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 343 of file IntegerOperationsTests.cpp.

◆ TEST() [42/104]

jlm::llvm::TEST ( IntegerOrOperationTest  ,
foldConstants   
)

Definition at line 170 of file IntegerOperationsTests.cpp.

◆ TEST() [43/104]

jlm::llvm::TEST ( IntegerOrOperationTest  ,
normalizeIdempotent   
)

Definition at line 177 of file IntegerOperationsTests.cpp.

◆ TEST() [44/104]

jlm::llvm::TEST ( IntegerSDivOperationTest  ,
foldConstants   
)

Definition at line 256 of file IntegerOperationsTests.cpp.

◆ TEST() [45/104]

jlm::llvm::TEST ( IntegerSgeOperationTest  ,
foldConstants   
)

Definition at line 122 of file IntegerOperationsTests.cpp.

◆ TEST() [46/104]

jlm::llvm::TEST ( IntegerSgeOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 348 of file IntegerOperationsTests.cpp.

◆ TEST() [47/104]

jlm::llvm::TEST ( IntegerSgtOperationTest  ,
foldConstants   
)

Definition at line 128 of file IntegerOperationsTests.cpp.

◆ TEST() [48/104]

jlm::llvm::TEST ( IntegerSgtOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 353 of file IntegerOperationsTests.cpp.

◆ TEST() [49/104]

jlm::llvm::TEST ( IntegerShlOperationTest  ,
foldConstants   
)

Definition at line 286 of file IntegerOperationsTests.cpp.

◆ TEST() [50/104]

jlm::llvm::TEST ( IntegerSleOperationTest  ,
foldConstants   
)

Definition at line 134 of file IntegerOperationsTests.cpp.

◆ TEST() [51/104]

jlm::llvm::TEST ( IntegerSleOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 358 of file IntegerOperationsTests.cpp.

◆ TEST() [52/104]

jlm::llvm::TEST ( IntegerSltOperationTest  ,
foldConstants   
)

Definition at line 140 of file IntegerOperationsTests.cpp.

◆ TEST() [53/104]

jlm::llvm::TEST ( IntegerSltOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 363 of file IntegerOperationsTests.cpp.

◆ TEST() [54/104]

jlm::llvm::TEST ( IntegerSRemOperationTest  ,
foldConstants   
)

Definition at line 268 of file IntegerOperationsTests.cpp.

◆ TEST() [55/104]

jlm::llvm::TEST ( IntegerSubOperationTest  ,
foldConstants   
)

Definition at line 244 of file IntegerOperationsTests.cpp.

◆ TEST() [56/104]

jlm::llvm::TEST ( IntegerSubOperationTests  ,
normalizeAdditiveInverse   
)

Definition at line 298 of file IntegerOperationsTests.cpp.

◆ TEST() [57/104]

jlm::llvm::TEST ( IntegerUDivOperationTest  ,
foldConstants   
)

Definition at line 262 of file IntegerOperationsTests.cpp.

◆ TEST() [58/104]

jlm::llvm::TEST ( IntegerUgeOperationTest  ,
foldConstants   
)

Definition at line 146 of file IntegerOperationsTests.cpp.

◆ TEST() [59/104]

jlm::llvm::TEST ( IntegerUgeOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 368 of file IntegerOperationsTests.cpp.

◆ TEST() [60/104]

jlm::llvm::TEST ( IntegerUgtOperationTest  ,
foldConstants   
)

Definition at line 152 of file IntegerOperationsTests.cpp.

◆ TEST() [61/104]

jlm::llvm::TEST ( IntegerUgtOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 373 of file IntegerOperationsTests.cpp.

◆ TEST() [62/104]

jlm::llvm::TEST ( IntegerUleOperationTest  ,
foldConstants   
)

Definition at line 158 of file IntegerOperationsTests.cpp.

◆ TEST() [63/104]

jlm::llvm::TEST ( IntegerUltOperationTest  ,
foldConstants   
)

Definition at line 164 of file IntegerOperationsTests.cpp.

◆ TEST() [64/104]

jlm::llvm::TEST ( IntegerUltOperationTests  ,
normalizeIdenticalOperands   
)

Definition at line 378 of file IntegerOperationsTests.cpp.

◆ TEST() [65/104]

jlm::llvm::TEST ( IntegerURemOperationTest  ,
foldConstants   
)

Definition at line 274 of file IntegerOperationsTests.cpp.

◆ TEST() [66/104]

jlm::llvm::TEST ( IntegerXorOperationTest  ,
foldConstants   
)

Definition at line 232 of file IntegerOperationsTests.cpp.

◆ TEST() [67/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestCall   
)

Definition at line 506 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [68/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestCallWithDifferentExternalCompression   
)

This test creates a situation where a caller and callee have compressed some memory nodes into the memory state belonging to the external memory. The caller has compressed memory node 3 into external, while the callees have compressed 2 into external.

// callee0 does something to mem0 callee0 = lambda [io, mem] { mem0, mem1, mem3 = LambdaEntrySplit{0, 1, 3} mem mem00 = TestOperation mem0 memMerged = LambdaExitMerge{0, 1, 3} mem00, mem1, mem3 } [io, memMerged]

// callee3 does something to mem3 callee3 = lambda [io, mem] { mem0, mem1, mem3 = LambdaEntrySplit{0, 1, 3} mem mem03 = TestOperation mem3 memMerged = LambdaExitMerge{0, 1, 3} mem0, mem1, mem03 } [io, memMerged]

caller = lambda [io, mem] { mem0, mem1, mem2 = LambdaEntrySplit{0, 1, 2} mem

// calling callee0 callMergedA = CallEntryMerge{0, 1, 2} mem0, mem1, mem2 io, returnMemA = call callee0 io callMergedA mem00, mem01, mem02 = CallExitSplit{0, 1, 2} returnMemA

// calling callee3 callMergedB = CallEntryMerge{0, 1, 2} mem00, mem01, mem02 io, returnMemB = call callee3 io callMergedB mem10, mem11, mem12 = CallExitSplit{0, 1, 2} returnMemB

memMerged = LambdaExitMerge{0, 1, 2} mem10, mem11, mem12 } [io, memMerged]

After InvariantValueRedirection, memory node 1 should be routed around both calls. Memory node 2 should only be routed around the call to callee3. Memory node 0 should not be routed around anything.

Definition at line 860 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [69/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestCallWithMemoryStateNodes   
)

Creates an RVSDG that looks like

test1 = lambda [c:CTRL(2), x:ValueType, io, mem] { mem1, mem2 = LambdaEntrySplit{1, 2} mem // A gamma that routes the values through in both regions x2, mem3, mem4 = gamma c x mem1, mem2 [_, x, mem1, mem2] { }[x, mem1, mem2] [_, x, mem1, mem2] { }[x, mem1, mem2] memMerged = LambdaExitMerge{1, 2} mem3, mem4 } [x2, io, memMerged]

test2 = lambda [test1 <- test1, x:ValueType, io, mem] { mem1, mem2 = LambdaEntrySplit{1, 2} mem callMerged = CallEntryMerge{1, 2} mem1, mem2 c = CTRL(0) x2, io, returnMem = call test1 c x io callMerged mem3, mem4 = CallExitSplit{2, 1} returnMem memMerged = LambdaExitMerge{2, 1} mem3, mem4 } [x2, io, memMerged]

After InvariantValueRedirection, the LambdaExitMerge in test2 should be directly connected to the LambdaEntrySplit in test2, with the correct memory node indices matching up.

The test uses memory node indices 1 and 2, since 0 is reserved for the external node.

Definition at line 593 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [70/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestCallWithMissingMemoryStateNodes   
)

Definition at line 739 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [71/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestGamma   
)

Definition at line 44 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [72/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testGammaControlConstantRedirection_Failure   
)

Definition at line 163 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [73/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testGammaControlConstantRedirection_Success   
)

Definition at line 92 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [74/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testGammaIntegerConstantRedirection_Failure   
)

Definition at line 305 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [75/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testGammaIntegerConstantRedirection_Success   
)

Definition at line 231 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [76/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestLambdaCallArgumentMismatch   
)

Definition at line 1050 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [77/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testLoadWithDeadLoadedValue   
)

Definition at line 1148 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [78/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
TestTheta   
)

Definition at line 376 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [79/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testThetaConstantRedirection   
)

Definition at line 427 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [80/104]

jlm::llvm::TEST ( InvariantValueRedirectionTests  ,
testThetaGammaRedirection   
)

Definition at line 1069 of file InvariantValueRedirectionTests.cpp.

◆ TEST() [81/104]

jlm::llvm::TEST ( IOBarrierElimination  ,
testStoreMarking   
)

Definition at line 623 of file IOBarrierEliminationTests.cpp.

◆ TEST() [82/104]

jlm::llvm::TEST ( IOBarrierEliminationTest  ,
testNormalizeation   
)

Definition at line 550 of file IOBarrierEliminationTests.cpp.

◆ TEST() [83/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testGamma   
)

Definition at line 221 of file IOBarrierEliminationTests.cpp.

◆ TEST() [84/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testInvidiualIOBarrierUserRerouting   
)

Definition at line 161 of file IOBarrierEliminationTests.cpp.

◆ TEST() [85/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testLambdaArgument   
)

Definition at line 34 of file IOBarrierEliminationTests.cpp.

◆ TEST() [86/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testLoadsInGammaNoReturn   
)

Definition at line 442 of file IOBarrierEliminationTests.cpp.

◆ TEST() [87/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testNormalizationFromLoadedAddress   
)

Definition at line 692 of file IOBarrierEliminationTests.cpp.

◆ TEST() [88/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testOnlyLoadsInGamma   
)

Definition at line 291 of file IOBarrierEliminationTests.cpp.

◆ TEST() [89/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testOnlyLoadsInGammaFailure   
)

Definition at line 381 of file IOBarrierEliminationTests.cpp.

◆ TEST() [90/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testSizeIsRespected   
)

Definition at line 71 of file IOBarrierEliminationTests.cpp.

◆ TEST() [91/104]

jlm::llvm::TEST ( IOBarrierEliminationTests  ,
testSuccess   
)

Definition at line 116 of file IOBarrierEliminationTests.cpp.

◆ TEST() [92/104]

jlm::llvm::TEST ( MemoryHoistBarrierTests  ,
normalizeNestedMemoryHoistBarriers   
)

Definition at line 18 of file IOBarrierTests.cpp.

◆ TEST() [93/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
controlConstants   
)

Creates an RVSDG that looks like

+-lambda--------------------—x-x-+ | undef | | | | v | | | | +-theta--—x-----—+ | | | | | | | | | | | Ctrl(0) Ctrl(1) | | | | | | v v | | | | | +—x----—x-----—+ | | | | v | | | | +-gamma1-—+--------—+ | | | | | | | | | | | | Ctrl(1) | Ctrl(0) | | | | | | v | v | | | | | +-—x---—+--—x--—+ | | | | v | | | | +-gamma2-—+--------—+ | | | | | | | | | | | | Int32(3) | Int32(7) | | | | | | v | v | | | | | +-—x---—+--—x--—+ | | | | v v v | +---—x--------------------—x-x-+

and checks that none of the control constants are moved by the node hoisting pass.

Definition at line 375 of file NodeHoistingTests.cpp.

◆ TEST() [94/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
hoistLoadNodeOutOfGammaInTheta   
)

Definition at line 700 of file NodeHoistingTests.cpp.

◆ TEST() [95/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
hoistLoadNodesOutOfGamma   
)

Definition at line 496 of file NodeHoistingTests.cpp.

◆ TEST() [96/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
hoistLoadNodesOutofNestedGamma   
)

Definition at line 576 of file NodeHoistingTests.cpp.

◆ TEST() [97/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
invariantMemoryOperation   
)

Definition at line 240 of file NodeHoistingTests.cpp.

◆ TEST() [98/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
nestedGamma   
)

Definition at line 92 of file NodeHoistingTests.cpp.

◆ TEST() [99/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
simpleGamma   
)

Definition at line 28 of file NodeHoistingTests.cpp.

◆ TEST() [100/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
simpleTheta   
)

Definition at line 172 of file NodeHoistingTests.cpp.

◆ TEST() [101/104]

jlm::llvm::TEST ( NodeHoistingTests  ,
statefulOperations   
)

Definition at line 298 of file NodeHoistingTests.cpp.

◆ TEST() [102/104]

jlm::llvm::TEST ( NodeReductionTests  ,
MultipleReductionsPerRegion   
)

Definition at line 25 of file NodeReductionTests.cpp.

◆ TEST() [103/104]

jlm::llvm::TEST ( PtrCmpOperationTests  ,
testNormalizeIdenticalOperands   
)

Definition at line 238 of file OperatorsTests.cpp.

◆ TEST() [104/104]

jlm::llvm::TEST ( PtrCmpOperationTests  ,
testNormalizeNullPointerComparison   
)

Definition at line 68 of file OperatorsTests.cpp.

◆ TestFoldConstants()

template<typename Operation >
static void jlm::llvm::TestFoldConstants ( const FoldConstantsTestInput &  input)
static

Definition at line 33 of file IntegerOperationsTests.cpp.

◆ testNormalizeIdenticalOperands()

template<typename Operation >
static void jlm::llvm::testNormalizeIdenticalOperands ( const std::uint64_t  expected)
static

Definition at line 71 of file IntegerOperationsTests.cpp.

◆ testPtrCmpNormalizeIdenticalOperands()

template<ICmpPredicate Predicate>
static void jlm::llvm::testPtrCmpNormalizeIdenticalOperands ( const std::uint64_t  expected)
static

Definition at line 24 of file OperatorsTests.cpp.

◆ to_str() [1/4]

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

Definition at line 54 of file print.hpp.

◆ to_str() [2/4]

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

Definition at line 99 of file print.cpp.

◆ to_str() [3/4]

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

Definition at line 79 of file print.cpp.

◆ to_str() [4/4]

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

Definition at line 36 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.

◆ TraceAllPointerOrigins()

bool jlm::llvm::TraceAllPointerOrigins ( TracedPointerOrigin  p,
TraceCollection &  traceCollection,
size_t  maxTraceCollectionSize 
)

Traces to find all possible origins of the given pointer. Traces through GetElementPtrOperation, including those with offsets that are not known at compile time. Also traces through gamma and theta nodes, building a set of multiple possibilities. Tracing stops at "top origins", for example an AllocaOperation, a LoadNonVolatileOperation, the return value of a CallOperation etc.

Parameters
pthe pointer to trace from
traceCollectionthe collection of trace points being created
maxTraceCollectionSizethe number of outputs a pointer can be traced to before giving up
Returns
false if the trace collection reached its maximum allowed size, and tracing aborted

Definition at line 353 of file Trace.cpp.

◆ traceAllPointerOriginsInternal()

static bool jlm::llvm::traceAllPointerOriginsInternal ( const rvsdg::Output *  basePointer,
std::optional< int64_t >  offsetInBytes,
TraceCollection &  traceCollection,
const size_t  maxTraceCollectionSize 
)
static

Definition at line 211 of file Trace.cpp.

◆ traceOutput() [1/2]

const rvsdg::Output & jlm::llvm::traceOutput ( const rvsdg::Output &  output,
bool  mayEnterSubregions,
const rvsdg::Region *  withinRegion = nullptr 
)
inline

Definition at line 94 of file Trace.hpp.

◆ traceOutput() [2/2]

rvsdg::Output & jlm::llvm::traceOutput ( rvsdg::Output &  output,
bool  mayEnterSubregions,
const rvsdg::Region *  withinRegion = nullptr 
)

Traces the origin of the given output to find the origin of the value. The optional parameter withinRegion prevents values from being traced out of the region. If it is a nullptr, tracing will continue until the output no longer changes. Traces through everything handled by jlm::rvsdg::traceOutput, with the addition of LLVM-specific operations.

Parameters
outputthe output to start tracing from
mayEnterSubregionsif true, the result can be in a sub/sibling region
withinRegionthe region to stop at (if any).
Returns
the maximally traced output

Definition at line 84 of file Trace.cpp.

◆ TracePointerOriginPrecise()

TracedPointerOrigin jlm::llvm::TracePointerOriginPrecise ( const rvsdg::Output &  p)

Returns the result of tracing the origin of p as far as possible, without tracing through operations that add an unknown offsets, or add multiple possible origins. Since the pointer has exactly one possible origin with a statically known offset, it may be possible to give MustAlias responses. If not, more extensive tracing can be performed using TraceAllPointerOrigins.

Parameters
pthe pointer value to trace
Returns
the TracedPointer for p, which is guaranteed to have a defined offset

Definition at line 180 of file Trace.cpp.

◆ truncOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< TruncOperation > > jlm::llvm::truncOperationNormalizations ( { TruncOperation::foldConstant }  )
static

◆ 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 97 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 707 of file CommonNodeElimination.cpp.

◆ tryGetLeaderNode()

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

Checks if the given simple 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 simple 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 398 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 160 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.

◆ zextOperationNormalizations()

static std::vector< rvsdg::NodeNormalization< ZExtOperation > > jlm::llvm::zextOperationNormalizations ( { ZExtOperation::foldConstant }  )
static

Variable Documentation

◆ DISABLE_LOAD_LOAD_FORWARDING

const bool jlm::llvm::DISABLE_LOAD_LOAD_FORWARDING = std::getenv("JLM_DISABLE_LOAD_LOAD_FORWARDING")
static

Definition at line 58 of file StoreValueForwarding.cpp.

◆ ENABLE_PTGAA

const bool jlm::llvm::ENABLE_PTGAA = std::getenv("JLM_ENABLE_SVF_PTGAA")
static

Definition at line 49 of file StoreValueForwarding.cpp.

◆ ENABLE_REGION_PREDICATE_CHECK

const bool jlm::llvm::ENABLE_REGION_PREDICATE_CHECK
static
Initial value:
=
!std::getenv("JLM_DISABLE_REGION_PREDICATE_CHECK")

Definition at line 52 of file StoreValueForwarding.cpp.

◆ statisticsCollector

util::StatisticsCollector jlm::llvm::statisticsCollector
static

Definition at line 27 of file CommonNodeEliminationTests.cpp.

◆ USE_TRIVIAL_LOCALAA

const bool jlm::llvm::USE_TRIVIAL_LOCALAA = std::getenv("JLM_SVF_USE_TRIVIAL_LOCALAA")
static

Definition at line 45 of file StoreValueForwarding.cpp.