OpenASIP
2.0
|
#include <OperationPoolPimpl.hh>
Public Member Functions | |
~OperationPoolPimpl () | |
Operation & | operation (const char *name) |
OperationIndex & | index () |
bool | sharesState (const Operation &op) |
Static Public Member Functions | |
static void | cleanupCache () |
static void | setLLVMTargetInstrInfo (const llvm::MCInstrInfo *tid) |
Private Types | |
typedef std::map< std::string, Operation * > | OperationTable |
Container for operations indexed by their names. More... | |
Private Member Functions | |
OperationPoolPimpl () | |
OperationPoolPimpl (const OperationPoolPimpl &) | |
Copying not allowed. More... | |
OperationPoolPimpl & | operator= (const OperationPoolPimpl &) |
Assignment not allowed. More... | |
Operation * | loadFromLLVM (const llvm::MCInstrDesc &tid) |
Private Attributes | |
OperationSerializer | serializer_ |
Static Private Attributes | |
static OperationBehaviorLoader * | loader_ |
Operation pool uses this to load behavior models of the operations. More... | |
static OperationIndex * | index_ |
Indexed table used to find out which operation module contains the given operation. More... | |
static OperationTable | operationCache_ |
Contains all operations that have been already requested by the client. More... | |
static std::vector< OperationBehaviorProxy * > | proxies_ |
Contains all operation behavior proxies. More... | |
static const llvm::MCInstrInfo * | llvmTargetInstrInfo_ |
If this is set, OSAL data is loaded from the TargetInstrInfo instead of .opp XML files. Used when calling the TCE scheduler from non-TTA LLVM targets. More... | |
Friends | |
class | OperationPool |
A private implementation class for OperationPool
Definition at line 53 of file OperationPoolPimpl.hh.
|
private |
Container for operations indexed by their names.
Definition at line 71 of file OperationPoolPimpl.hh.
OperationPoolPimpl::~OperationPoolPimpl | ( | ) |
|
private |
The constructor
Definition at line 75 of file OperationPoolPimpl.cc.
References OperationIndex::addPath(), index_, and Environment::osalPaths().
|
private |
Copying not allowed.
|
static |
Cleans up the static Operation cache.
Deletes also the Operation instances, so be sure you are not using them after calling this!
Definition at line 100 of file OperationPoolPimpl.cc.
References AssocTools::deleteAllValues(), index_, and operationCache_.
Referenced by OperationPool::cleanupCache().
OperationIndex & OperationPoolPimpl::index | ( | ) |
Returns the operation index of operation pool.
Definition at line 213 of file OperationPoolPimpl.cc.
References assert, and index_.
Referenced by OperationPool::index().
|
private |
Loads an OSAL Operation from LLVM TargetInstrDesc.
Used for avoiding the need for .xml OSAL databases when TCE scheduler is called directly for non-TTA LLVM targets.
Definition at line 164 of file OperationPoolPimpl.cc.
References Operation::addInput(), Operation::addOutput(), NullOperationBehavior::instance(), llvmTargetInstrInfo_, Operation::setBranch(), Operation::setCall(), Operation::setControlFlowOperation(), Operation::setReadsMemory(), Operation::setWritesMemory(), and Operand::UINT_WORD.
Referenced by operation().
Operation & OperationPoolPimpl::operation | ( | const char * | name | ) |
Looks up an operation identified by its name and returns a reference to it.
The first found operation is returned. If operation is not found, a null operation is returned.
name | The name of the operation. |
Definition at line 116 of file OperationPoolPimpl.cc.
References abortWithError, OperationIndex::effectiveOperation(), index_, NullOperationModule::instance(), NullOperation::instance(), llvmTargetInstrInfo_, loadFromLLVM(), TCEString::lower(), OperationIndex::moduleOf(), operationCache_, and StringTools::stringToLower().
Referenced by OperationPool::operation().
|
private |
Assignment not allowed.
|
inlinestatic |
Definition at line 64 of file OperationPoolPimpl.hh.
References llvmTargetInstrInfo_.
Referenced by OperationPool::setLLVMTargetInstrInfo().
bool OperationPoolPimpl::sharesState | ( | const Operation & | op | ) |
Definition at line 219 of file OperationPoolPimpl.cc.
References Operation::affectedByCount(), Operation::affectsCount(), Operation::dependsOn(), and operationCache_.
Referenced by OperationPool::sharesState().
|
friend |
Definition at line 55 of file OperationPoolPimpl.hh.
|
staticprivate |
Indexed table used to find out which operation module contains the given operation.
Definition at line 82 of file OperationPoolPimpl.hh.
Referenced by cleanupCache(), index(), operation(), and OperationPoolPimpl().
|
staticprivate |
If this is set, OSAL data is loaded from the TargetInstrInfo instead of .opp XML files. Used when calling the TCE scheduler from non-TTA LLVM targets.
Definition at line 93 of file OperationPoolPimpl.hh.
Referenced by loadFromLLVM(), operation(), and setLLVMTargetInstrInfo().
|
staticprivate |
Operation pool uses this to load behavior models of the operations.
Definition at line 79 of file OperationPoolPimpl.hh.
|
staticprivate |
Contains all operations that have been already requested by the client.
Definition at line 87 of file OperationPoolPimpl.hh.
Referenced by cleanupCache(), operation(), and sharesState().
|
staticprivate |
Contains all operation behavior proxies.
Definition at line 89 of file OperationPoolPimpl.hh.
|
private |
Definition at line 84 of file OperationPoolPimpl.hh.