-
rtoy authored
use an IR1 attribute but allow arbitrary functions to determine if the result is used or not. This allows us to handle SORT and ADJUST-ARRAY depending on the args. Use 19c/boot-2005-11-1.lisp to bootstrap this change. compiler/knownfun.lisp: o Remove IMPORTANT-RESULT attribute. o Add new slot to function-info the hold the function to indicate if the result is not used. o Adjust %defknown with a new keyword arg :result-not-used for the new slot. o Add functions for the result-not-used arg for o SORT-RESULT-NOT-USED-P: non-NIL if the sequence might be a list. o ADJUST-ARRAY-RESULT-NOT-USED-P: non-NIL if the array is not known to be adjustable. o FUNCTION-RESULT-NOT-USED-P: non-NIL if function result must be used (for functions like nreverse). compiler/ir1opt.lisp: o Remove now unused function CHECK-IMPORTANT-RESULT o Add check in IR1-OPTIMIZE-COMBINATION to see if function result should be used. compiler/fndb.lisp: o Remove IMPORTANT-RESULT attribute and replace with :result-not-used.
rtoy authoreduse an IR1 attribute but allow arbitrary functions to determine if the result is used or not. This allows us to handle SORT and ADJUST-ARRAY depending on the args. Use 19c/boot-2005-11-1.lisp to bootstrap this change. compiler/knownfun.lisp: o Remove IMPORTANT-RESULT attribute. o Add new slot to function-info the hold the function to indicate if the result is not used. o Adjust %defknown with a new keyword arg :result-not-used for the new slot. o Add functions for the result-not-used arg for o SORT-RESULT-NOT-USED-P: non-NIL if the sequence might be a list. o ADJUST-ARRAY-RESULT-NOT-USED-P: non-NIL if the array is not known to be adjustable. o FUNCTION-RESULT-NOT-USED-P: non-NIL if function result must be used (for functions like nreverse). compiler/ir1opt.lisp: o Remove now unused function CHECK-IMPORTANT-RESULT o Add check in IR1-OPTIMIZE-COMBINATION to see if function result should be used. compiler/fndb.lisp: o Remove IMPORTANT-RESULT attribute and replace with :result-not-used.
Loading