elide calls to empty glue

bd94c4e
Opened by Graydon Hoare at 2011-01-27 00:43:29

There are a few glue algorithms where we do structural recursion to generate calls into sub-glue functions for each slot in a structured value unnecessarily. We can discriminate between those structured values that have sub-structure (or dtors) and those that are simple leaves, and omit calls to their glue in some cases. For example, Trans.drop_slot on a structure like @(int,int) will call a helper to 'drop' the interior bits of the exterior tuple, despite the fact that it has no interesting substructure that needs processing. We should notice this and avoid emitting the call (the called glue is empty anyway).

  1. WONTFIX (not required for bootstrapping, also LLVM does this automatically)

    Graydon Hoare at 2011-01-27 00:43:29