OpenASIP
2.0
|
#include <Operation.hh>
Public Types | |
typedef OperationBehavior::InputOperandVector | InputOperandVector |
Public Member Functions | |
Operation (const TCEString &name, OperationBehavior &behavior) | |
virtual | ~Operation () |
virtual TCEString | name () const |
virtual TCEString | description () const |
virtual void | addDag (const TCEString &code) |
virtual void | removeDag (int index) |
virtual int | dagCount () const |
virtual OperationDAG & | dag (int index) const |
virtual TCEString | dagCode (int index) const |
virtual void | setDagCode (int index, const TCEString &code) |
virtual TCEString | dagError (int index) const |
virtual int | numberOfInputs () const |
virtual int | numberOfOutputs () const |
virtual int | operandCount () const |
virtual bool | isVectorOperation () const |
virtual bool | usesMemory () const |
virtual bool | readsMemory () const |
virtual bool | writesMemory () const |
virtual bool | canTrap () const |
virtual bool | hasSideEffects () const |
virtual bool | isClocked () const |
virtual bool | isControlFlowOperation () const |
virtual bool | dependsOn (const Operation &op) const |
virtual void | setReadsMemory (bool setting) |
virtual void | setWritesMemory (bool setting) |
virtual int | affectsCount () const |
virtual int | affectedByCount () const |
virtual TCEString | affects (unsigned int i) const |
virtual TCEString | affectedBy (unsigned int i) const |
virtual bool | canSwap (int id1, int id2) const |
virtual bool | isCall () const |
virtual bool | isBranch () const |
virtual bool | isBaseOffsetMemOperation () const |
virtual void | setCall (bool setting) |
virtual void | setBranch (bool setting) |
virtual void | setControlFlowOperation (bool setting) |
virtual bool | isPure () const |
virtual Operand & | input (int index) const |
virtual void | addInput (Operand *operand) |
virtual Operand & | output (int index) const |
virtual void | addOutput (Operand *operand) |
virtual Operand & | operand (int id) const |
virtual void | setBehavior (OperationBehavior &behavior) |
virtual OperationBehavior & | behavior () const |
virtual void | loadState (const ObjectState *state) |
virtual ObjectState * | saveState () const |
virtual bool | simulateTrigger (SimValue **, OperationContext &context) const |
virtual bool | areValid (const InputOperandVector &inputs, const OperationContext &context) const |
virtual void | createState (OperationContext &context) const |
virtual void | deleteState (OperationContext &context) const |
virtual bool | canBeSimulated () const |
bool | isNull () const |
TCEString | emulationFunctionName () const |
OperationPimpl & | impl () |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const char * | OPRN_OPERATION = "operation" |
Object state name for operation. More... | |
static const char * | OPRN_NAME = "name" |
Object state name for name. More... | |
static const char * | OPRN_DESCRIPTION = "description" |
Object state name for description. More... | |
static const char * | OPRN_INPUTS = "inputs" |
Object state name for inputs. More... | |
static const char * | OPRN_OUTPUTS = "outputs" |
Object state name for outputs. More... | |
static const char * | OPRN_TRAP = "trap" |
Object state name for trap. More... | |
static const char * | OPRN_SIDE_EFFECTS = "side-effects" |
Object state name for side effects. More... | |
static const char * | OPRN_CLOCKED = "clocked" |
Object state name for clockedness. More... | |
static const char * | OPRN_CONTROL_FLOW = "control-flow" |
Object state name for control flow property. More... | |
static const char * | OPRN_READS_MEMORY = "reads-memory" |
Object state name for reads memory. More... | |
static const char * | OPRN_WRITES_MEMORY = "writes-memory" |
Object state name for writes memory. More... | |
static const char * | OPRN_AFFECTS = "affects" |
Object state name for affects. More... | |
static const char * | OPRN_AFFECTED_BY = "affected-by" |
Object state name for affected by. More... | |
static const char * | OPRN_IN = "in" |
Object state name for input operand. More... | |
static const char * | OPRN_OUT = "out" |
Object state name for output operand. More... | |
static const char * | OPRN_TRIGGER = "trigger-semantics" |
Object state name for trigger semantics. More... | |
static const char * | OPRN_ISCALL = "is-call" |
Object state name for call property. More... | |
static const char * | OPRN_ISBRANCH = "is-branch" |
Object state name for branch property. More... | |
Private Attributes | |
OperationPimpl * | pimpl_ |
Private implementation in a separate source file. More... | |
Class that models the static properties and the behavior of operations of the target processor.
Definition at line 59 of file Operation.hh.
Definition at line 62 of file Operation.hh.
Operation::Operation | ( | const TCEString & | name, |
OperationBehavior & | behavior | ||
) |
Constructor.
Definition at line 73 of file Operation.cc.
|
virtual |
|
virtual |
Creates new DAG and adds it's code for operation.
code | Source code written in DAG language. |
Definition at line 113 of file Operation.cc.
References OperationPimpl::addDag(), and pimpl_.
Referenced by OperationDAGDialog::doSaveDAG().
|
virtual |
Definition at line 508 of file Operation.cc.
References OperationPimpl::addInput(), operand(), and pimpl_.
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Definition at line 513 of file Operation.cc.
References OperationPimpl::addOutput(), operand(), and pimpl_.
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Returns the name of the operation that is affected by this operation.
i | The index of the operation. |
OutOfRange | If index is illegal. |
Reimplemented in NullOperation.
Definition at line 447 of file Operation.cc.
References OperationPimpl::affectedBy(), and pimpl_.
Referenced by OSEdInfoView::operationPropertyView().
|
virtual |
Returns the number of operations affected by this operation.
Reimplemented in NullOperation.
Definition at line 416 of file Operation.cc.
References OperationPimpl::affectedByCount(), and pimpl_.
Referenced by isPure(), OSEdInfoView::operationPropertyView(), DataDependenceGraphBuilder::processDestination(), OperationPoolPimpl::sharesState(), and writeCustomOpMacro().
|
virtual |
Returns the name of the operation this operation affects.
i | The index of the operation. |
Reimplemented in NullOperation.
Definition at line 431 of file Operation.cc.
References OperationPimpl::affects(), and pimpl_.
Referenced by OSEdInfoView::operationPropertyView().
|
virtual |
Returns the number of operations that affect this operation.
Reimplemented in NullOperation.
Definition at line 402 of file Operation.cc.
References OperationPimpl::affectsCount(), and pimpl_.
Referenced by CopyingDelaySlotFiller::allowedToSpeculate(), BFOptimization::canBeSpeculated(), isPure(), OSEdInfoView::operationPropertyView(), DataDependenceGraphBuilder::processDestination(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), OperationPoolPimpl::sharesState(), and writeCustomOpMacro().
|
virtual |
Returns true if the given inputs for valid and sensible for the operation.
The Base implementation return always true unless number of inputs does not match of the operands or the operation can not be simulated.
inputs | Input vector of SimValues for each input operand in order. Note: Vector at index 0 is for Operand 1, index 1 is for Operand 2 and so on. |
context | The context in which the validation is performed. |
Definition at line 574 of file Operation.cc.
References OperationBehavior::areValid(), OperationPimpl::behavior(), canBeSimulated(), numberOfInputs(), and pimpl_.
|
virtual |
Returns the behavior of Operation.
Reimplemented in NullOperation.
Definition at line 388 of file Operation.cc.
References OperationPimpl::behavior(), and pimpl_.
Referenced by OperationBehaviorProxy::canBeSimulated(), SimulateDialog::createState(), CmdReset::execute(), SimulateDialog::onReset(), OsalInterpreter::operation(), setBehavior(), and SimulateDialog::~SimulateDialog().
|
virtual |
Returns true if this operation has behavior, or dag which is simulateable (doesn't contain infinite recursion loop).
Definition at line 612 of file Operation.cc.
References OperationPimpl::canBeSimulated(), and pimpl_.
Referenced by areValid(), OperationBehaviorProxy::canBeSimulated(), OperationDAGBehavior::canBeSimulated(), POMValidator::checkSimulatability(), OSEdSimulateCmd::isEnabled(), and OSEdInfoView::operationPropertyView().
|
virtual |
Returns true if Operands can be swapped.
Reimplemented in NullOperation.
Definition at line 470 of file Operation.cc.
References OperationPimpl::canSwap(), and pimpl_.
Referenced by BFSwapOperands::BFSwapOperands(), BF2Scheduler::mustBeTrigger(), BFDropPreShared::operator()(), BFSwapOperands::operator()(), BF2Scheduler::swapToUntrigger(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), and TDGen::writeOperationDefs().
|
virtual |
Returns true if Operation can trap.
Reimplemented in NullOperation.
Definition at line 262 of file Operation.cc.
References OperationPimpl::canTrap(), and pimpl_.
Referenced by OperationPropertyDialog::TransferDataToWindow(), and OSEdInfoView::writeStaticPropertiesOfOperation().
|
virtual |
Creates an instance of operation state for this operation and adds it to the operation context.
context | The operation context to add the state in. |
Reimplemented in NullOperation.
Definition at line 590 of file Operation.cc.
References OperationPimpl::createState(), and pimpl_.
Referenced by FUState::addOperationExecutor(), OperationBehaviorProxy::createState(), FUState::replaceOperationExecutor(), and FUState::reset().
|
virtual |
Returns an operation DAG for operation.
Compiles DAG from code to object if necessary.
index | Index of returned DAG. |
Definition at line 148 of file Operation.cc.
References OperationPimpl::dag(), and pimpl_.
Referenced by OperationDAGSelector::createExpandedDAG(), OperationDAGSelector::findDags(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), Automagic::generateableDAGOperations(), ProGeTools::generateableDAGOperations(), CompiledSimCodeGenerator::generateTriggerCode(), TDGen::getMatchableOperationDAG(), OperationBehaviorProxy::initializeBehavior(), MemoryAliasAnalyzer::mausOfOperation(), TDGen::operationCanBeMatched(), FUGen::parseOperations(), and OperationDAGDialog::updateDAG().
|
virtual |
Returns source code of DAG.
index | Index of DAG whose source code is requested. |
Definition at line 159 of file Operation.cc.
References OperationPimpl::dagCode(), and pimpl_.
Referenced by TDGen::getMatchableOperationDAG(), OperationPropertyDialog::saveOperation(), and OperationDAGDialog::updateDAG().
|
virtual |
Returns number of DAGs stored for operation.
Definition at line 134 of file Operation.cc.
References OperationPimpl::dagCount(), and pimpl_.
Referenced by OperationDAGSelector::createExpandedDAG(), OperationDAGDialog::doSaveDAG(), OperationDAGSelector::findDags(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), Automagic::generateableDAGOperations(), ProGeTools::generateableDAGOperations(), TDGen::getMatchableOperationDAG(), CompiledSimCodeGenerator::handleOperation(), OperationBehaviorProxy::initializeBehavior(), MemoryAliasAnalyzer::mausOfOperation(), OperationDAGDialog::onDeleteDAG(), OperationDAGDialog::onNewDAG(), OperationDAGDialog::onOK(), OperationDAGDialog::onUndoDAG(), TDGen::operationCanBeMatched(), FUGen::parseOperations(), OperationPropertyDialog::saveOperation(), OperationDAGDialog::updateIndex(), and TDGen::writeOperationDef().
|
virtual |
Error message if DAG source code could not be compiled.
index | Index of DAG whose error is returned. |
Definition at line 182 of file Operation.cc.
References OperationPimpl::dagError(), and pimpl_.
Referenced by OperationDAGSelector::findDags(), TDGen::getMatchableOperationDAG(), and OperationDAGDialog::updateDAG().
|
virtual |
Deletes an instance of operation state for this operation from the operation context.
context | The operation context to delete the state from. |
Reimplemented in NullOperation.
Definition at line 601 of file Operation.cc.
References OperationPimpl::deleteState(), and pimpl_.
Referenced by OperationBehaviorProxy::deleteState(), and FUState::reset().
|
virtual |
Returns true if Operation depends on the given operation.
op | The Operation being investigated. |
Reimplemented in NullOperation.
Definition at line 458 of file Operation.cc.
References OperationPimpl::dependsOn(), and pimpl_.
Referenced by DataDependenceGraphBuilder::createSideEffectEdges(), and OperationPoolPimpl::sharesState().
|
virtual |
Returns the description of the Operation.
Reimplemented in NullOperation.
Definition at line 103 of file Operation.cc.
References OperationPimpl::description(), and pimpl_.
Referenced by OpsetDialog::onSelectOperation(), printLatexFunctionUnitDescription(), OperationPropertyDialog::TransferDataToWindow(), and OSEdInfoView::writeStaticPropertiesOfOperation().
TCEString Operation::emulationFunctionName | ( | ) | const |
Name of emulation function which is called if the operation is emulated in program.
Definition at line 623 of file Operation.cc.
References OperationPimpl::emulationFunctionName(), and pimpl_.
|
virtual |
Return true if operation has side effects.
Reimplemented in NullOperation.
Definition at line 272 of file Operation.cc.
References OperationPimpl::hasSideEffects(), and pimpl_.
Referenced by CopyingDelaySlotFiller::allowedToSpeculate(), BFOptimization::canBeSpeculated(), DataDependenceGraphBuilder::createSideEffectEdges(), DataDependenceGraphBuilder::createTriggerDependencies(), isPure(), BFRemoveLoopChecksAndJump::operator()(), DataDependenceGraphBuilder::processDestination(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), OperationPropertyDialog::TransferDataToWindow(), writeCustomOpMacro(), and OSEdInfoView::writeStaticPropertiesOfOperation().
|
inline |
Definition at line 170 of file Operation.hh.
References pimpl_.
Referenced by TDGen::createTrivialDAG().
|
virtual |
Returns the input Operand with the given index.
This method can be used to traverse the list of input operands (the max index is numberOfOutput() - 1).
index | The id of Operand. |
Reimplemented in NullOperation.
Definition at line 503 of file Operation.cc.
References OperationPimpl::input(), and pimpl_.
Referenced by MemoryAliasAnalyzer::addressOperandMove(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), OperationSimulator::initializeOutputs(), MemoryAliasAnalyzer::mausOfOperation(), writeCustomOpMacro(), and TDGen::writeOperationDefUsingGivenOperandTypes().
|
virtual |
Definition at line 323 of file Operation.cc.
References name(), and TCEString::upper().
Referenced by llvm::LLVMTCEBuilder::emitInstruction(), and osalInputIndex().
|
virtual |
Return true if the operation is branch.
Branches of different type have this property set.
Reimplemented in NullOperation.
Definition at line 306 of file Operation.cc.
References OperationPimpl::isBranch(), and pimpl_.
Referenced by TTAProgram::Move::isJump(), isPure(), ConstantTransformer::runOnMachineFunction(), TransportPipeline::startOperation(), and OperationPropertyDialog::TransferDataToWindow().
|
virtual |
Return true if the operation is call.
Calls of different type have this property set.
Reimplemented in NullOperation.
Definition at line 318 of file Operation.cc.
References OperationPimpl::isCall(), and pimpl_.
Referenced by TTAProgram::Move::isCall(), isPure(), ConstantTransformer::runOnMachineFunction(), TransportPipeline::startOperation(), and OperationPropertyDialog::TransferDataToWindow().
|
virtual |
Returns true if the operation is clocked.
Reimplemented in NullOperation.
Definition at line 282 of file Operation.cc.
References OperationPimpl::isClocked(), and pimpl_.
Referenced by POMValidator::checkCompiledSimulatability(), OperationPropertyDialog::TransferDataToWindow(), and OSEdInfoView::writeStaticPropertiesOfOperation().
|
virtual |
Return true if the operation can change control flow.
Branches and calls of different type have this property set.
Reimplemented in NullOperation.
Definition at line 294 of file Operation.cc.
References OperationPimpl::isControlFlowOperation(), and pimpl_.
Referenced by BFOptimization::canBeSpeculated(), TTAProgram::CodeGenerator::createTerminalFUPort(), TTAProgram::Move::isControlFlowMove(), isPure(), BFRemoveLoopChecksAndJump::operator()(), and OperationPropertyDialog::TransferDataToWindow().
bool Operation::isNull | ( | ) | const |
|
virtual |
Returns true if Operand does not have any kind of side effects program wide.
In Addition of !hasSideEffects(), the operation does not access memory and is not control flow operation.
Definition at line 346 of file Operation.cc.
References affectedByCount(), affectsCount(), hasSideEffects(), isBranch(), isCall(), isControlFlowOperation(), and usesMemory().
|
virtual |
Returns true if any of the operands is a vector operand.
Definition at line 222 of file Operation.cc.
Referenced by TDGen::gatherAllMachineOperations(), and TDGen::writeInstrInfo().
|
virtual |
Loads the Operation from ObjectState object.
state | The state of the Operation. |
Implements Serializable.
Definition at line 480 of file Operation.cc.
References OperationPimpl::loadState(), and pimpl_.
Referenced by OSEdTreeView::constructTree(), OperationIndex::effectiveOperation(), OperationPropertyLoader::loadOperationProperties(), OperationDAGDialog::onCancel(), OperationContainer::operation(), and OperationPropertyDialog::updateOperation().
|
virtual |
Returns the name of the Operation.
Reimplemented in NullOperation.
Definition at line 93 of file Operation.cc.
References OperationPimpl::name(), and pimpl_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProgramOperation::addNode(), VectorLSGenerator::addOperation(), StaticProgramAnalyzer::addProgram(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), MultiLatencyOperationExecutor::advanceClock(), OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), TDGen::areImmediateOperandsLegal(), OutputFUBroker::assign(), InputFUBroker::assign(), ExecutionPipelineResource::assignDestination(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToAnyFU(), UtilizationStats::calculateForInstruction(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), Automagic::canGenerateFromDAG(), ProGeTools::canGenerateFromDAG(), AddressSpaceCheck::check(), POMValidator::checkCompiledSimulatability(), PreOptimizer::checkGuardReversalAllowed(), POMValidator::checkSimulatability(), CopyingDelaySlotFiller::collectMoves(), OperationDAGSelector::countUnknownOperations(), POMDisassembler::createFUPort(), DataDependenceGraphBuilder::createOperationEdges(), OperationBehaviorProxy::createState(), TDGen::dagNodeToString(), OperationPimpl::dependsOn(), MemoryAliasAnalyzer::detectConstantScale(), OSEdAddOperationCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveOperationCmd::Do(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), MoveNode::earliestResultReadCycle(), ControlFlowEdge::edgePredicateFromMove(), llvm::LLVMTCEBuilder::emitInstruction(), TDGen::emulatingOpNodeLLVMName(), CodeCompressorPlugin::encodeFUTerminal(), OperationDAGSelector::findDags(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), BasicBlockScheduler::findTrigger(), ProgramOperation::findTriggerFromUnit(), BasicBlockScheduler::findTriggerFromUnit(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), TDGen::getLLVMPatternWithConstants(), TDGen::getMatchableOperationDAG(), CopyingDelaySlotFiller::getMove(), BasicBlockScheduler::getTriggerOperand(), PreOptimizer::handleCFGDDG(), ProgramOperation::hwopFromOutMove(), BFOptimization::immCountPreventsScheduling(), OperationBehaviorLoader::importBehavior(), OffsetAliasAnalyzer::isAddressTraceable(), isBaseOffsetMemOperation(), POMDisassembler::isCallOrJump(), ProgramOperation::isLegalFU(), ExecutionPipelineBroker::isMoveTrigger(), BF2Scheduler::isTrigger(), DataDependenceGraphBuilder::isTriggering(), ImmInfo::key(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), TDGen::llvmOperationPattern(), OperationPropertyLoader::loadOperationProperties(), ScheduleEstimator::maximumSizeOfBB(), Peel2BBLoops::negateOp(), ProGeTools::nodeLatency(), Automagic::nodeLatency(), ExecutionPipelineResource::nodeOfInputPort(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandTooLate(), OsalInterpreter::operation(), TDGen::operationCanBeMatched(), TDGen::operationDAGCanBeMatched(), TDGen::operationNodeToString(), BFLateBypassGuard::operator()(), BFEarlyGuardBypass::operator()(), BFShareOperands::operator()(), ProgramOperation::outputIndexFromGuard(), ExecutionPipelineResource::poConflictsWithInputPort(), BF2Scheduler::preAllocateFunctionUnitsInner(), SimProgramBuilder::processBidirTerminal(), DataDependenceGraphBuilder::processTriggerPO(), BF2Scheduler::releasePortForOp(), RegisterCopyAdder::requiredRegisterCopiesForEachFU(), BF2Scheduler::reservePreallocatedFUs(), ExecutionPipelineResource::resourcesAllowTrigger(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), ExecutionPipelineResource::resultReadyCycle(), BFOptimization::RFReadPortCountPreventsScheduling(), OperationGlobals::runtimeError(), BUBasicBlockScheduler::scheduleMove(), FUGen::scheduleOperations(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), ExecutionPipelineResource::setOperandsUsed(), ProgramOperation::setOperation(), ExecutionPipelineResource::setResultWriten(), SimulateDialog::setTexts(), SmartHWOperation::SmartHWOperation(), ConflictDetectingOperationExecutor::startOperation(), MultiLatencyOperationExecutor::startOperation(), FUGen::subOpName(), TDGen::supportedStackAccessOperations(), TDGen::tceOperationPattern(), TTAProgram::TerminalFUPort::TerminalFUPort(), TTAProgram::ProgramWriter::terminalResource(), ExecutionPipelineResource::testTriggerResult(), OperationNode::toString(), OperationPropertyDialog::TransferDataToWindow(), MachineInfo::triggerIndex(), ExecutionPipelineResource::triggerTooEarly(), PreOptimizer::tryToPrecalcConstantAdd(), LoopAnalyzer::tryTrackCommonAncestor(), ExecutionPipelineResource::unassignDestination(), ExecutionPipelineResource::unsetOperandsUsed(), ExecutionPipelineResource::unsetResultWriten(), OperationPropertyDialog::updateOperation(), TDGen::writeEmulationPattern(), TDGen::writeInstrInfo(), OperationDAGConverter::writeNode(), TDGen::writeOperationDef(), TDGen::writeOperationDefs(), TDGen::writeScalarOperationExploitations(), OSEdInfoView::writeStaticPropertiesOfOperation(), and TDGen::writeVectorOperationDef().
|
virtual |
Returns the number of the inputs of the Operation.
Reimplemented in NullOperation.
Definition at line 192 of file Operation.cc.
References OperationPimpl::numberOfInputs(), and pimpl_.
Referenced by VectorLSGenerator::addOperation(), MemoryAliasAnalyzer::addressOperandMove(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), SimpleOperationExecutor::advanceClock(), TDGen::areImmediateOperandsLegal(), areValid(), BFSwapOperands::BFSwapOperands(), MachineStateBuilder::bindPortsToOperands(), ControlFlowGraph::buildMBBFromBB(), ExecutionPipelineResource::canAssignDestination(), BF2Scheduler::countLoopInvariantValueUsages(), TDGen::createDefaultOperandTypeString(), OpsetDialog::createOperation(), TDGen::createTrivialDAG(), VectorLSGenerator::createVectorLSU(), TDGen::dagNodeToString(), llvm::LLVMTCEBuilder::emitInstruction(), TDGen::emulatingOpNodeLLVMName(), CmdTrigger::execute(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), TDGen::getLLVMPatternWithConstants(), BasicBlockScheduler::getTriggerOperand(), OperationBehaviorProxy::initializeBehavior(), ProgramOperation::inputNode(), ProgramOperation::isComplete(), ProgramOperation::isReady(), MemoryAliasAnalyzer::mausOfOperation(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), BF2Scheduler::mustBeTrigger(), OpsetDialog::onSelectOperation(), operandCount(), TDGen::operationCanBeMatched(), OperationDAGBehavior::OperationDAGBehavior(), TDGen::operationNodeToString(), OSEdInfoView::operationPropertyView(), BFDropPreShared::operator()(), SmartHWOperation::otherMandatoryInputsBound(), ProgramOperation::outputNode(), TDGen::patInputs(), TDGen::patOutputs(), ExecutionPipelineResource::poConflictsWithInputPort(), SmartHWOperation::port(), BF2Scheduler::preAllocateFunctionUnits(), DataDependenceGraphBuilder::processTriggerPO(), BF2Scheduler::releasePortForOp(), FUState::replaceOperationExecutor(), BF2Scheduler::reservePreallocatedFUs(), ExecutionPipelineResource::resultReadyCycle(), FUState::sameBindings(), ExecutionPipelineResource::setOperandsUsed(), ExecutionPipelineResource::setResultWriten(), OperationSimulator::simulateTrigger(), SmartHWOperation::SmartHWOperation(), TransportPipeline::startOperation(), SimpleOperationExecutor::startOperation(), MultiLatencyOperationExecutor::startOperation(), BF2Scheduler::swapToUntrigger(), ProgramOperation::switchInputs(), TDGen::tceOperationPattern(), ExecutionPipelineResource::testTriggerResult(), MachineInfo::triggerIndex(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), ExecutionPipelineResource::unsetOperandsUsed(), ExecutionPipelineResource::unsetResultWriten(), writeCustomOpMacro(), TDGen::writeEmulationPattern(), OperationDAGConverter::writeNode(), TDGen::writeOperationDefs(), TDGen::writeOperationDefUsingGivenOperandTypes(), TDGen::writeScalarOperationExploitations(), OSEdInfoView::writeStaticPropertiesOfOperation(), and TDGen::writeVectorBitwiseOperationDefs().
|
virtual |
Returns the number of outputs of the Operation.
Reimplemented in NullOperation.
Definition at line 202 of file Operation.cc.
References OperationPimpl::numberOfOutputs(), and pimpl_.
Referenced by VectorLSGenerator::addOperation(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), SimpleOperationExecutor::advanceClock(), TDGen::areImmediateOperandsLegal(), MachineStateBuilder::bindPortsToOperands(), ControlFlowGraph::buildMBBFromBB(), TDGen::constantNodeString(), TDGen::createDefaultOperandTypeString(), OpsetDialog::createOperation(), TDGen::createTrivialDAG(), VectorLSGenerator::createVectorLSU(), TDGen::dagNodeToString(), llvm::LLVMTCEBuilder::emitInstruction(), TDGen::emulatingOpNodeLLVMName(), CmdTrigger::execute(), TDGen::getLLVMPatternWithConstants(), OperationBehaviorProxy::initializeBehavior(), OperationSimulator::initializeOutputs(), ProgramOperation::isComplete(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), OpsetDialog::onSelectOperation(), operandCount(), OperationDAGBehavior::OperationDAGBehavior(), TDGen::operationNodeToString(), ProgramOperation::outputNode(), TDGen::patInputs(), TDGen::patOutputs(), SmartHWOperation::port(), DataDependenceGraphBuilder::processTriggerPO(), FUState::replaceOperationExecutor(), ExecutionPipelineResource::resultReadyCycle(), FUState::sameBindings(), ExecutionPipelineResource::setResultWriten(), SmartHWOperation::SmartHWOperation(), TransportPipeline::startOperation(), SimpleOperationExecutor::startOperation(), MultiLatencyOperationExecutor::startOperation(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::unsetResultWriten(), writeCustomOpMacro(), TDGen::writeEmulationPattern(), TDGen::writeInstrInfo(), OperationDAGConverter::writeNode(), TDGen::writeOperationDefs(), TDGen::writeOperationDefUsingGivenOperandTypes(), TDGen::writeScalarOperationExploitations(), OSEdInfoView::writeStaticPropertiesOfOperation(), TDGen::writeVectorBitwiseOperationDefs(), and TDGen::writeVectorOperationDef().
|
virtual |
Returns the Operand with the given id if found, otherwise null Operand.
id | The id of Operand. |
Reimplemented in NullOperation.
Definition at line 541 of file Operation.cc.
References OperationPimpl::operand(), and pimpl_.
Referenced by addInput(), addOutput(), TDGen::analyzeMachineVectorRegisterClasses(), TDGen::areImmediateOperandsLegal(), OperationDAGBuilder::connectOperandToNode(), TDGen::constantNodeString(), ImmInfo::count(), TDGen::createDefaultOperandTypeString(), OpsetDialog::createOperation(), TDGen::createTrivialDAG(), FUGen::DAGNodeOperandWidth(), TDGen::dagNodeToString(), SocketBusConnCmd::Do(), llvm::LLVMTCEBuilder::emitInstruction(), llvm::LLVMTCEBuilder::emitOperationMacro(), TDGen::emulatingOpNodeLLVMName(), MachineInfo::findWidestOperand(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), TDGen::hasRawOperands(), TDGen::hasRegisterClassSupport(), ImmInfo::immediateValueBounds(), MachineInfo::operandFromPort(), MachineConnectivityCheck::operandWidth(), OSEdInfoView::operationPropertyView(), osalInputIndex(), TDGen::patInputs(), TDGen::patOutputs(), ConstantTransformer::runOnMachineFunction(), FUGen::scheduleOperations(), SimpleOperationExecutor::startOperation(), TDGen::subwordWidthOfRawData(), PreOptimizer::tryToRemoveEq(), ImmInfo::widestImmediate(), writeCustomOpMacro(), TDGen::writeEmulationPattern(), OperationDAGConverter::writeNode(), and TDGen::writeOperationDefs().
|
virtual |
Returns the number of all operands of the Operation.
Definition at line 212 of file Operation.cc.
References numberOfInputs(), and numberOfOutputs().
Referenced by TDGen::analyzeMachineVectorRegisterClasses(), TDGen::areImmediateOperandsLegal(), OperationDAGBuilder::connectOperandToNode(), MachineInfo::findWidestOperand(), TDGen::hasRawOperands(), TDGen::hasRegisterClassSupport(), operandBindingsString(), TDGen::subwordWidthOfRawData(), and TDGen::writeVectorOperationDef().
|
virtual |
Returns the output Operand with the given index.
This method can be used to traverse the list of output operands (the max index is numberOfOutput() - 1).
index | The index of Operand. |
Reimplemented in NullOperation.
Definition at line 526 of file Operation.cc.
References OperationPimpl::output(), and pimpl_.
Referenced by OperationSimulator::initializeOutputs(), writeCustomOpMacro(), TDGen::writeOperationDefUsingGivenOperandTypes(), TDGen::writeScalarOperationExploitations(), and TDGen::writeVectorBitwiseOperationDefs().
|
virtual |
Returns true if Operation reads from memory.
Reimplemented in NullOperation.
Definition at line 242 of file Operation.cc.
References pimpl_, and OperationPimpl::readsMemory().
Referenced by CopyingDelaySlotFiller::allowedToSpeculate(), DataDependenceGraphBuilder::createTriggerDependencies(), PreOptimizer::handleCFGDDG(), ConstantTransformer::runOnMachineFunction(), DataDependenceGraph::sanityCheck(), TDGen::supportedStackAccessOperations(), OperationPropertyDialog::TransferDataToWindow(), TDGen::writeOperationDefs(), and OSEdInfoView::writeStaticPropertiesOfOperation().
|
virtual |
Removes DAG of given index from operation.
index | Index of dag to delete. |
Definition at line 123 of file Operation.cc.
References pimpl_, and OperationPimpl::removeDag().
Referenced by OperationDAGDialog::onDeleteDAG().
|
virtual |
Saves the state of the Operation in ObjectState object.
Implements Serializable.
Definition at line 490 of file Operation.cc.
References pimpl_, and OperationPimpl::saveState().
Referenced by OSEdAddOperationCmd::Do(), and OSEdPropertiesCmd::Do().
|
virtual |
Sets the behavior for operation.
behavior | Behavior for an operation. |
Reimplemented in NullOperation.
Definition at line 378 of file Operation.cc.
References behavior(), pimpl_, and OperationPimpl::setBehavior().
Referenced by OperationIndex::effectiveOperation(), OperationBehaviorProxy::initializeBehavior(), OperationContainer::operation(), and OperationBehaviorProxy::uninitializeBehavior().
|
virtual |
Sets the property of operation indicating the operation is branch changing control flow.
Definition at line 368 of file Operation.cc.
References pimpl_, and OperationPimpl::setBranch().
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Sets the property of operation indicating the operation is function call.
Definition at line 359 of file Operation.cc.
References pimpl_, and OperationPimpl::setCall().
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Sets the property of operation indicating the operation is control flow.
Definition at line 335 of file Operation.cc.
References pimpl_, and OperationPimpl::setControlFlowOperation().
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Set new source code for DAG and automatically tries to compile latest version to object.
index | Index of DAG whose source code is updated. |
code | New source code in DAG Osal Language. |
Definition at line 171 of file Operation.cc.
References pimpl_, and OperationPimpl::setDagCode().
Referenced by OperationDAGDialog::doSaveDAG().
|
virtual |
Specifies if operation reads memory.
Definition at line 631 of file Operation.cc.
References pimpl_, and OperationPimpl::setReadsMemory().
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Specifies if operation writes memory.
Definition at line 639 of file Operation.cc.
References pimpl_, and OperationPimpl::setWritesMemory().
Referenced by OperationPoolPimpl::loadFromLLVM().
|
virtual |
Simulates the process of starting execution of an operation.
io | The input and output operands. |
context | The operation context. |
Exception | Depends on the operation behavior. |
Reimplemented in NullOperation.
Definition at line 555 of file Operation.cc.
References pimpl_, and OperationPimpl::simulateTrigger().
Referenced by MultiLatencyOperationExecutor::advanceClock(), OperationSimulator::simulateTrigger(), OperationBehaviorProxy::simulateTrigger(), OneCycleOperationExecutor::startOperation(), TransportPipeline::startOperation(), and SimpleOperationExecutor::startOperation().
|
virtual |
Returns true if Operation uses memory.
Reimplemented in NullOperation.
Definition at line 232 of file Operation.cc.
References pimpl_, and OperationPimpl::usesMemory().
Referenced by MemoryAliasAnalyzer::addressOperandMove(), BFOptimization::canBeSpeculated(), AddressSpaceCheck::check(), VectorLSGenerator::createVectorLSU(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), isPure(), MemoryAliasAnalyzer::mausOfOperation(), ResourceConstraintAnalyzer::memoryBoundScheduleResourceUsage(), DataDependenceGraphBuilder::processDestination(), and writeCustomOpMacros().
|
virtual |
Returns true if Operation writes to memory.
Reimplemented in NullOperation.
Definition at line 252 of file Operation.cc.
References pimpl_, and OperationPimpl::writesMemory().
Referenced by CopyingDelaySlotFiller::allowedToSpeculate(), DataDependenceGraphBuilder::createTriggerDependencies(), TDGen::operationDAGCanBeMatched(), BFRemoveLoopChecksAndJump::operator()(), DataDependenceGraph::sanityCheck(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), TDGen::supportedStackAccessOperations(), OperationPropertyDialog::TransferDataToWindow(), writeCustomOpMacro(), TDGen::writeOperationDefs(), and OSEdInfoView::writeStaticPropertiesOfOperation().
|
static |
Object state name for affected by.
Definition at line 89 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), and OperationPimpl::saveState().
|
static |
Object state name for affects.
Definition at line 87 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), and OperationPimpl::saveState().
|
static |
Object state name for clockedness.
Definition at line 79 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for control flow property.
Definition at line 81 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for description.
Definition at line 69 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for input operand.
Definition at line 91 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for inputs.
Definition at line 71 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for branch property.
Definition at line 99 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for call property.
Definition at line 97 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for name.
Definition at line 67 of file Operation.hh.
Referenced by OperationIndex::effectiveOperation(), OperationPropertyLoader::loadOperationProperties(), OperationPimpl::loadState(), OperationIndex::moduleOf(), OperationIndex::operationName(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for operation.
Definition at line 65 of file Operation.hh.
Referenced by OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for output operand.
Definition at line 93 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for outputs.
Definition at line 73 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for reads memory.
Definition at line 83 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for side effects.
Definition at line 77 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for trap.
Definition at line 75 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
static |
Object state name for trigger semantics.
Definition at line 95 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), and OperationPimpl::saveState().
|
static |
Object state name for writes memory.
Definition at line 85 of file Operation.hh.
Referenced by OperationPimpl::loadState(), OperationPropertyDialog::saveOperation(), OperationPimpl::saveState(), OperationSerializer::toOperation(), and OperationSerializer::toXMLFormat().
|
private |
Private implementation in a separate source file.
Definition at line 173 of file Operation.hh.
Referenced by addDag(), addInput(), addOutput(), affectedBy(), affectedByCount(), affects(), affectsCount(), areValid(), behavior(), canBeSimulated(), canSwap(), canTrap(), createState(), dag(), dagCode(), dagCount(), dagError(), deleteState(), dependsOn(), description(), emulationFunctionName(), hasSideEffects(), impl(), input(), isBranch(), isCall(), isClocked(), isControlFlowOperation(), loadState(), name(), numberOfInputs(), numberOfOutputs(), operand(), output(), readsMemory(), removeDag(), saveState(), setBehavior(), setBranch(), setCall(), setControlFlowOperation(), setDagCode(), setReadsMemory(), setWritesMemory(), simulateTrigger(), usesMemory(), writesMemory(), and ~Operation().