Class ControlFlow

  extended by ibis.satin.impl.syncrewriter.analyzer.ControlFlow
All Implemented Interfaces:

public class ControlFlow
extends Object
implements Analyzer

An implementation of an Analyzer analyzing with control flow awareness.

Constructor Summary
Method Summary
 org.apache.bcel.generic.InstructionHandle[] proposeSyncInsertion(SpawningMethod spawningMethod, Debug d)
          Proposes instructionHandles before which a sync should be inserted.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ControlFlow()
Method Detail


public org.apache.bcel.generic.InstructionHandle[] proposeSyncInsertion(SpawningMethod spawningMethod,
                                                                        Debug d)
                                                                 throws SyncInsertionProposalFailure
Proposes instructionHandles before which a sync should be inserted. If the result of a spawnable method is not stored, but given to a method for example, this analyzer can't do its job and it will propose syncs right after the spawnable calls. It tries to find all store-to-load paths for every spawnable call and will then try to find the earliest load in the last basic blocks of those store-to-load paths. If there are other spawnable calls after the earliest load but within the same basic blocks, it will try to find again the earliest loads for these spawnable calls.

Specified by:
proposeSyncInsertion in interface Analyzer
spawningMethod - The spawnable method in which syncs should be inserted.
d - A debug instance for logging error, warning and debug messages.
The instructionhandles before which the syncrewriter should insert sync statements.
SyncInsertionProposalFailure - When the analysis fails.

The Ibis project