Skip to content

Commit 4400f25

Browse files
committed
Removed temporary locals, subtrees and LoadGlobalAlloc ptr node
1 parent 53bd231 commit 4400f25

File tree

26 files changed

+149
-855
lines changed

26 files changed

+149
-855
lines changed

cilly/src/bin/linker/main.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ fn main() {
448448
cilly::builtins::int128::u128_mul_ovf_check(&mut final_assembly, &mut overrides);
449449
cilly::builtins::f16::generate_f16_ops(&mut final_assembly, &mut overrides, *C_MODE);
450450
cilly::builtins::atomics::generate_all_atomics(&mut final_assembly, &mut overrides);
451-
cilly::builtins::stack_addr(&mut final_assembly, &mut overrides);
452451
cilly::builtins::transmute(&mut final_assembly, &mut overrides);
453452
cilly::builtins::create_slice(&mut final_assembly, &mut overrides);
454453
cilly::builtins::ovf_check_tuple(&mut final_assembly, &mut overrides);
@@ -515,7 +514,7 @@ fn main() {
515514
true,
516515
0,
517516
None,
518-
vec![],
517+
vec![(Type::Int(Int::I128), float128, Some(0))],
519518
vec![],
520519
cilly::Access::Public,
521520
NonZeroU32::new(16),

cilly/src/cil_iter.rs

-39
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ impl<'a> Iterator for CILIter<'a> {
149149
| CILNode::LDFtn(_)
150150
| CILNode::LDTypeToken(_)
151151
| CILNode::LocAllocAligned { tpe: _, align: _ }
152-
| CILNode::LoadGlobalAllocPtr { .. }
153152
| CILNode::LoadAddresOfTMPLocal
154-
| CILNode::PointerToConstValue(_)
155153
| CILNode::LoadTMPLocal
156154
| CILNode::GetException
157155
| CILNode::V2(_),
@@ -312,44 +310,7 @@ impl<'a> Iterator for CILIter<'a> {
312310
continue;
313311
}
314312
}
315-
CILIterElem::Node(CILNode::SubTrees(rn)) => {
316-
let (roots, node) = rn.as_ref();
317-
match (*idx - 1).cmp(&roots.len()) {
318-
std::cmp::Ordering::Less => {
319-
let root: &CILRoot = &roots[*idx - 1];
320-
*idx += 1;
321-
self.elems.push((0, CILIterElem::Root(root)));
322-
}
323-
std::cmp::Ordering::Equal => {
324-
*idx += 1;
325-
self.elems.push((0, CILIterElem::Node(node)));
326-
}
327-
std::cmp::Ordering::Greater => {
328-
self.elems.pop();
329-
}
330-
}
331-
332-
continue;
333-
}
334313

335-
CILIterElem::Node(CILNode::TemporaryLocal(pack)) => {
336-
let (_, roots, node) = pack.as_ref();
337-
match (*idx - 1).cmp(&roots.len()) {
338-
std::cmp::Ordering::Less => {
339-
let root: &CILRoot = &roots[*idx - 1];
340-
*idx += 1;
341-
self.elems.push((0, CILIterElem::Root(root)));
342-
}
343-
std::cmp::Ordering::Equal => {
344-
*idx += 1;
345-
self.elems.push((0, CILIterElem::Node(node)));
346-
}
347-
std::cmp::Ordering::Greater => {
348-
self.elems.pop();
349-
}
350-
}
351-
continue;
352-
}
353314
CILIterElem::Root(CILRoot::CallI {
354315
sig: _,
355316
args,

0 commit comments

Comments
 (0)