Change how flags are stored in serialized modules.

This commit changes how both the shared flags and ISA flags are stored in the
serialized module to detect incompatibilities when a serialized module is
instantiated.

It improves the error reporting when a compiled module has mismatched shared
flags.
This commit is contained in:
Peter Huene
2021-04-01 19:32:15 -07:00
parent 4ad0099da4
commit 0ddfe97a09
17 changed files with 194 additions and 186 deletions

View File

@@ -5,7 +5,7 @@ use crate::ir;
use crate::isa::{EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa};
use crate::machinst::*;
use crate::regalloc::RegisterSet;
use crate::settings::Flags;
use crate::settings::{self, Flags};
#[cfg(feature = "testing_hooks")]
use crate::regalloc::RegDiversions;
@@ -58,12 +58,8 @@ impl TargetIsa for TargetIsaAdapter {
self.backend.flags()
}
fn enabled_isa_flags(&self) -> Vec<String> {
self.backend.enabled_isa_flags()
}
fn is_flag_enabled(&self, flag: &str) -> bool {
self.backend.is_flag_enabled(flag)
fn isa_flags(&self) -> Vec<settings::Value> {
self.backend.isa_flags()
}
fn hash_all_flags(&self, hasher: &mut dyn Hasher) {