******************************************************************************** ******************************************************************************** ******************************************************************************** To: spin-comp@cs Subject: Division Querying / Filters Date: Thu, 22 May 1997 08:59:05 PDT From: Brian Grant As long as we're in the process of redesigning the BTA implementation, is there reason we should support division querying, similar to the way that Schism's filters do? That is, should we support predicates that test whether a variable is static or dynamic? For example: bool is_static(variable); bool is_dynamic(variable); It doesn't appear to be difficult to implement. The predicates can be ignored during the BTA, until the divisions are split. While splitting, the predicates can be evaluated for each division, enabling the branch, the not-taken path, and any divisions created on the not-taken path to be eliminated. I thought of an example demonstrating its use: specialize f(x, n) on (n); int f(int x, int n) { int i, s; if (is_static(n) && (n < UNROLL_LIMIT)) make_static(i); for (i = 0; i < n; i++) s += x; return s; } Pretty cool that we could combine BTA-time, static, and dynamic predicates. I just thought of this when I was going over related work for the talk. --Brian