OpenASIP  2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
OperationPool Class Reference

#include <OperationPool.hh>

Collaboration diagram for OperationPool:
Collaboration graph

Public Member Functions

 OperationPool ()
 
virtual ~OperationPool ()
 
Operationoperation (const char *name)
 
OperationIndexindex ()
 
bool sharesState (const Operation &op)
 

Static Public Member Functions

static void cleanupCache ()
 
static void setLLVMTargetInstrInfo (const llvm::MCInstrInfo *tid)
 

Private Member Functions

 OperationPool (const OperationPool &)
 Copying not allowed. More...
 
OperationPooloperator= (const OperationPool &)
 Assignment not allowed. More...
 

Private Attributes

OperationPoolPimplpimpl_
 Private implementation in a separate source file. More...
 

Detailed Description

OperationPool provides interface for obtaining operations of the target architecture template.

Definition at line 52 of file OperationPool.hh.

Constructor & Destructor Documentation

◆ OperationPool() [1/2]

OperationPool::OperationPool ( )

Constructor.

Records the search paths of the operation modules.

Definition at line 64 of file OperationPool.cc.

64  : pimpl_(new OperationPoolPimpl()) {
65 }

◆ ~OperationPool()

OperationPool::~OperationPool ( )
virtual

Destructor.

Cleans proxies and operations.

Definition at line 72 of file OperationPool.cc.

72  {
73  delete pimpl_;
74  pimpl_ = NULL;
75 }

References pimpl_.

◆ OperationPool() [2/2]

OperationPool::OperationPool ( const OperationPool )
private

Copying not allowed.

Member Function Documentation

◆ cleanupCache()

void OperationPool::cleanupCache ( )
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 84 of file OperationPool.cc.

84  {
86 }

References OperationPoolPimpl::cleanupCache().

Referenced by OpsetDialog::TransferDataToWindow().

Here is the call graph for this function:

◆ index()

OperationIndex & OperationPool::index ( )

◆ operation()

Operation & OperationPool::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.

Parameters
nameThe name of the operation.
Returns
The wanted operation.

Definition at line 99 of file OperationPool.cc.

99  {
100  return pimpl_->operation(name);
101 }

References OperationPoolPimpl::operation(), and pimpl_.

Referenced by MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), TDGen::analyzeMachineVectorRegisterClasses(), Peel2BBLoops::appendBB(), MachineStateBuilder::bindPortsToOperands(), ControlFlowGraph::buildMBBFromBB(), AddressSpaceCheck::check(), TTAProgram::CodeGenerator::createBreakOperation(), TTAProgram::CodeGenerator::createForLoopBufferInit(), OpsetDialog::createOperation(), OperationDAGBuilder::createOperationNode(), TDGen::createSelectPatterns(), TTAProgram::CodeGenerator::createTerminalFUPort(), VectorLSGenerator::createVectorLSU(), TTAProgram::CodeGenerator::createWhileLoopBufferInit(), FUGen::DAGNodeOperandWidth(), SocketBusConnCmd::Do(), llvm::LLVMTCEBuilder::emitComparisonForBranch(), llvm::LLVMTCEBuilder::emitGlobalXXtructorCalls(), llvm::LLVMTCEBuilder::emitInstruction(), llvm::LLVMTCEBuilder::emitOperationMacro(), llvm::LLVMTCEBuilder::emitRemaingingBrach(), llvm::LLVMTCEBuilder::emitReturn(), OperationDAGSelector::findDags(), MachineInfo::findWidestOperand(), TDGen::gatherAllMachineOperations(), Automagic::generateableDAGOperations(), ProGeTools::generateableDAGOperations(), CompiledSimCodeGenerator::generateTriggerCode(), CompiledSimCodeGenerator::handleOperation(), UniversalFunctionUnit::hasOperation(), MachineConnectivityCheck::isPortApplicableToWidths(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), Peel2BBLoops::negateOp(), OpsetDialog::onSelectOperation(), operandBindingsString(), MachineInfo::operandFromPort(), MachineConnectivityCheck::operandWidth(), UniversalFunctionUnit::operation(), OsalInterpreter::operation(), MachineInfo::osalOperation(), MIDDGNode::osalOperationName(), FUGen::parseOperations(), printLatexFunctionUnitDescription(), ConstantTransformer::runOnMachineFunction(), FUGen::scheduleOperations(), TTAProgram::TerminalFUPort::setHintOperation(), TTAProgram::TerminalFUPort::setOperation(), BFCopyRegWithOp::splitMove(), TTAProgram::TerminalFUPort::TerminalFUPort(), writeCustomOpMacros(), TDGen::writeInstrInfo(), TDGen::writeIntegerImmediateDefs(), TDGen::writeScalarOperationExploitations(), and TDGen::writeVectorLoadStoreOperationExploitations().

Here is the call graph for this function:

◆ operator=()

OperationPool& OperationPool::operator= ( const OperationPool )
private

Assignment not allowed.

◆ setLLVMTargetInstrInfo()

void OperationPool::setLLVMTargetInstrInfo ( const llvm::MCInstrInfo *  tid)
static

Used to force loading of OSAL data straight from LLVM backend data instead of the .opp XML files.

Definition at line 132 of file OperationPool.cc.

132  {
134 }

References OperationPoolPimpl::setLLVMTargetInstrInfo().

Referenced by llvm::LLVMTCEScheduler::runOnMachineFunction().

Here is the call graph for this function:

◆ sharesState()

bool OperationPool::sharesState ( const Operation op)

Checks globally from all the loaded operations whether the given operation shares state with any of them.

In case another operation affects this operation or vice-versa, they are assumed to share state. The shares-property has to be in only one of the operation's description.

Definition at line 123 of file OperationPool.cc.

123  {
124  return pimpl_->sharesState(op);
125 }

References pimpl_, and OperationPoolPimpl::sharesState().

Referenced by DataDependenceGraphBuilder::createSideEffectEdges(), and DataDependenceGraphBuilder::createTriggerDependencies().

Here is the call graph for this function:

Member Data Documentation

◆ pimpl_

OperationPoolPimpl* OperationPool::pimpl_
private

Private implementation in a separate source file.

Definition at line 71 of file OperationPool.hh.

Referenced by index(), operation(), sharesState(), and ~OperationPool().


The documentation for this class was generated from the following files:
OperationPoolPimpl::index
OperationIndex & index()
Definition: OperationPoolPimpl.cc:213
OperationPoolPimpl::cleanupCache
static void cleanupCache()
Definition: OperationPoolPimpl.cc:100
OperationPoolPimpl::sharesState
bool sharesState(const Operation &op)
Definition: OperationPoolPimpl.cc:219
OperationPoolPimpl::setLLVMTargetInstrInfo
static void setLLVMTargetInstrInfo(const llvm::MCInstrInfo *tid)
Definition: OperationPoolPimpl.hh:64
OperationPoolPimpl
Definition: OperationPoolPimpl.hh:53
OperationPoolPimpl::operation
Operation & operation(const char *name)
Definition: OperationPoolPimpl.cc:116
OperationPool::pimpl_
OperationPoolPimpl * pimpl_
Private implementation in a separate source file.
Definition: OperationPool.hh:71