MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
 Nautomaton
  CAutomatonBase
  CDFA
  CDFANode
   CLt
  CNFA
  CNFANode
   CLt
  CRangeCompare
 Nmim
  Nast
   CAliasDeclanx dbg = path; - a compiler-exposed alias sharing its target's annex slot
   CAliasPtrnptrn as dbg
   CAnnexInfoBookkeeping of an annex introduced by an AxmDecl
    C[struct].sym
    C[struct].id
   CAppExprcallee arg
   CASTOwns the arena all AST nodes live in as well as the AnnexInfos of all plugins
    CForeignAliasAn anx alias in one plugin for an annex of another, e.g. anx M = core.M; in mem
    CFiles
   CAxmDeclaxm dbg: type, normalizer, curry, trip; or a family axm (name, ...): type, normalizer, curry, trip;
    CNamedbg = alias_0 = ... = alias_n-1 - one axiom of the family, which each of its names binds to
   CBindOne name in a Scope: the Decl it introduces and the Vis of this binding
   CDeclBase class of all declarations; caches the emitted Decl::def
   CDeclExprdecls expr or expr where decls if DeclExpr::is_where
   CDummyDecl
   CEmitter
    CNomInfo
   CErrorExprErroneous expression
   CErrorPtrnErroneous pattern
   CExprBase class of all expressions
   CFileThe AST of one source file: an anonymous ModDecl that a UseDecl binds under a name of its own
   CGrpPtrndbg_i of a group dbg_0 ... dbg_n-1: type for i > 0; the leading IdPtrn::id owns type
   CHoleExpr?
   CIdDecldbg bound to a Def whose type the binding construct dictates; hence, it carries no annotation
   CIdPtrndbg: type
   CInfixExprlhs op rhs; InfixExpr::op picks the meaning - see MIM_INFIX
   CLamDecltag dbg dom_0 ... dom_n-1: codom = body; with LamDecl::tag lam/con/fun or anonymous λ/cn/fn
    CDomOne dom of a LamDecl: ptrn@(filter) with an optional : ret type
   CLamExprWraps a LamDecl as Expr
   CLetDecllet ptrn = value;
   CLexer
   CLitExprtok:type
   CMatchExprmatch scrutinee with | arm_0 | ... | arm_n-1
    CArmptrn => body, ctor ptrn => body, or index [ptrn] => body of a MatchExpr
   CModDeclmod dbg decls end; also the base of the anonymous File
   CModsRaw, unvalidated combination of priv/pub/extern/anx modifiers written before a declaration
   CMutualDeclmutual decl* end groups RecDecls that may refer to each other
   CNodeBase class of all AST nodes
   CNomDeclnom dbg = body; - a nominal newtype
   CParserParses Mim code as AST
   CPathdbg_0.....dbg_n-1
   CPathExprpath
   CPiExprdom → codom, Cn dom, or Fn dom → codom depending on PiExpr::tag
    CDomOne dom of a PiExpr: ptrn with an optional -> ret type
   CPrefixExprop rhs; PrefixExpr::op picks the meaning - see MIM_PREFIX
   CPrimaryExprtag
   CPtrnBase class of all patterns
   CR
   CRecDeclrec dbg = body;
   CRetExprret ptrn = callee $ arg; body
   CRuleDeclrule dbg var: lhs when guard => rhs; or norm instead of rule if RuleDecl::is_normalizer
   CRuleExprRule dom
   CS
   CScopes
    CBarrier
   CSeqExpr«index: shape; body» or ‹index: shape; body› if SeqExpr::is_pack; index: is optional
   CSigmaExprWraps a TuplePtrn as Expr
   CSingleExpr«body» or ‹body› if SingleExpr::is_wrap
   CTok
   CTupleExpr(elem_0, ..., elem_n-1)
   CTuplePtrn(ptrn_0, ..., ptrn_n-1), [ptrn_0, ..., ptrn_n-1], or {ptrn_0, ..., ptrn_n-1}
   CTypeExprType level
   CUseDeclimport "file"|name [as alias|*];, plugin name [as alias|*];, or use path [as alias|*]; as * splices instead of naming; a use without an as is sugar for as *
   CValDeclBase class of all declarations that bind values
   CVariantExpr| ctor_0: type_0 | ... | ctor_n-1: type_n-1; a constructor without a type carries []
    CCtordbg: type of a VariantExpr
  Nplug
   NaffineThe affine Plugin
    Nphase
     CLowerForLowers the for axm to actual control flow in CPS
     CLowerIndexLowers the affine index algebra to core arithmetic
   NautodiffThe automatic differentiation Plugin
    Nphase
     CEvalThis phase is the heart of AD
   NbtensorThe btensor Plugin
    Nphase
     CLowerMapReduceLowers the buffer-world operations (btensor.map_reduce_post, btensor.broadcast, btensor.pad, btensor.concat, btensor.gather, btensor.scatter) into affine.For loop nests over buffer.read / buffer.write / buffer.alloc, threading mem.M
    CMapRedPostThe curried meta arguments of a tensor.map_reduce_post or btensor.map_reduce_post callee (same layout)
     CRanks
    CRing_fieldThe fields of btensor.Ring, by index
    CSched_fieldThe fields of btensor.Sched, by index
   NbufferThe buffer Plugin
    CLowerPtrLowers the buffer abstraction to the low-level pointer representation
   NclosThe clos Plugin
    Nphase
     CBranchClosElimFlattens branches over closure literals back into a direct branch over Lams
     CClos2SJLJLowers basicblock closures that are passed as arguments (i.e
     CClosConvPerforms typed closure conversion, rebuilding the old world into a new one
     CClosConvPrepWraps operands with the clos.anno annotations (returning, free_bb, fstclass_bb, ...) and eta-expands branches and continuations so that ClosConv sees a canonical program
     CFreeDefAnaComputes, on demand and with memoization, the free Defs that a Lam must capture in its closure environment
     CLowerTypedClosThis pass lowers typed closures to untyped closures
     CLowerTypedClosPrepEscape analysis for closures: closure literals get their function wrapped in clos.anno.esc or clos.anno.bottom, depending on whether their environment escapes
    CClosLitLightweight, non-owning view onto a closure literal (env_type, fn, env); see isa_clos_lit
   NcpsThe CPS Plugin
    CConvFull CPS conversion in one recursive rewrite
   NgpuThe gpu Plugin
    Nphase
     CLowerMapReduce
     CMemChecks
     CRemoveDoubleSyncs
     CSplitApply
     CSplitOffKernelsAfterwards, old_world() is the host, which keeps each kernel as a declaration, and new_world() the device
   NllThe ll Plugin
    CBB
    CEmitPipeline phase for ll.emit
    CEmitter
   NmemThe mem Plugin
    Nphase
     CAddMemThreads the mem.M memory monad through the world: mem-extends continuations and rewires every memory operand to the current memory at that program point
     CFreeLocalsFrees the memory a function allocates but does not let escape; see mem::EscapeAnalysis
     CHeap2StackTurns a mem.alloc that does not escape its function (see mem::EscapeAnalysis) into a mem.slot
     CSEOSymbolic Expression Optimization
    CEscapeAnalysisDetermines which allocations stay within the scope that allocates them
     CChain
   NnvptxThe nvptx Plugin
    CDeviceEmitFlags
    CDeviceEmitter
    CEmit
    CHostEmitter
   NoptionThe option Plugin
    COpt_ctorThe ctors of option.Opt, by index
   NordThe ord Plugin
    CKey_fieldThe fields of ord.Key, by index
   NregexThe regex Plugin
    Capp_range
    CLowerRegexLowers a regex axm application to a DFA matcher function
   NtensorThe tensor Plugin
    Nphase
     CFuse
     CLeafA chain operand; the chain reads its transpose if t
     CLowerLowers the high-level tensor axioms into the low-level tensor axioms (map_reduce, …)
     CLowerMapReduceLowers the low-level tensor axioms (map_reduce, generate, pad, concat, broadcast) directly to their underlying primitives (loops, extract, insert, pack, …)
     CLowerToMemBufferizes the low-level tensor axioms onto the shared buffer layer
     CReassocReassociates chains of tensor.product_2d with the classic matrix-chain-order dynamic program, so that a chain is evaluated with the least number of vector-lane slots
     CSlotsThe five parallel per-slot lists of a map_reduce_post input group: element type, rank, shape, access map, and the tensor itself
     CSplitOne node of a bracketing: i … j splits after s
    CPureReadA pure re-indexed read: the source tensor, the access map into it (over the read's output coordinates), and the source's element type/rank/shape
  CADCEAggressive Dead Code Elimination
  CAnalysisTraverses the current World using Rewriter infrastructure while staying in the same world
  CAnnexHolds info about an entity defined within a Plugin (called Annex)
  CApp
  CArrA (possibly paramterized) Array
  CAxm
   CIsANode
   CIsA
  CBetaRedInlines in post-order all Lams that occur exactly once in the program or are trivial forwarders
  CBranchMatches (ff, tt)#cond arg where cond is not a Literal
  CCheck
  CCleanupRemoves unreachable and dead code by rebuilding the whole World into a new one and swapping them afterwards
  CClosedMutPhaseTransitively visits all reachable, closed mutables in the World
  CDefBase class for all Defs
  CDefKeyGrants fe::Patricia access to Def::gid_
  CDiagRenders a diagnostic through PlainNames and - if that turned out ambiguous - once more with Def::unique_name
  CDispatchMatches (target_0, target_1, ...)#index arg
  CDispatchNormalizeNormalizes Dispatches: η-expands non-Lam targets so that every target of a (t_0, ..., t_n)#index jump table is a Lam, as later phases and the backends expect
  CDotConfigOptions for Def::dot, World::dot, and Nest::dot
  CDriverSome "global" variables needed all over the place
   CNames
   CPathsAn ordered list of directories
   CImports
    CEntry
  CEtaConvCombined η-normalization: folds η-reduction and η-expansion into a single, idempotent phase
  CExtCommon base for TExtremum
  CExtractExtracts from a Sigma or Array-typed Extract::tuple the element at position Extract::index
  CFlagsCompiler switches that must be saved and looked up in later phases of compilation
  CGIDHash
  CGIDLt
  CHoleThis node is a hole in the IR that is inferred by its context later on
  CIdxA built-in constant of type Nat -> *
  CImporterImports from Driver::library: an annex therein is looked up via World::annex, so it is imported only once
  CInjConstructs a Join or Variant value
  CInsertCreates a new Tuple / Pack by inserting Insert::value at position Insert::index into Insert::tuple
  CJoinA union type whose ops are sorted and deduplicated: T ∪ T is T
  CLamA function
  CLamSpecSpecializes a Lam at its call site by inlining all Pi-typed (i.e. higher-order) arguments
  CLevel
  CLit
  CLMax
  CLSucc
  CMatchScrutinize Match::scrutinee() and dispatch to Match::arms
  CNameNominal newtype term introduction
  CNat
  CNestBuilds a nesting tree for all mutables/binders
   CNode
    CChildren
    CSiblDeps
  CNestPhaseLike ClosedMutPhase but computes a Nest for each NestPhase::visit
  CNomNominal newtype formation
  CNomErasureEliminates all nominal newtypes, so that no Nom/Name/Struc ever reaches a backend
  COutA file name from the command line and the stream to write to;
  CPackA (possibly paramterized) Tuple
  CPhaseA Phase performs one self-contained task over the whole World
  CPhaseManOrganizes several Phases into a pipeline
  CPiA dependent function type
  CPlainNamesRenders Defs with their plain Def::sym instead of Def::unique_name while alive
  CPluginBasic info and registration function pointer to be returned from a specific plugin
  CPluginArgOne -X <plugin>:<arg> a Plugin understands; see Arguments
  CPluginEnvOne environment variable a Plugin reads; see Environment Variables
  CPluginSymOne symbol a Plugin offers to other Plugins; see Driver::get_fun_ptr
  CProdBase class for Sigma and Tuple
  CProxyUsed as intermediate value during optimizatinos such as Analysis
  CReformType formation of a rewrite Rule
  CReplAn RWPhase that searches for a pattern and replaces it
  CRetWrap
  CRewriterRecurseivly rebuilds part of a program into the provided World w.r.t. Rewriter::map
   CScope
  CRuleA rewrite rule
  CRWPhaseRebuilds old_world() into new_world() and then swaps them
  CScalarizeScalarization (= argument simplification):
  CSCCPSCCP - Sparse Conditional Constant Propagation - but propagates arbitrary expressions
  CScheduler
  CSelectMatches (ff, tt)#cond - where cond is a Bool but not a Literal
  CSeqBase class for Arr and Pack
  CSettersCRTP-based mixin to declare setters for Def::loc & Def::name using a covariant return type
  CShapeThe extents of a Seq's axes: a plain Nat for a single axis, an aggregate of them for several
  CSieveFilters the components of an aggregate and keeps track of where the survivors end up
  CSigmaA dependent tuple type
  CSingleSingleton type formation
  CSingleErasureEliminates all types that have exactly one inhabitant, so that no Single/Wrap ever reaches a backend
  CStaticArgOptStatic Argument Transformation
  CStrucNominal newtype term elimination
  CSwitchMatches a jump table (target_0, target_1, ...)#index where index is a non-Literal Idx n and n the arity
  CTExtExtremum. Either Top (Up) or Bottom
  CTupleData constructor for a Sigma
  CType
  CUseConst Def*erences a user
  CUseEq
  CUseHash
  CVarA variable introduced by a binder (mutable)
  CVariantA sum type whose cases are positional: unlike a Join, they are neither sorted nor deduplicated
  CVarRewriterExtends Rewriter for variable substitution
  CVersion
  CWorldThe World represents the whole program and manages creation of MimIR nodes (Defs)
   CCurrLocWorld::get_loc together with its interned DbgKey, so pushing/popping a Loc never re-interns it
   CState
    CPODPlain Old Data
   CExternals
   CAnnexes
    CEntry
  CWrapSingleton term introduction
  CZonker
 CNamedPhase hook for compile.named