|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.sir.lowering.Vectorizable
public class Vectorizable
Determine if code is naively vectorizable by interleaving executions of different steady states.
$Id$
Invoked from vectorizeEnable
and from fusePipelinesOfVectorizableFilters
There should be no need to call methods in this class elsewhere.
Constructor Summary | |
---|---|
Vectorizable()
|
Method Summary | |
---|---|
static boolean |
hasSideEffects(SIRFilter f)
Check whether a filter has side effects (I/O). |
static boolean |
isDataDependent(SIRFilter f)
Check whether a filter's behavior is data dependent (other than through fields). |
static boolean |
isUseful(SIRStream str)
Determine whether a vectorizable stream may contain useful vector operations. |
static boolean |
vectorizable(SIRFilter f)
Check whether a filter could be naively vectorized by interleaving executions of different steady states. |
static Set<SIRFilter> |
vectorizableStr(SIRStream str)
Return set of naively vectorizable filters in stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Vectorizable()
Method Detail |
---|
public static Set<SIRFilter> vectorizableStr(SIRStream str)
vectorizable
for what makes a filter naively vectorizable.
str
- Stream to check
vectorizable
testpublic static boolean vectorizable(SIRFilter f)
f
- : a filter to check.
public static boolean hasSideEffects(SIRFilter f)
f
- : a filter to check
public static boolean isDataDependent(SIRFilter f)
push(arr[pop()]); foo = pop(); bar = peek(foo); foo = peek(5); if (foo > 0) baz++;You can check as to whether there is any possibility of a loop-carried dependency through fields by checking that (! StatelessDuplicate.hasMutableState(f)). Currently flow insensitive, context insensitive. Used without need for object state to check id a filter is data dependent. Is used, with need for object state, to determine number of vectorizable artihmetic ops in a vectorizable filter.
f
- : a filter to check.
public static boolean isUseful(SIRStream str)
str
- the SIRStream to check, in which all filters are vectorizable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |