ispc/ispc — Issue #133: Should always generate masked and unmasked versions of functions
Author: mmp
Created: 2011-12-06 22:42:31+00:00
State: open
Labels: performance

Even for non-exported functions, this is worthwhile. Specifically, there are various times when we know when generating code that the mask is all on; in those cases, we'd do better to call an unmasked version of the function. (In general, function calls should probably have a check based on the @__is_compile_time_constant_mask() for this in their generated code.)

We currently get the effect of this benefit when we're inlining functions in the same file. But we lose it in the case of separate compilation. (We also recover it from the mask check at function start for complex functions, but that's wasteful for the cases when we know it statically...)