Rename CtonError and CtonResult to CodegenError and CodegenResult.

This commit is contained in:
Dan Gohman
2018-05-19 21:33:55 -07:00
parent 02e34d1bf7
commit 8a26a50475
10 changed files with 48 additions and 48 deletions

View File

@@ -32,12 +32,12 @@ use cursor::{Cursor, FuncCursor};
use ir::{Function, InstructionData, Opcode}; use ir::{Function, InstructionData, Opcode};
use isa::{EncInfo, TargetIsa}; use isa::{EncInfo, TargetIsa};
use iterators::IteratorExtras; use iterators::IteratorExtras;
use result::CtonResult; use result::CodegenResult;
/// Relax branches and compute the final layout of EBB headers in `func`. /// Relax branches and compute the final layout of EBB headers in `func`.
/// ///
/// Fill in the `func.offsets` table so the function is ready for binary emission. /// Fill in the `func.offsets` table so the function is ready for binary emission.
pub fn relax_branches(func: &mut Function, isa: &TargetIsa) -> CtonResult<CodeOffset> { pub fn relax_branches(func: &mut Function, isa: &TargetIsa) -> CodegenResult<CodeOffset> {
let encinfo = isa.encoding_info(); let encinfo = isa.encoding_info();
// Clear all offsets so we can recognize EBBs that haven't been visited yet. // Clear all offsets so we can recognize EBBs that haven't been visited yet.

View File

@@ -22,7 +22,7 @@ use nan_canonicalization::do_nan_canonicalization;
use postopt::do_postopt; use postopt::do_postopt;
use preopt::do_preopt; use preopt::do_preopt;
use regalloc; use regalloc;
use result::CtonResult; use result::CodegenResult;
use settings::{FlagsOrIsa, OptLevel}; use settings::{FlagsOrIsa, OptLevel};
use simple_gvn::do_simple_gvn; use simple_gvn::do_simple_gvn;
use std::vec::Vec; use std::vec::Vec;
@@ -95,7 +95,7 @@ impl Context {
mem: &mut Vec<u8>, mem: &mut Vec<u8>,
relocs: &mut RelocSink, relocs: &mut RelocSink,
traps: &mut TrapSink, traps: &mut TrapSink,
) -> CtonResult<()> { ) -> CodegenResult<()> {
let code_size = self.compile(isa)?; let code_size = self.compile(isa)?;
let old_len = mem.len(); let old_len = mem.len();
mem.resize(old_len + code_size as usize, 0); mem.resize(old_len + code_size as usize, 0);
@@ -117,7 +117,7 @@ impl Context {
/// code sink. /// code sink.
/// ///
/// Returns the size of the function's code. /// Returns the size of the function's code.
pub fn compile(&mut self, isa: &TargetIsa) -> CtonResult<CodeOffset> { pub fn compile(&mut self, isa: &TargetIsa) -> CodegenResult<CodeOffset> {
let _tt = timing::compile(); let _tt = timing::compile();
self.verify_if(isa)?; self.verify_if(isa)?;
@@ -179,7 +179,7 @@ impl Context {
} }
/// Run the verifier only if the `enable_verifier` setting is true. /// Run the verifier only if the `enable_verifier` setting is true.
pub fn verify_if<'a, FOI: Into<FlagsOrIsa<'a>>>(&self, fisa: FOI) -> CtonResult<()> { pub fn verify_if<'a, FOI: Into<FlagsOrIsa<'a>>>(&self, fisa: FOI) -> CodegenResult<()> {
let fisa = fisa.into(); let fisa = fisa.into();
if fisa.flags.enable_verifier() { if fisa.flags.enable_verifier() {
self.verify(fisa).map_err(Into::into) self.verify(fisa).map_err(Into::into)
@@ -194,7 +194,7 @@ impl Context {
} }
/// Run the locations verifier only if the `enable_verifier` setting is true. /// Run the locations verifier only if the `enable_verifier` setting is true.
pub fn verify_locations_if(&self, isa: &TargetIsa) -> CtonResult<()> { pub fn verify_locations_if(&self, isa: &TargetIsa) -> CodegenResult<()> {
if isa.flags().enable_verifier() { if isa.flags().enable_verifier() {
self.verify_locations(isa).map_err(Into::into) self.verify_locations(isa).map_err(Into::into)
} else { } else {
@@ -203,27 +203,27 @@ impl Context {
} }
/// Perform dead-code elimination on the function. /// Perform dead-code elimination on the function.
pub fn dce<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CtonResult<()> { pub fn dce<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CodegenResult<()> {
do_dce(&mut self.func, &mut self.domtree); do_dce(&mut self.func, &mut self.domtree);
self.verify_if(fisa)?; self.verify_if(fisa)?;
Ok(()) Ok(())
} }
/// Perform pre-legalization rewrites on the function. /// Perform pre-legalization rewrites on the function.
pub fn preopt(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn preopt(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
do_preopt(&mut self.func); do_preopt(&mut self.func);
self.verify_if(isa)?; self.verify_if(isa)?;
Ok(()) Ok(())
} }
/// Perform NaN canonicalizing rewrites on the function. /// Perform NaN canonicalizing rewrites on the function.
pub fn canonicalize_nans(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn canonicalize_nans(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
do_nan_canonicalization(&mut self.func); do_nan_canonicalization(&mut self.func);
self.verify_if(isa) self.verify_if(isa)
} }
/// Run the legalizer for `isa` on the function. /// Run the legalizer for `isa` on the function.
pub fn legalize(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn legalize(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
// Legalization invalidates the domtree and loop_analysis by mutating the CFG. // Legalization invalidates the domtree and loop_analysis by mutating the CFG.
// TODO: Avoid doing this when legalization doesn't actually mutate the CFG. // TODO: Avoid doing this when legalization doesn't actually mutate the CFG.
self.domtree.clear(); self.domtree.clear();
@@ -233,7 +233,7 @@ impl Context {
} }
/// Perform post-legalization rewrites on the function. /// Perform post-legalization rewrites on the function.
pub fn postopt(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn postopt(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
do_postopt(&mut self.func, isa); do_postopt(&mut self.func, isa);
self.verify_if(isa)?; self.verify_if(isa)?;
Ok(()) Ok(())
@@ -262,13 +262,13 @@ impl Context {
} }
/// Perform simple GVN on the function. /// Perform simple GVN on the function.
pub fn simple_gvn<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CtonResult<()> { pub fn simple_gvn<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CodegenResult<()> {
do_simple_gvn(&mut self.func, &mut self.domtree); do_simple_gvn(&mut self.func, &mut self.domtree);
self.verify_if(fisa) self.verify_if(fisa)
} }
/// Perform LICM on the function. /// Perform LICM on the function.
pub fn licm<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CtonResult<()> { pub fn licm<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, fisa: FOI) -> CodegenResult<()> {
do_licm( do_licm(
&mut self.func, &mut self.func,
&mut self.cfg, &mut self.cfg,
@@ -279,7 +279,7 @@ impl Context {
} }
/// Perform unreachable code elimination. /// Perform unreachable code elimination.
pub fn eliminate_unreachable_code<'a, FOI>(&mut self, fisa: FOI) -> CtonResult<()> pub fn eliminate_unreachable_code<'a, FOI>(&mut self, fisa: FOI) -> CodegenResult<()>
where where
FOI: Into<FlagsOrIsa<'a>>, FOI: Into<FlagsOrIsa<'a>>,
{ {
@@ -288,13 +288,13 @@ impl Context {
} }
/// Run the register allocator. /// Run the register allocator.
pub fn regalloc(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn regalloc(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
self.regalloc self.regalloc
.run(isa, &mut self.func, &self.cfg, &mut self.domtree) .run(isa, &mut self.func, &self.cfg, &mut self.domtree)
} }
/// Insert prologue and epilogues after computing the stack frame layout. /// Insert prologue and epilogues after computing the stack frame layout.
pub fn prologue_epilogue(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn prologue_epilogue(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
assert!( assert!(
self.func.stack_limit.is_none(), self.func.stack_limit.is_none(),
"stack_limit isn't implemented yet" "stack_limit isn't implemented yet"
@@ -306,7 +306,7 @@ impl Context {
} }
/// Run the instruction shrinking pass. /// Run the instruction shrinking pass.
pub fn shrink_instructions(&mut self, isa: &TargetIsa) -> CtonResult<()> { pub fn shrink_instructions(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
shrink_instructions(&mut self.func, isa); shrink_instructions(&mut self.func, isa);
self.verify_if(isa)?; self.verify_if(isa)?;
self.verify_locations_if(isa)?; self.verify_locations_if(isa)?;
@@ -314,7 +314,7 @@ impl Context {
} }
/// Run the branch relaxation pass and return the final code size. /// Run the branch relaxation pass and return the final code size.
pub fn relax_branches(&mut self, isa: &TargetIsa) -> CtonResult<CodeOffset> { pub fn relax_branches(&mut self, isa: &TargetIsa) -> CodegenResult<CodeOffset> {
let code_size = relax_branches(&mut self.func, isa)?; let code_size = relax_branches(&mut self.func, isa)?;
self.verify_if(isa)?; self.verify_if(isa)?;
self.verify_locations_if(isa)?; self.verify_locations_if(isa)?;

View File

@@ -56,7 +56,7 @@ use flowgraph;
use ir; use ir;
use isa::enc_tables::Encodings; use isa::enc_tables::Encodings;
use regalloc; use regalloc;
use result::CtonResult; use result::CodegenResult;
use settings; use settings;
use settings::CallConv; use settings::CallConv;
use std::boxed::Box; use std::boxed::Box;
@@ -281,7 +281,7 @@ pub trait TargetIsa: fmt::Display {
/// Compute the stack layout and insert prologue and epilogue code into `func`. /// Compute the stack layout and insert prologue and epilogue code into `func`.
/// ///
/// Return an error if the stack frame is too large. /// Return an error if the stack frame is too large.
fn prologue_epilogue(&self, func: &mut ir::Function) -> CtonResult<()> { fn prologue_epilogue(&self, func: &mut ir::Function) -> CodegenResult<()> {
let _tt = timing::prologue_epilogue(); let _tt = timing::prologue_epilogue();
// This default implementation is unlikely to be good enough. // This default implementation is unlikely to be good enough.
use ir::stackslot::{StackOffset, StackSize}; use ir::stackslot::{StackOffset, StackSize};

View File

@@ -10,7 +10,7 @@ use ir::{get_probestack_funcref, AbiParam, ArgumentExtension, ArgumentLoc, Argum
InstBuilder, ValueLoc}; InstBuilder, ValueLoc};
use isa::{RegClass, RegUnit, TargetIsa}; use isa::{RegClass, RegUnit, TargetIsa};
use regalloc::RegisterSet; use regalloc::RegisterSet;
use result::CtonResult; use result::CodegenResult;
use settings::CallConv; use settings::CallConv;
use stack_layout::layout_stack; use stack_layout::layout_stack;
use std::i32; use std::i32;
@@ -257,7 +257,7 @@ fn callee_saved_gprs_used(isa: &TargetIsa, func: &ir::Function) -> RegisterSet {
used used
} }
pub fn prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CtonResult<()> { pub fn prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CodegenResult<()> {
match func.signature.call_conv { match func.signature.call_conv {
// For now, just translate fast and cold as system_v. // For now, just translate fast and cold as system_v.
CallConv::Fast | CallConv::Cold | CallConv::SystemV => { CallConv::Fast | CallConv::Cold | CallConv::SystemV => {
@@ -269,7 +269,7 @@ pub fn prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CtonResult
} }
} }
pub fn baldrdash_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CtonResult<()> { pub fn baldrdash_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CodegenResult<()> {
debug_assert!( debug_assert!(
!isa.flags().probestack_enabled(), !isa.flags().probestack_enabled(),
"baldrdash does not expect cretonne to emit stack probes" "baldrdash does not expect cretonne to emit stack probes"
@@ -290,7 +290,7 @@ pub fn baldrdash_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) ->
/// Implementation of the fastcall-based Win64 calling convention described at [1] /// Implementation of the fastcall-based Win64 calling convention described at [1]
/// [1] https://msdn.microsoft.com/en-us/library/ms235286.aspx /// [1] https://msdn.microsoft.com/en-us/library/ms235286.aspx
pub fn fastcall_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CtonResult<()> { pub fn fastcall_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CodegenResult<()> {
if isa.triple().pointer_width().unwrap() != PointerWidth::U64 { if isa.triple().pointer_width().unwrap() != PointerWidth::U64 {
panic!("TODO: windows-fastcall: x86-32 not implemented yet"); panic!("TODO: windows-fastcall: x86-32 not implemented yet");
} }
@@ -362,7 +362,7 @@ pub fn fastcall_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> C
} }
/// Insert a System V-compatible prologue and epilogue. /// Insert a System V-compatible prologue and epilogue.
pub fn system_v_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CtonResult<()> { pub fn system_v_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> CodegenResult<()> {
// The original 32-bit x86 ELF ABI had a 4-byte aligned stack pointer, but // The original 32-bit x86 ELF ABI had a 4-byte aligned stack pointer, but
// newer versions use a 16-byte aligned stack pointer. // newer versions use a 16-byte aligned stack pointer.
let stack_align = 16; let stack_align = 16;

View File

@@ -13,7 +13,7 @@ use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
use isa::Builder as IsaBuilder; use isa::Builder as IsaBuilder;
use isa::{EncInfo, RegClass, RegInfo, TargetIsa}; use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
use regalloc; use regalloc;
use result::CtonResult; use result::CodegenResult;
use std::boxed::Box; use std::boxed::Box;
use std::fmt; use std::fmt;
use target_lexicon::{PointerWidth, Triple}; use target_lexicon::{PointerWidth, Triple};
@@ -129,7 +129,7 @@ impl TargetIsa for Isa {
emit_function(func, binemit::emit_inst, sink) emit_function(func, binemit::emit_inst, sink)
} }
fn prologue_epilogue(&self, func: &mut ir::Function) -> CtonResult<()> { fn prologue_epilogue(&self, func: &mut ir::Function) -> CodegenResult<()> {
let _tt = timing::prologue_epilogue(); let _tt = timing::prologue_epilogue();
abi::prologue_epilogue(func, self) abi::prologue_epilogue(func, self)
} }

View File

@@ -2,7 +2,7 @@
use ir; use ir;
use isa::TargetIsa; use isa::TargetIsa;
use result::CtonError; use result::CodegenError;
use std::fmt::Write; use std::fmt::Write;
use std::string::{String, ToString}; use std::string::{String, ToString};
use verifier::VerifierError; use verifier::VerifierError;
@@ -25,8 +25,8 @@ pub fn pretty_verifier_error(
} }
/// Pretty-print a Cretonne error. /// Pretty-print a Cretonne error.
pub fn pretty_error(func: &ir::Function, isa: Option<&TargetIsa>, err: CtonError) -> String { pub fn pretty_error(func: &ir::Function, isa: Option<&TargetIsa>, err: CodegenError) -> String {
if let CtonError::Verifier(e) = err { if let CodegenError::Verifier(e) = err {
pretty_verifier_error(func, isa, &e) pretty_verifier_error(func, isa, &e)
} else { } else {
err.to_string() err.to_string()

View File

@@ -15,7 +15,7 @@ use regalloc::liveness::Liveness;
use regalloc::reload::Reload; use regalloc::reload::Reload;
use regalloc::spilling::Spilling; use regalloc::spilling::Spilling;
use regalloc::virtregs::VirtRegs; use regalloc::virtregs::VirtRegs;
use result::CtonResult; use result::CodegenResult;
use timing; use timing;
use topo_order::TopoOrder; use topo_order::TopoOrder;
use verifier::{verify_context, verify_cssa, verify_liveness, verify_locations}; use verifier::{verify_context, verify_cssa, verify_liveness, verify_locations};
@@ -72,7 +72,7 @@ impl Context {
func: &mut Function, func: &mut Function,
cfg: &ControlFlowGraph, cfg: &ControlFlowGraph,
domtree: &mut DominatorTree, domtree: &mut DominatorTree,
) -> CtonResult<()> { ) -> CodegenResult<()> {
let _tt = timing::regalloc(); let _tt = timing::regalloc();
debug_assert!(domtree.is_valid()); debug_assert!(domtree.is_valid());

View File

@@ -6,7 +6,7 @@ use verifier::VerifierError;
/// ///
/// When Cretonne fails to compile a function, it will return one of these error codes. /// When Cretonne fails to compile a function, it will return one of these error codes.
#[derive(Fail, Debug, PartialEq, Eq)] #[derive(Fail, Debug, PartialEq, Eq)]
pub enum CtonError { pub enum CodegenError {
/// An IR verifier error. /// An IR verifier error.
/// ///
/// This always represents a bug, either in the code that generated IR for Cretonne, or a bug /// This always represents a bug, either in the code that generated IR for Cretonne, or a bug
@@ -31,11 +31,11 @@ pub enum CtonError {
CodeTooLarge, CodeTooLarge,
} }
/// A Cretonne compilation result. /// A convenient alias for a `Result` that uses `CodegenError` as the error type.
pub type CtonResult<T> = Result<T, CtonError>; pub type CodegenResult<T> = Result<T, CodegenError>;
impl From<VerifierError> for CtonError { impl From<VerifierError> for CodegenError {
fn from(e: VerifierError) -> Self { fn from(e: VerifierError) -> Self {
CtonError::Verifier(e) CodegenError::Verifier(e)
} }
} }

View File

@@ -2,7 +2,7 @@
use ir::stackslot::{StackOffset, StackSize, StackSlotKind}; use ir::stackslot::{StackOffset, StackSize, StackSlotKind};
use ir::StackSlots; use ir::StackSlots;
use result::{CtonError, CtonResult}; use result::{CodegenError, CodegenResult};
use std::cmp::{max, min}; use std::cmp::{max, min};
/// Compute the stack frame layout. /// Compute the stack frame layout.
@@ -15,7 +15,7 @@ use std::cmp::{max, min};
/// Returns the total stack frame size which is also saved in `frame.frame_size`. /// Returns the total stack frame size which is also saved in `frame.frame_size`.
/// ///
/// If the stack frame is too big, returns an `ImplLimitExceeded` error. /// If the stack frame is too big, returns an `ImplLimitExceeded` error.
pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CtonResult<StackSize> { pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CodegenResult<StackSize> {
// Each object and the whole stack frame must fit in 2 GB such that any relative offset within // Each object and the whole stack frame must fit in 2 GB such that any relative offset within
// the frame fits in a `StackOffset`. // the frame fits in a `StackOffset`.
let max_size = StackOffset::max_value() as StackSize; let max_size = StackOffset::max_value() as StackSize;
@@ -41,7 +41,7 @@ pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CtonResult<
for slot in frame.values() { for slot in frame.values() {
if slot.size > max_size { if slot.size > max_size {
return Err(CtonError::ImplLimitExceeded); return Err(CodegenError::ImplLimitExceeded);
} }
match slot.kind { match slot.kind {
@@ -52,7 +52,7 @@ pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CtonResult<
let offset = slot.offset let offset = slot.offset
.unwrap() .unwrap()
.checked_add(slot.size as StackOffset) .checked_add(slot.size as StackOffset)
.ok_or(CtonError::ImplLimitExceeded)?; .ok_or(CodegenError::ImplLimitExceeded)?;
outgoing_max = max(outgoing_max, offset); outgoing_max = max(outgoing_max, offset);
} }
StackSlotKind::SpillSlot StackSlotKind::SpillSlot
@@ -85,7 +85,7 @@ pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CtonResult<
offset = offset offset = offset
.checked_sub(slot.size as StackOffset) .checked_sub(slot.size as StackOffset)
.ok_or(CtonError::ImplLimitExceeded)?; .ok_or(CodegenError::ImplLimitExceeded)?;
// Aligning the negative offset can never cause overflow. We're only clearing bits. // Aligning the negative offset can never cause overflow. We're only clearing bits.
offset &= -(min_align as StackOffset); offset &= -(min_align as StackOffset);
@@ -99,7 +99,7 @@ pub fn layout_stack(frame: &mut StackSlots, alignment: StackSize) -> CtonResult<
// Finally, make room for the outgoing arguments. // Finally, make room for the outgoing arguments.
offset = offset offset = offset
.checked_sub(outgoing_max) .checked_sub(outgoing_max)
.ok_or(CtonError::ImplLimitExceeded)?; .ok_or(CodegenError::ImplLimitExceeded)?;
offset &= -(alignment as StackOffset); offset &= -(alignment as StackOffset);
let frame_size = (offset as StackSize).wrapping_neg(); let frame_size = (offset as StackSize).wrapping_neg();
@@ -113,7 +113,7 @@ mod tests {
use ir::stackslot::StackOffset; use ir::stackslot::StackOffset;
use ir::types; use ir::types;
use ir::{StackSlotData, StackSlotKind, StackSlots}; use ir::{StackSlotData, StackSlotKind, StackSlots};
use result::CtonError; use result::CodegenError;
#[test] #[test]
fn layout() { fn layout() {
@@ -187,7 +187,7 @@ mod tests {
// Also test that an unsupported offset is rejected. // Also test that an unsupported offset is rejected.
sss.get_outgoing_arg(types::I8, StackOffset::max_value() - 1); sss.get_outgoing_arg(types::I8, StackOffset::max_value() - 1);
assert_eq!(layout_stack(sss, 1), Err(CtonError::ImplLimitExceeded)); assert_eq!(layout_stack(sss, 1), Err(CodegenError::ImplLimitExceeded));
} }
#[test] #[test]

View File

@@ -6,7 +6,7 @@
// shared with `DataContext`? // shared with `DataContext`?
use cretonne_codegen::entity::{EntityRef, PrimaryMap}; use cretonne_codegen::entity::{EntityRef, PrimaryMap};
use cretonne_codegen::result::CtonError; use cretonne_codegen::result::CodegenError;
use cretonne_codegen::{binemit, ir, Context}; use cretonne_codegen::{binemit, ir, Context};
use data_context::DataContext; use data_context::DataContext;
use std::borrow::ToOwned; use std::borrow::ToOwned;
@@ -134,7 +134,7 @@ pub enum ModuleError {
InvalidImportDefinition(String), InvalidImportDefinition(String),
/// Wraps a `cretonne-codegen` error /// Wraps a `cretonne-codegen` error
#[fail(display = "Compilation error: {}", _0)] #[fail(display = "Compilation error: {}", _0)]
Compilation(CtonError), Compilation(CodegenError),
/// Wraps a generic error from a backend /// Wraps a generic error from a backend
#[fail(display = "Backend error: {}", _0)] #[fail(display = "Backend error: {}", _0)]
Backend(String), Backend(String),