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

View File

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

View File

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

View File

@@ -2,9 +2,7 @@
use crate::binemit; use crate::binemit;
use crate::ir; use crate::ir;
use crate::isa::{ use crate::isa::{EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa};
EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa,
};
use crate::machinst::*; use crate::machinst::*;
use crate::regalloc::RegisterSet; use crate::regalloc::RegisterSet;
use crate::settings::{self, Flags}; 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. /// Build a [SingleFunctionCompiler] using the host machine's ISA and the passed flags.
pub fn with_host_isa(flags: settings::Flags) -> Self { pub fn with_host_isa(flags: settings::Flags) -> Self {
let builder = builder_with_options(true) let builder =
.expect("Unable to build a TargetIsa for the current host"); builder_with_options(true).expect("Unable to build a TargetIsa for the current host");
let isa = builder.finish(flags); let isa = builder.finish(flags);
Self::new(isa) Self::new(isa)
} }