Skip to main content

Crate portal_pc_waffle_passes_shared

Crate portal_pc_waffle_passes_shared 

Source
Expand description

Shared optimization passes for WAFFLE (used by both backend and passes crates).

Re-exports§

pub use waffle_entity as entity;
pub use waffle_ir as ir;
pub use maxssa::*;
pub use resolve_aliases::*;

Modules§

cfg
Lightweight CFG analyses.
entity
Type-safe indices and indexed containers for WAFFLE.
interp
Waffle IR interpreter.
maxssa
Conversion pass that creates “maximal SSA”: only local uses (no uses of defs in other blocks), with all values explicitly passed through blockparams. This makes some other transforms easier because it removes the need to worry about adding blockparams when mutating the CFG (all possible blockparams are already there!).
op_traits
Metadata on operators.
resolve_aliases
Resolve all aliases.
scoped_map
Scoped hashmap.
util
wasm_encoder
A WebAssembly encoder.
wasmparser
A simple event-driven library for parsing WebAssembly binary files (or streams).

Macros§

declare_entity

Structs§

Block
BlockDef
BlockTarget
CFGInfo
Auxiliary analyses of the control-flow graph.
ControlTag
ControlTagData
Debug
DebugMap
A map from ranges of offsets in the original Wasm file to source locations.
EntityVec
Export
Func
FunctionBody
The body of a function, as an SSA-based intermediate representation.
FunctionBodyDisplay
A wrapper around a FunctionBody together with some auxiliary information to perform a pretty-print of that function.
Global
GlobalData
HoleTarget
Ieee32
An IEEE binary32 immediate floating point value, represented as a u32 containing the bit pattern.
Ieee64
An IEEE binary64 immediate floating point value, represented as a u64 containing the bit pattern.
Import
InterpContext
Context for the IR interpreter. Corresponds roughly to Wasm module state.
InterpMemory
The state of one interpreter memory.
InterpStackFrame
One stack frame in the interpreted execution context.
InterpTable
The state of one interpreter table.
ListPool
A “storage pool” backing many ListRefs of the given type.
ListRef
A handle to a list stored in a ListPool.
Local
Memory
MemoryArg
An argument to a memory load or store, specifying which memory, alignment and an optional offset.
MemoryData
A memory definition.
MemorySegment
Module
ModuleDisplay
PerEntity
Vector of state per entity in an index-space that does not define the index-space. In other words, this container will not pass out new indices, it will only allow associating state with existing indices; and it requires a default value for data at an index not yet assigned.
Signature
SourceFile
SourceLoc
SourceLocData
A “source location”: a filename (interned to an ID), a line, and a column.
Table
TableData
Value
ValueRecord
WithMutablility
Something, alsong with whether it can be mutated
WithNullable
Something, alsong with whether it can be null

Enums§

ConstVal
A constant concrete value during interpretation.
ExportKind
FrontendError
An error that occurs when translating Wasm to IR.
FuncDecl
FuncDecl represents the various forms in which we can hold a function body: not yet parsed, parsed into full IR, recompiled into new bytecode, or an import (none of the above).
Handler
An exception’s handler
HeapType
a Type that can be stored on the heap
ImportKind
InterpResult
The result of an interpreter session.
Operator
An operator in the IR, consuming arguments and producing results when executed.
SideEffect
Side-effects that an operator may have.
SignatureData
StorageType
A storage type
Terminator
Type
Types in waffle’s IR.
ValueDef
A definition of an SSA value.

Constants§

WASM_PAGE
The size of a single Wasm page, used in memory definitions.

Traits§

EntityRef
An index into an index-space of entities.
FuncCollector
Subtypes

Functions§

const_eval
Constant-evaluate the given operator with the given arguments, returning a constant result if possible to know.
i2x
op_inputs
Given a module and an existing operand stack for context, provide the type(s) that a given operator requires as inputs.
op_outputs
Given a module and an existing operand stack for context, provide the type(s) that a given operator provides as outputs.
value_is_pure
x2i

Type Aliases§

ExceptionTarget