Skip to content

Remove internal use of auto from temp_var_type when creating temporaries

Matt Wala requested to merge remove-auto-from-insn-temp-var-type into master

auto is deprecated as a variable type, but it's used internally whenever untyped temporaries are created, which leads to suprising DeprecationWarnings.

Switching to None is not ideal, because None is already used in temp_var_type to represent no value.

Hence, this change introduces an "optional" object wrapper to loopy and uses it to represent the absence of a temp_var_type in an assignment instruction.

This change also:

  • fixes a deprecated usage in the tutorial
  • makes warnings about lp.auto as dtype more informative
Edited by Matt Wala

Merge request reports

Loading