From 260ea81c829ef870ee8243f90b2cbae62902dd65 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 28 Feb 2016 18:44:45 +0000 Subject: [PATCH] * improve cse on record/array accesses git-svn-id: trunk@33134 - --- compiler/optcse.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/optcse.pas b/compiler/optcse.pas index a7c0d08cbf..2cef181896 100644 --- a/compiler/optcse.pas +++ b/compiler/optcse.pas @@ -165,7 +165,10 @@ unit optcse; (actualtargetnode(@n)^.flags*[nf_write,nf_modify,nf_address_taken]=[]) and ((((tstoreddef(n.resultdef).is_intregable or tstoreddef(n.resultdef).is_fpuregable or tstoreddef(n.resultdef).is_const_intregable) and { is_int/fpuregable allows arrays and records to be in registers, cse cannot handle this } - (not(n.resultdef.typ in [arraydef,recorddef]))) or is_dynamic_array(n.resultdef)) and + (not(n.resultdef.typ in [arraydef,recorddef]))) or + is_dynamic_array(n.resultdef) or + ((n.resultdef.typ in [arraydef,recorddef]) and not(is_special_array(tstoreddef(n.resultdef))) and not(tstoreddef(n.resultdef).is_intregable) and not(tstoreddef(n.resultdef).is_fpuregable)) + ) and { same for voiddef } not(is_void(n.resultdef)) and { adding tempref and callpara nodes itself is worthless but