scalus.compiler.sir.lowering.LoweredValue
See theLoweredValue companion object
trait LoweredValue
SEA of nodes - like representation. E.e. each value is node, which manage dependencies. LoweredValue:
- represents a value in lowered SIR, which is
- a generator of a block of code with generate specific SIRType in specific representation. -- (representation is LoweredValueRepresentation, which can be term or data in specific encoding)
- some lowered values can be named (see IdentifiableLoweredValue and maintain a set of dependencies) The idea of SEA of nodes -- than we can generate code 'by need' based on dependencies. I.e. if value not used at all - code will not be generated, if value used once -- no intermediate construction will be created and code will be generated directly in place of usage. If value used multiple times -- it will be generated near the usage (i.e. in the nearest block, which contains all depended).
The idea of SEA of nodes described in the paper: Cliff Click. 1995. Global code motion/global value numbering. SIGPLAN Not. 30, 6 (June 1995), 246–257. "https://doi.org/10.1145/223428.207154"
We have a quite different code (non-SSA form, only dominators), but the main idea of relaxing order is the same,
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait ComplexLoweredValueclass MapMatchLoweredValueclass ApplyLoweredValueclass BuiltinApplyLoweredValueclass BuilinApply1LoweredValeclass BuilinApply2LoweredValeclass CaseBooleanLoweredValueclass CaseDataLoweredValueclass CaseIntegerLoweredValueclass CaseListLoweredValueclass CasePairLoweredValueclass ChooseListLoweredValueclass IfThenElseLoweredValueclass LambdaLoweredValueclass LetNonRecLoweredValueclass LetRecLoweredValueclass ConstantLoweredValuetrait IdentifiableLoweredValueclass VariableLoweredValuetrait ProxyLoweredValueclass ArgProxyLoweredValueclass WrappedArgclass DelayLoweredValueclass ForceLoweredValueclass StaticLoweredValue
Members list
In this article