Rename Cretonne to Cranelift!
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
//! Defines `FaerieBackend`.
|
||||
|
||||
use container;
|
||||
use cretonne_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink};
|
||||
use cretonne_codegen::isa::TargetIsa;
|
||||
use cretonne_codegen::{self, binemit, ir};
|
||||
use cretonne_module::{
|
||||
use cranelift_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink};
|
||||
use cranelift_codegen::isa::TargetIsa;
|
||||
use cranelift_codegen::{self, binemit, ir};
|
||||
use cranelift_module::{
|
||||
Backend, DataContext, DataDescription, Init, Linkage, ModuleError, ModuleNamespace,
|
||||
ModuleResult,
|
||||
};
|
||||
@@ -34,16 +34,16 @@ pub struct FaerieBuilder {
|
||||
}
|
||||
|
||||
impl FaerieBuilder {
|
||||
/// Create a new `FaerieBuilder` using the given Cretonne target, that
|
||||
/// Create a new `FaerieBuilder` using the given Cranelift target, that
|
||||
/// can be passed to
|
||||
/// [`Module::new`](cretonne_module/struct.Module.html#method.new].
|
||||
/// [`Module::new`](cranelift_module/struct.Module.html#method.new].
|
||||
///
|
||||
/// Faerie output requires that TargetIsa have PIC (Position Independent Code) enabled.
|
||||
///
|
||||
/// `collect_traps` setting determines whether trap information is collected in a
|
||||
/// `FaerieTrapManifest` available in the `FaerieProduct`.
|
||||
///
|
||||
/// The `libcall_names` function provides a way to translate `cretonne_codegen`'s `ir::LibCall`
|
||||
/// The `libcall_names` function provides a way to translate `cranelift_codegen`'s `ir::LibCall`
|
||||
/// enum to symbols. LibCalls are inserted in the IR as part of the legalization for certain
|
||||
/// floating point instructions, and for stack probes. If you don't know what to use for this
|
||||
/// argument, use `FaerieBuilder::default_libcall_names()`.
|
||||
@@ -68,10 +68,10 @@ impl FaerieBuilder {
|
||||
|
||||
/// Default names for `ir::LibCall`s. A function by this name is imported into the object as
|
||||
/// part of the translation of a `ir::ExternalName::LibCall` variant. Calls to a LibCall should
|
||||
/// only be inserted into the IR by the `cretonne_codegen` legalizer pass.
|
||||
/// only be inserted into the IR by the `cranelift_codegen` legalizer pass.
|
||||
pub fn default_libcall_names() -> Box<Fn(ir::LibCall) -> String> {
|
||||
Box::new(move |libcall| match libcall {
|
||||
ir::LibCall::Probestack => "__cretonne_probestack".to_owned(),
|
||||
ir::LibCall::Probestack => "__cranelift_probestack".to_owned(),
|
||||
ir::LibCall::CeilF32 => "ceilf".to_owned(),
|
||||
ir::LibCall::CeilF64 => "ceil".to_owned(),
|
||||
ir::LibCall::FloorF32 => "floorf".to_owned(),
|
||||
@@ -111,7 +111,7 @@ impl Backend for FaerieBackend {
|
||||
/// to memory and files.
|
||||
type Product = FaerieProduct;
|
||||
|
||||
/// Create a new `FaerieBackend` using the given Cretonne target.
|
||||
/// Create a new `FaerieBackend` using the given Cranelift target.
|
||||
fn new(builder: FaerieBuilder) -> Self {
|
||||
Self {
|
||||
artifact: faerie::Artifact::new(builder.isa.triple().clone(), builder.name),
|
||||
@@ -143,7 +143,7 @@ impl Backend for FaerieBackend {
|
||||
fn define_function(
|
||||
&mut self,
|
||||
name: &str,
|
||||
ctx: &cretonne_codegen::Context,
|
||||
ctx: &cranelift_codegen::Context,
|
||||
namespace: &ModuleNamespace<Self>,
|
||||
code_size: u32,
|
||||
) -> ModuleResult<FaerieCompiledFunction> {
|
||||
@@ -290,7 +290,7 @@ impl Backend for FaerieBackend {
|
||||
}
|
||||
|
||||
/// This is the output of `Module`'s
|
||||
/// [`finish`](../cretonne_module/struct.Module.html#method.finish) function.
|
||||
/// [`finish`](../cranelift_module/struct.Module.html#method.finish) function.
|
||||
/// It provides functions for writing out the object file to memory or a file.
|
||||
pub struct FaerieProduct {
|
||||
/// Faerie artifact with all functions, data, and links from the module defined
|
||||
|
||||
Reference in New Issue
Block a user