Commit 31b3e72d authored by Yi Lin's avatar Yi Lin

Merge branch 'ir-formatting' into 'develop'

Ir formatting

See merge request !44
parents 017048a8 f63c1a8a
Pipeline #1223 passed with stages
in 53 minutes and 49 seconds
This diff is collapsed.
......@@ -327,11 +327,11 @@ impl MuFunctionVersion {
match callee.v {
TreeNode_::Instruction(_) => {}
TreeNode_::Value(ref pv) => {
match pv.v {
Value_::Constant(Constant::FuncRef(id)) => {
match &pv.v {
&Value_::Constant(Constant::FuncRef(ref func)) => {
ret.insert(
inst.id(),
(id, inst.has_exception_clause())
(func.id(), inst.has_exception_clause())
);
}
_ => {}
......@@ -1103,8 +1103,8 @@ impl Value {
}
}
const DISPLAY_ID: bool = true;
const DISPLAY_TYPE: bool = true;
const DISPLAY_ID: bool = false;
const DISPLAY_TYPE: bool = false;
const PRINT_ABBREVIATE_NAME: bool = true;
impl fmt::Debug for Value {
......@@ -1117,17 +1117,29 @@ impl fmt::Display for Value {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if DISPLAY_TYPE {
match self.v {
Value_::SSAVar(_) => write!(f, "{}(%{})", self.ty, self.hdr),
Value_::Constant(ref c) => write!(f, "{}({})", self.ty, c),
Value_::Global(ref ty) => write!(f, "{}(@{})", ty, self.hdr),
Value_::Memory(ref mem) => write!(f, "%{}{})", self.hdr, mem)
Value_::SSAVar(_) => write!(f, "/*<{}>*/{}", self.ty, self.hdr),
Value_::Constant(ref c) => {
if self.is_func_const() {
write!(f, "/*<{}>*/{}", self.ty, c)
} else {
write!(f, "<{}>{}", self.ty, c)
}
}
Value_::Global(ref ty) => write!(f, "/*<{}>*/@{}", ty, self.hdr),
Value_::Memory(ref mem) => write!(f, "/*<{}>*/{}{}", self.ty, self.hdr, mem)
}
} else {
match self.v {
Value_::SSAVar(_) => write!(f, "%{}", self.hdr),
Value_::Constant(ref c) => write!(f, "{}", c),
Value_::SSAVar(_) => write!(f, "{}", self.hdr),
Value_::Constant(ref c) => {
if self.is_func_const() {
write!(f, "{}", c)
} else {
write!(f, "<{}>{}", self.ty, c)
}
}
Value_::Global(_) => write!(f, "@{}", self.hdr),
Value_::Memory(ref mem) => write!(f, "%{}{}", self.hdr, mem)
Value_::Memory(ref mem) => write!(f, "{}{}", self.hdr, mem)
}
}
}
......@@ -1232,7 +1244,7 @@ pub enum Constant {
/// double constants
Double(f64),
/// function reference
FuncRef(MuID),
FuncRef(MuEntityRef),
/// vector constant (currently not used)
Vector(Vec<Constant>),
/// null reference
......@@ -1250,12 +1262,20 @@ impl fmt::Display for Constant {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
&Constant::Int(v) => write!(f, "{}", v as i64),
&Constant::IntEx(ref v) => write!(f, "IntEx {:?}", v),
&Constant::IntEx(ref v) => {
let mut res = format!("");
// Stored in little-endian order, but we need to display it in big-endian order
for i in 1..v.len() + 1 {
res.push_str(format!("{:016X}", v[v.len() - i]).to_string().as_str());
}
write!(f, "0x{}", res)
}
&Constant::Float(v) => write!(f, "{}", v),
&Constant::Double(v) => write!(f, "{}", v),
// &Constant::IRef(v) => write!(f, "{}", v),
&Constant::FuncRef(v) => write!(f, "FuncRef {}", v),
&Constant::FuncRef(ref v) => write!(f, "{}", v.name),
&Constant::Vector(ref v) => {
// TODO: Make this Muc compatible?
write!(f, "[").unwrap();
for i in 0..v.len() {
write!(f, "{}", v[i]).unwrap();
......@@ -1265,8 +1285,8 @@ impl fmt::Display for Constant {
}
write!(f, "]")
}
&Constant::NullRef => write!(f, "NullRef"),
&Constant::ExternSym(ref name) => write!(f, "ExternSym({})", name),
&Constant::NullRef => write!(f, "NULL"),
&Constant::ExternSym(ref name) => write!(f, "EXTERN \\\"{}\\\"", name),
&Constant::List(ref vec) => {
write!(f, "List(").unwrap();
......@@ -1431,8 +1451,8 @@ pub struct MuEntityHeader {
id: MuID,
name: MuName
}
rodal_struct!(MuEntityHeader{id, name});
pub type MuEntityRef = MuEntityHeader;
impl Clone for MuEntityHeader {
fn clone(&self) -> Self {
......@@ -1568,22 +1588,12 @@ impl MuEntityHeader {
}
/// an abbreviate (easy reading) version of the name
fn abbreviate_name(&self) -> String {
let split: Vec<&str> = self.name.split('.').collect();
let mut ret = "".to_string();
for i in 0..split.len() - 1 {
ret.push(match split[i].chars().next() {
Some(c) => c,
None => '_'
});
ret.push('.');
pub fn abbreviate_name(&self) -> String {
if PRINT_ABBREVIATE_NAME {
self.name.split('.').last().unwrap().to_string()
} else {
(*self.name()).clone()
}
ret.push_str(split.last().unwrap());
ret
}
pub fn clone_with_id(&self, new_id: MuID) -> MuEntityHeader {
......@@ -1603,17 +1613,9 @@ impl PartialEq for MuEntityHeader {
impl fmt::Display for MuEntityHeader {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if DISPLAY_ID {
if PRINT_ABBREVIATE_NAME {
write!(f, "{} #{}", self.abbreviate_name(), self.id)
} else {
write!(f, "{} #{}", self.name(), self.id)
}
write!(f, "{}/*{}*/", self.abbreviate_name(), self.id)
} else {
if PRINT_ABBREVIATE_NAME {
write!(f, "{}", self.abbreviate_name())
} else {
write!(f, "{}", self.name())
}
write!(f, "{}", self.abbreviate_name())
}
}
}
......
......@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[derive(Copy, Clone, Debug, PartialEq)]
use std::fmt;
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum BinOp {
// BinOp Int(n) Int(n) -> Int(n)
Add,
......@@ -38,6 +38,11 @@ pub enum BinOp {
FDiv,
FRem
}
impl fmt::Display for BinOp {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", format!("{:?}", self).to_uppercase())
}
}
impl BinOp {
pub fn is_fp(self) -> bool {
......@@ -80,6 +85,11 @@ pub enum CmpOp {
FUNE,
FUNO
}
impl fmt::Display for CmpOp {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
impl CmpOp {
/// returns the CmpOp X for CmpOp Y, such that (a Y b) is equivalent to (b X a)
......@@ -225,6 +235,11 @@ pub enum ConvOp {
REFCAST,
PTRCAST
}
impl fmt::Display for ConvOp {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum AtomicRMWOp {
......@@ -240,3 +255,9 @@ pub enum AtomicRMWOp {
UMAX,
UMIN
}
impl fmt::Display for AtomicRMWOp {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
......@@ -390,6 +390,14 @@ impl MuType {
}
}
/// gets the signature of a funcref or ufuncptr type
pub fn get_sig(&self) -> Option<P<MuFuncSig>> {
match self.v {
MuType_::FuncRef(ref sig) | MuType_::UFuncPtr(ref sig) => Some(sig.clone()),
_ => None
}
}
/// gets a field's type of a struct type,
/// returns None if the type is not a struct or hybrid type
pub fn get_field_ty(&self, index: usize) -> Option<P<MuType>> {
......@@ -540,9 +548,9 @@ impl fmt::Display for MuType_ {
&MuType_::Tagref64 => write!(f, "tagref64"),
&MuType_::Vector(ref ty, size) => write!(f, "vector<{} {}>", ty, size),
&MuType_::FuncRef(ref sig) => write!(f, "funcref<{}>", sig),
&MuType_::UFuncPtr(ref sig) => write!(f, "ufuncref<{}>", sig),
&MuType_::Struct(ref tag) => write!(f, "{}(struct)", tag),
&MuType_::Hybrid(ref tag) => write!(f, "{}(hybrid)", tag)
&MuType_::UFuncPtr(ref sig) => write!(f, "ufuncptr<{}>", sig),
&MuType_::Struct(ref tag) => write!(f, "{}", tag),
&MuType_::Hybrid(ref tag) => write!(f, "{}", tag)
}
}
}
......@@ -643,7 +651,7 @@ impl fmt::Display for HybridType_ {
write!(f, " ").unwrap();
}
}
write!(f, "|{}>", self.var_ty)
write!(f, " {}>", self.var_ty)
}
}
......@@ -820,8 +828,8 @@ rodal_struct!(MuFuncSig{hdr, ret_tys, arg_tys});
impl fmt::Display for MuFuncSig {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "[{}] -> [{}]",
vec_utils::as_str(&self.arg_tys), vec_utils::as_str(&self.ret_tys))
write!(f, "({})->({})",
vec_utils::as_str_sp(&self.arg_tys), vec_utils::as_str_sp(&self.ret_tys))
}
}
......
......@@ -37,6 +37,7 @@ use std::usize;
use std::ops;
use std::collections::HashSet;
use std::sync::RwLock;
use compiler::backend::code_emission::{emit_mu_types, emit_mu_globals};
macro_rules! trace_emit {
($arg1:tt $($arg:tt)*) => {
......@@ -712,13 +713,13 @@ impl MachineCode for ASMCode {
}
}
fn replace_branch_dest(&mut self, inst: usize, new_dest: &str, succ: usize) {
fn replace_branch_dest(&mut self, inst: usize, old_succ: usize, new_dest: &str, succ: usize) {
{
let asm = &mut self.code[inst];
let inst = String::from(asm.code.split_whitespace().next().unwrap());
asm.code = format!("{} {}", inst, mangle_name(Arc::new(new_dest.to_string())));
asm.succs.clear();
asm.succs.retain(|&x| x != old_succ);
asm.succs.push(succ);
}
{
......@@ -731,10 +732,7 @@ impl MachineCode for ASMCode {
}
fn set_inst_nop(&mut self, index: usize) {
let ref mut inst = self.code[index];
inst.code.clear();
inst.defines.clear();
inst.uses.clear();
self.code[index].code.clear();
}
fn remove_unnecessary_callee_saved(&mut self, used_callee_saved: Vec<MuID>) -> HashSet<MuID> {
......@@ -3644,6 +3642,9 @@ pub fn emit_context_with_reloc(
use std::path;
use std::io::prelude::*;
emit_mu_types("", vm);
emit_mu_globals("", vm);
debug!("---Emit VM Context---");
create_emit_directory(vm);
......
......@@ -145,7 +145,7 @@ impl<'a> InstructionSelection {
self.process_dest(&ops, fallthrough_dest, f_content, f_context, vm);
self.process_dest(&ops, branch_dest, f_content, f_context, vm);
let branch_target = f_content.get_block(branch_dest.target).name();
let branch_target = f_content.get_block(branch_dest.target.id()).name();
let ref cond = ops[cond];
......@@ -178,8 +178,11 @@ impl<'a> InstructionSelection {
self.backend.emit_b(branch_target);
} else {
self.backend.emit_b_cond(cond[0], branch_target.clone());
if cond.len() == 2 {
self.finish_block();
self.start_block(
make_block_name(&node.name(), "second_condition")
);
self.backend.emit_b_cond(cond[1], branch_target);
}
}
......@@ -188,6 +191,7 @@ impl<'a> InstructionSelection {
let cond_reg = self.emit_ireg(cond, f_content, f_context, vm);
self.backend.emit_tbnz(&cond_reg, 0, branch_target.clone());
};
self.finish_block();
}
Instruction_::Select {
......@@ -311,11 +315,12 @@ impl<'a> InstructionSelection {
self.process_dest(&ops, dest, f_content, f_context, vm);
let target = f_content.get_block(dest.target).name();
let target = f_content.get_block(dest.target.id()).name();
trace!("emit branch1");
// jmp
self.backend.emit_b(target);
self.finish_block();
}
Instruction_::Switch {
......@@ -339,7 +344,7 @@ impl<'a> InstructionSelection {
// process dest
self.process_dest(&ops, case_dest, f_content, f_context, vm);
let target = f_content.get_block(case_dest.target).name();
let target = f_content.get_block(case_dest.target.id()).name();
let mut imm_val = 0 as u64;
// Is one of the arguments a valid immediate?
......@@ -375,8 +380,9 @@ impl<'a> InstructionSelection {
// emit default
self.process_dest(&ops, default, f_content, f_context, vm);
let default_target = f_content.get_block(default.target).name();
let default_target = f_content.get_block(default.target.id()).name();
self.backend.emit_b(default_target);
self.finish_block();
} else {
panic!("expecting cond in switch to be ireg: {}", cond);
}
......@@ -1015,7 +1021,6 @@ impl<'a> InstructionSelection {
// load_start:
self.start_block(blk_load_start.clone());
// Load the value:
if use_acquire {
self.backend.emit_ldaxp(&res_l, &res_h, &temp_loc);
......@@ -1034,7 +1039,11 @@ impl<'a> InstructionSelection {
}
// If the store failed, then branch back to 'load_start:'
self.backend.emit_cbnz(&success, blk_load_start.clone())
self.backend.emit_cbnz(&success, blk_load_start.clone());
self.finish_block();
self.start_block(
make_block_name(&node.name(), "load_finished")
);
}
}
} else {
......@@ -1179,7 +1188,11 @@ impl<'a> InstructionSelection {
}
// If the store failed, then branch back to 'store_start:'
self.backend.emit_cbnz(&success, blk_store_start.clone())
self.backend.emit_cbnz(&success, blk_store_start.clone());
self.finish_block();
self.start_block(
make_block_name(&node.name(), "store_finished")
)
}
}
} else {
......@@ -1312,7 +1325,8 @@ impl<'a> InstructionSelection {
self.backend.emit_fcmp(&res_value, &expected);
}
self.backend.emit_b_cond("NE", blk_cmpxchg_failed.clone());
self.finish_block();
self.start_block(make_block_name(&node.name(), "cmpxchg_store"));
if use_release {
match desired.ty.v {
// Have to store a temporary GPR
......@@ -1813,8 +1827,8 @@ impl<'a> InstructionSelection {
CALLER_SAVED_REGS.to_vec(),
true
);
self.record_callsite(None, callsite.unwrap(), 0);
self.finish_block();
}
// Runtime Entry
......@@ -4672,13 +4686,18 @@ impl<'a> InstructionSelection {
self.record_callsite(resumption, callsite.unwrap(), res_stack_size);
if resumption.is_some() {
self.finish_block();
let block_name = make_block_name(&node.name(), "stack_resumption");
self.start_block(block_name);
}
self.emit_unload_arguments(inst.value.as_ref().unwrap(), res_locs, f_context, vm);
emit_add_u64(self.backend.as_mut(), &SP, &SP, res_stack_size as u64);
if resumption.is_some() {
self.backend
.emit_b(resumption.as_ref().unwrap().normal_dest.target.name());
self.finish_block();
}
}
}
......@@ -4687,7 +4706,7 @@ impl<'a> InstructionSelection {
f_content: &FunctionContent
) -> Option<MuName> {
if resumption.is_some() {
let target_id = resumption.unwrap().exn_dest.target;
let target_id = resumption.unwrap().exn_dest.target.id();
Some(f_content.get_block(target_id).name())
} else {
None
......@@ -4700,13 +4719,13 @@ impl<'a> InstructionSelection {
callsite: ValueLocation,
stack_arg_size: usize
) {
let target_block = match resumption {
Some(rd) => rd.exn_dest.target,
let target_block_id = match resumption {
Some(rd) => rd.exn_dest.target.id(),
None => 0
};
self.current_callsites
.push_back((callsite.to_relocatable(), target_block, stack_arg_size));
.push_back((callsite.to_relocatable(), target_block_id, stack_arg_size));
}
fn emit_mu_call(
......@@ -4853,9 +4872,8 @@ impl<'a> InstructionSelection {
);
if resumption.is_some() {
let ref normal_dest = resumption.as_ref().unwrap().normal_dest;
let normal_target_name = f_content.get_block(normal_dest.target).name();
self.backend.emit_b(normal_target_name);
self.backend
.emit_b(resumption.as_ref().unwrap().normal_dest.target.name());
}
}
}
......@@ -4890,7 +4908,7 @@ impl<'a> InstructionSelection {
// }
//
let ref target_args = f_content
.get_block(dest.target)
.get_block(dest.target.id())
.content
.as_ref()
.unwrap()
......@@ -4911,8 +4929,6 @@ impl<'a> InstructionSelection {
f_context: &mut FunctionContext,
vm: &VM
) {
trace!("ISAAC: sig[{}] args ({:?})", sig, args);
let prologue_block = Arc::new(format!("{}:{}", self.current_fv_name, PROLOGUE_BLOCK_NAME));
self.start_block(prologue_block);
......@@ -4991,9 +5007,6 @@ impl<'a> InstructionSelection {
f_context: &mut FunctionContext,
vm: &VM
) {
trace!("ISAAC: unload_arguments args ({:?})", args);
trace!("ISAAC: locations ({:?})", locations);
// unload arguments
// Read arguments starting from FP+16 (FP points to the frame record
// (the previous FP and LR)
......@@ -5832,8 +5845,8 @@ impl<'a> InstructionSelection {
fn node_funcref_const_to_id(&mut self, op: &TreeNode) -> MuID {
match op.v {
TreeNode_::Value(ref pv) => {
match pv.v {
Value_::Constant(Constant::FuncRef(id)) => id,
match &pv.v {
&Value_::Constant(Constant::FuncRef(ref hdr)) => hdr.id(),
_ => panic!("expected a funcref const")
}
}
......
......@@ -2061,11 +2061,15 @@ pub fn emit_ireg_value(
tmp
}
&Constant::FuncRef(func_id) => {
&Constant::FuncRef(ref func) => {
let tmp = make_temporary(f_context, pv.ty.clone(), vm);
let mem =
make_value_symbolic(vm.get_name_for_func(func_id), true, &ADDRESS_TYPE, vm);
let mem = make_value_symbolic(
vm.get_name_for_func(func.id()),
true,
&ADDRESS_TYPE,
vm
);
emit_calculate_address(backend, &tmp, &mem, vm);
tmp
}
......@@ -2078,7 +2082,21 @@ pub fn emit_ireg_value(
_ => panic!("expected ireg")
}
}
_ => panic!("expected ireg")
Value_::Global(_) => {
let tmp = make_temporary(f_context, pv.ty.clone(), vm);
let mem = make_value_symbolic(pv.name(), true, &pv.ty, vm);
emit_calculate_address(backend, &tmp, &mem, vm);
tmp
}
Value_::Memory(ref mem) => {
//make_value_from_memory(mem: MemoryLocation, ty: &P<MuType>, vm: &VM)
let mem = make_value_from_memory(mem.clone(), &pv.ty, vm);
let tmp = make_temporary(f_context, pv.ty.clone(), vm);
emit_calculate_address(backend, &tmp, &mem, vm);
tmp
}
}
}
......@@ -2746,7 +2764,7 @@ fn emit_move_value_to_value(
emit_mov_u64(backend, dest, imm);
} else if src.is_func_const() {
let func_id = match src.v {
Value_::Constant(Constant::FuncRef(id)) => id,
Value_::Constant(Constant::FuncRef(ref func)) => func.id(),
_ => unreachable!()
};
let mem =
......
......@@ -826,7 +826,7 @@ impl MachineCode for ASMCode {
}
/// replace destination for a jump instruction
fn replace_branch_dest(&mut self, inst: usize, new_dest: &str, succ: MuID) {
fn replace_branch_dest(&mut self, inst: usize, old_succ: usize, new_dest: &str, succ: MuID) {
{
let asm = &mut self.code[inst];
......@@ -834,7 +834,7 @@ impl MachineCode for ASMCode {
"jmp {}",
symbol(&mangle_name(Arc::new(new_dest.to_string())))
);
asm.succs.clear();
asm.succs.retain(|&x| x != old_succ);
asm.succs.push(succ);
}
{
......@@ -4143,7 +4143,7 @@ pub fn emit_sym_table(vm: &VM) {
use std::collections::HashMap;
use compiler::backend::code_emission::emit_mu_types;
use compiler::backend::code_emission::{emit_mu_types, emit_mu_globals};
/// emit vm context for current session, considering relocation symbols/fields from the client
pub fn emit_context_with_reloc(
......@@ -4155,6 +4155,7 @@ pub fn emit_context_with_reloc(
use std::io::prelude::*;
emit_mu_types("", vm);
emit_mu_globals("", vm);
// creates emit directy, and file
debug!("---Emit VM Context---");
......
......@@ -231,7 +231,7 @@ impl<'a> InstructionSelection {
self.process_dest(&ops, fallthrough_dest, f_content, f_context, vm);
self.process_dest(&ops, branch_dest, f_content, f_context, vm);
let branch_target = f_content.get_block(branch_dest.target).name();
let branch_target = f_content.get_block(branch_dest.target.id()).name();
let ref cond = ops[cond];
if self.match_cmp_res(cond) {
......@@ -539,7 +539,7 @@ impl<'a> InstructionSelection {
self.process_dest(&ops, dest, f_content, f_context, vm);
let target = f_content.get_block(dest.target).name();
let target = f_content.get_block(dest.target.id()).name();
// jmp
self.backend.emit_jmp(target);
}
......@@ -567,7 +567,7 @@ impl<'a> InstructionSelection {
// process dest
self.process_dest(&ops, case_dest, f_content, f_context, vm);
let target = f_content.get_block(case_dest.target).name();
let target = f_content.get_block(case_dest.target.id()).name();
if self.match_iimm(case_op) {
let imm = self.node_iimm_to_i32(case_op);
......@@ -602,7 +602,7 @@ impl<'a> InstructionSelection {
// emit default
self.process_dest(&ops, default, f_content, f_context, vm);
let default_target = f_content.get_block(default.target).name();
let default_target = f_content.get_block(default.target.id()).name();
self.backend.emit_jmp(default_target);
} else {
// other EQ-comparable types, e.g. floating point
......@@ -4476,7 +4476,7 @@ impl<'a> InstructionSelection {
// check if this call has exception clause - need to tell backend about this
let potentially_excepting = {
if resumption.is_some() {
let target_id = resumption.unwrap().exn_dest.target;
let target_id = resumption.unwrap().exn_dest.target.id();
Some(f_content.get_block(target_id).name())
} else {
None
......@@ -4534,10 +4534,10 @@ impl<'a> InstructionSelection {
if resumption.is_some() {
// record exception branch
let ref exn_dest = resumption.as_ref().unwrap().exn_dest;
let target_block = exn_dest.target;
let target_block_id = exn_dest.target.id();
self.current_callsites
.push_back((callsite.to_relocatable(), target_block, stack_arg_size));
.push_back((callsite.to_relocatable(), target_block_id, stack_arg_size));
// insert an intermediate block to branch to normal
// the branch is inserted later (because we need to deal with postcall convention)
......@@ -4561,10 +4561,8 @@ impl<'a> InstructionSelection {
// jump to target block
if resumption.is_some() {
let ref normal_dest = resumption.as_ref().unwrap().normal_dest;
let normal_target_name = f_content.get_block(normal_dest.target).name();
self.backend.emit_jmp(normal_target_name);
self.backend
.emit_jmp(resumption.as_ref().unwrap().normal_dest.target.name());
}
}
......@@ -4716,7 +4714,7 @@ impl<'a> InstructionSelection {
// arguments are ready, we are starting continuation
let potential_exception_dest = match resumption {
Some(ref resumption) => {
let target_id = resumption.exn_dest.target;
let target_id = resumption.exn_dest.target.id();
Some(f_content.get_block(target_id).name())
}
None => None
......@@ -4766,7 +4764,7 @@ impl<'a> InstructionSelection {
if !is_kill {
// record this callsite
let target_block_id = match resumption {
Some(resumption) => resumption.exn_dest.target,
Some(resumption) => resumption.exn_dest.target.id(),
None => 0
};
self.current_callsites
......@@ -4871,7 +4869,7 @@ impl<'a> InstructionSelection {