Say "IR" instead of "IL".

While the specifics of these terms are debatable, "IR" generally
isn't incorrect in this context, and is the more widely recognized
term at this time.

See also the discussion in #267.

Fixes #267.
This commit is contained in:
Dan Gohman
2018-03-28 14:15:01 -07:00
parent a297465c25
commit 57cd69d8b4
45 changed files with 106 additions and 119 deletions

View File

@@ -20,7 +20,7 @@ use std::ptr::write_unaligned;
/// A `CodeSink` that writes binary machine code directly into memory.
///
/// A `MemoryCodeSink` object should be used when emitting a Cretonne IL function into executable
/// A `MemoryCodeSink` object should be used when emitting a Cretonne IR function into executable
/// memory. It writes machine code directly to a raw pointer without any bounds checking, so make
/// sure to allocate enough memory for the whole function. The number of bytes required is returned
/// by the `Context::compile()` function.

View File

@@ -1,6 +1,6 @@
//! IL entity references.
//! Cretonne IR entity references.
//!
//! Instructions in Cretonne IL need to reference other entities in the function. This can be other
//! Instructions in Cretonne IR need to reference other entities in the function. This can be other
//! parts of the function like extended basic blocks or stack slots, or it can be external entities
//! that are declared in the function preamble in the text format.
//!
@@ -16,7 +16,7 @@
//! data structures use the `PackedOption<EntityRef>` representation, while function arguments and
//! return values prefer the more Rust-like `Option<EntityRef>` variant.
//!
//! The entity references all implement the `Display` trait in a way that matches the textual IL
//! The entity references all implement the `Display` trait in a way that matches the textual IR
//! format.
use std::fmt;

View File

@@ -55,7 +55,7 @@ pub struct Function {
///
/// This information is only transiently available after the `binemit::relax_branches` function
/// computes it, and it can easily be recomputed by calling that function. It is not included
/// in the textual IL format.
/// in the textual IR format.
pub offsets: EbbOffsets,
/// Source locations.

View File

@@ -1,7 +1,7 @@
//! Instruction formats and opcodes.
//!
//! The `instructions` module contains definitions for instruction formats, opcodes, and the
//! in-memory representation of IL instructions.
//! in-memory representation of IR instructions.
//!
//! A large part of this module is auto-generated from the instruction descriptions in the meta
//! directory.

View File

@@ -71,8 +71,7 @@ impl Layout {
// within an EBB. The instruction sequence numbers are all between the sequence number of their
// containing EBB and the following EBB.
//
// The result is that sequence numbers work like BASIC line numbers for the textual representation
// of the IL.
// The result is that sequence numbers work like BASIC line numbers for the textual form of the IR.
type SequenceNumber = u32;
// Initial stride assigned to new sequence numbers.

View File

@@ -6,7 +6,7 @@ use std::str::FromStr;
/// The name of a runtime library routine.
///
/// Runtime library calls are generated for Cretonne IL instructions that don't have an equivalent
/// Runtime library calls are generated for Cretonne IR instructions that don't have an equivalent
/// ISA instruction or an easy macro expansion. A `LibCall` is used as a well-known name to refer to
/// the runtime library routine. This way, Cretonne doesn't have to know about the naming
/// convention in the embedding VM's runtime library.

View File

@@ -1,4 +1,4 @@
//! Representation of Cretonne IL functions.
//! Representation of Cretonne IR functions.
pub mod types;
pub mod entities;

View File

@@ -12,7 +12,7 @@ use std::cmp;
/// 1. An instruction or
/// 2. An EBB header.
///
/// This corresponds more or less to the lines in the textual representation of Cretonne IL.
/// This corresponds more or less to the lines in the textual form of Cretonne IR.
#[derive(PartialEq, Eq, Clone, Copy)]
pub struct ProgramPoint(u32);

View File

@@ -7,7 +7,7 @@ use std::fmt;
/// A source location.
///
/// This is an opaque 32-bit number attached to each Cretonne IL instruction. Cretonne does not
/// This is an opaque 32-bit number attached to each Cretonne IR instruction. Cretonne does not
/// interpret source locations in any way, they are simply preserved from the input to the output.
///
/// The default source location uses the all-ones bit pattern `!0`. It is used for instructions

View File

@@ -45,7 +45,7 @@ fn vmctx_addr(inst: ir::Inst, func: &mut ir::Function, offset: i64) {
/// Expand a `global_addr` instruction for a deref global.
fn deref_addr(inst: ir::Inst, func: &mut ir::Function, base: ir::GlobalVar, offset: i64) {
// We need to load a pointer from the `base` global variable, so insert a new `global_addr`
// instruction. This depends on the iterative legalization loop. Note that the IL verifier
// instruction. This depends on the iterative legalization loop. Note that the IR verifier
// detects any cycles in the `deref` globals.
let ptr_ty = func.dfg.value_type(func.dfg.first_result(inst));
let mut pos = FuncCursor::new(func).at_inst(inst);

View File

@@ -15,7 +15,7 @@ use std::vec::Vec;
/// A diversion of a value from its original location to a new register or stack location.
///
/// In IL, a diversion is represented by a `regmove` instruction, possibly a chain of them for the
/// In IR, a diversion is represented by a `regmove` instruction, possibly a chain of them for the
/// same value.
///
/// When tracking diversions, the `from` field is the original assigned value location, and `to` is

View File

@@ -15,9 +15,9 @@ pub enum CtonError {
/// code. This should never happen for validated WebAssembly code.
InvalidInput,
/// An IL verifier error.
/// An IR verifier error.
///
/// This always represents a bug, either in the code that generated IL for Cretonne, or a bug
/// This always represents a bug, either in the code that generated IR for Cretonne, or a bug
/// in Cretonne itself.
Verifier(verifier::Error),

View File

@@ -41,11 +41,11 @@ define_passes!{
Pass, NUM_PASSES, DESCRIPTIONS;
process_file: "Processing test file",
parse_text: "Parsing textual Cretonne IL",
parse_text: "Parsing textual Cretonne IR",
wasm_translate_module: "Translate WASM module",
wasm_translate_function: "Translate WASM function",
verifier: "Verify Cretonne IL",
verifier: "Verify Cretonne IR",
verify_cssa: "Verify CSSA",
verify_liveness: "Verify live ranges",
verify_locations: "Verify value locations",

View File

@@ -1,8 +1,7 @@
//! Converting Cretonne IL to text.
//! Converting Cretonne IR to text.
//!
//! The `write` module provides the `write_function` function which converts an IL `Function` to an
//! equivalent textual representation. This textual representation can be read back by the
//! `cretonne-reader` crate.
//! The `write` module provides the `write_function` function which converts an IR `Function` to an
//! equivalent textual form. This textual form can be read back by the `cretonne-reader` crate.
use ir::{Function, DataFlowGraph, Ebb, Inst, Value, ValueDef, Type, SigRef};
use isa::{TargetIsa, RegInfo};