This commit is contained in:
bjorn3
2021-06-21 13:24:46 +02:00
parent 9e5201d88f
commit 53ec12d519
5 changed files with 7 additions and 16 deletions

View File

@@ -25,9 +25,7 @@ pub(crate) struct InstructionGroupBuilder<'all_inst> {
impl<'all_inst> InstructionGroupBuilder<'all_inst> {
pub fn new(all_instructions: &'all_inst mut AllInstructions) -> Self {
Self {
all_instructions,
}
Self { all_instructions }
}
pub fn push(&mut self, builder: InstructionBuilder) {
@@ -449,13 +447,9 @@ impl Bindable for BoundInstruction {
fn bind(&self, parameter: impl Into<BindParameter>) -> BoundInstruction {
let mut modified = self.clone();
match parameter.into() {
BindParameter::Lane(lane_type) => modified
.value_types
.push(lane_type.into()),
BindParameter::Lane(lane_type) => modified.value_types.push(lane_type.into()),
BindParameter::Reference(reference_type) => {
modified
.value_types
.push(reference_type.into());
modified.value_types.push(reference_type.into());
}
}
modified.verify_bindings().unwrap();

View File

@@ -895,7 +895,6 @@ fn test_forward_images() {
);
}
#[test]
#[should_panic]
fn test_typeset_singleton_panic_nonsingleton_types() {

View File

@@ -8,7 +8,7 @@ pub mod settings;
pub mod types;
use crate::cdsl::formats::{FormatStructure, InstructionFormat};
use crate::cdsl::instructions::{AllInstructions};
use crate::cdsl::instructions::AllInstructions;
use crate::cdsl::settings::SettingGroup;
use crate::shared::entities::EntityRefs;

View File

@@ -2,9 +2,7 @@
use crate::binemit;
use crate::ir;
use crate::isa::{
EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa,
};
use crate::isa::{EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa};
use crate::machinst::*;
use crate::regalloc::RegisterSet;
use crate::settings::{self, Flags};

View File

@@ -48,8 +48,8 @@ impl SingleFunctionCompiler {
/// Build a [SingleFunctionCompiler] using the host machine's ISA and the passed flags.
pub fn with_host_isa(flags: settings::Flags) -> Self {
let builder = builder_with_options(true)
.expect("Unable to build a TargetIsa for the current host");
let builder =
builder_with_options(true).expect("Unable to build a TargetIsa for the current host");
let isa = builder.finish(flags);
Self::new(isa)
}