From e5f78fb1d44b825ee9195660f4387680055137dc Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Mon, 17 Feb 2020 18:30:54 -0300 Subject: Replace LinkedList by IntrusiveList to avoid allocations on JIT (#931) * Replace LinkedList by IntrusiveList to avoid allocations on JIT * Fix wrong replacements --- ARMeilleure/CodeGen/X86/CodeGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ARMeilleure/CodeGen/X86/CodeGenerator.cs') diff --git a/ARMeilleure/CodeGen/X86/CodeGenerator.cs b/ARMeilleure/CodeGen/X86/CodeGenerator.cs index 0268665c..d0cb77f8 100644 --- a/ARMeilleure/CodeGen/X86/CodeGenerator.cs +++ b/ARMeilleure/CodeGen/X86/CodeGenerator.cs @@ -157,11 +157,11 @@ namespace ARMeilleure.CodeGen.X86 UnwindInfo unwindInfo = WritePrologue(context); - foreach (BasicBlock block in cfg.Blocks) + for (BasicBlock block = cfg.Blocks.First; block != null; block = block.ListNext) { context.EnterBlock(block); - foreach (Node node in block.Operations) + for (Node node = block.Operations.First; node != null; node = node.ListNext) { if (node is Operation operation) { -- cgit v1.2.3-70-g09d2