|
OpenASIP 2.2
|
#include <Guard.hh>


Public Member Functions | |
| RegisterGuard (bool inverted, const RegisterFile ®File, unsigned int registerIndex, Bus *parentBus) | |
| RegisterGuard (const ObjectState *state, Bus &parentBus) | |
| virtual | ~RegisterGuard () |
| bool | isOpposite (const Guard &guard) const |
| bool | isEqual (const Guard &guard) const |
| const RegisterFile * | registerFile () const |
| int | registerIndex () const |
| virtual void | copyTo (Bus &parentBus) const |
| ObjectState * | saveState () const |
| void | loadState (const ObjectState *state) |
Public Member Functions inherited from TTAMachine::Guard | |
| virtual | ~Guard () |
| virtual Bus * | parentBus () const |
| virtual void | setParentBus (Bus *parentBus) |
| virtual bool | isInverted () const |
| virtual bool | isMoreRestrictive (const Guard &guard) const |
| virtual bool | isLessRestrictive (const Guard &guard) const |
| virtual bool | isDisjoint (const Guard &guard) const |
Public Member Functions inherited from Serializable | |
| virtual | ~Serializable () |
Static Public Attributes | |
| static const std::string | OSNAME_REGISTER_GUARD = "registerguard" |
| ObjectState name for RegisterGuard. | |
| static const std::string | OSKEY_REGFILE = "regfile" |
| ObjectState attribute key for register file name. | |
| static const std::string | OSKEY_INDEX = "index" |
| ObjectState attribute key for register index. | |
Static Public Attributes inherited from TTAMachine::Guard | |
| static const std::string | OSNAME_GUARD = "guard" |
| ObjectState name for guard. | |
| static const std::string | OSKEY_INVERTED = "inverted" |
| ObjectState attribute key for inverted feature. | |
Private Attributes | |
| const RegisterFile * | regFile_ |
| RegisterFile from which the condition term is taken. | |
| int | registerIndex_ |
| Index of the register from which the condition term is taken. | |
Additional Inherited Members | |
Protected Member Functions inherited from TTAMachine::Guard | |
| Guard (bool inverted, Bus *parentBus) | |
| Guard (const ObjectState *state, Bus &parentBus) | |
Protected Member Functions inherited from TTAMachine::SubComponent | |
| SubComponent () | |
| virtual | ~SubComponent () |
Protected Member Functions inherited from TTAMachine::MachinePart | |
| MachinePart () | |
| virtual | ~MachinePart () |
Guard where the condition term is taken from the value of a register (from a RegisterFile).
| TTAMachine::RegisterGuard::RegisterGuard | ( | bool | inverted, |
| const RegisterFile & | regFile, | ||
| unsigned int | registerIndex, | ||
| Bus * | parentBus | ||
| ) |
Constructor.
| inverted | Indicates whether the condition term is inverted. |
| regFile | RegisterFile from which the condition term is taken. |
| registerIndex | Index of the register from which the condition term is taken. |
| parentBus | Parent bus component of the guard. |
| IllegalRegistration | If the given register file is not registered to the same machine as the parent bus of the guard. |
| ComponentAlreadyExists | If the parent bus already has an equal guard. |
| OutOfRange | If the given register file does not have a register by the given register index. |
| InvalidData | If local + global guard latency would be zero. |
Definition at line 393 of file Guard.cc.
References __func__, TTAMachine::Bus::addGuard(), TTAMachine::Machine::controlUnit(), TTAMachine::Component::ensureRegistration(), TTAMachine::ControlUnit::globalGuardLatency(), TTAMachine::RegisterFile::guardLatency(), TTAMachine::Component::machine(), TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::Guard::parentBus(), registerIndex(), Texts::TextGenerator::text(), and MOMTextGenerator::TXT_INVALID_GUARD_LATENCY.

| TTAMachine::RegisterGuard::RegisterGuard | ( | const ObjectState * | state, |
| Bus & | parentBus | ||
| ) |
Constructor.
Creates a skeleton object without references to other machine parts. Loads its state from the given ObjectState instance. This constructor should be used by Bus::loadStateWithoutReferences only. Do not use this constructor.
| state | The ObjectState instance. |
| parentBus | Parent bus of the guard. |
| ObjectStateLoadingException | If the given ObjectState instance is invalid or if the reference to the register cannot be resolved. |
Definition at line 436 of file Guard.cc.
References TTAMachine::Bus::addGuard(), loadState(), TTAMachine::Component::name(), TTAMachine::Guard::parentBus(), registerFile(), registerIndex(), Texts::TextGenerator::text(), and MOMTextGenerator::TXT_EQUAL_REGISTER_GUARDS.

|
virtual |
|
inlinevirtual |
Implements TTAMachine::Guard.
Definition at line 149 of file Guard.hh.
References TTAMachine::Guard::isInverted(), TTAMachine::Guard::parentBus(), regFile_, and registerIndex_.

|
virtual |
Returns true if the guard is equal with the given guard.
| guard | The other guard. |
Implements TTAMachine::Guard.
Definition at line 467 of file Guard.cc.
References TTAMachine::Guard::isInverted(), registerFile(), and registerIndex().

|
virtual |
Returns true if the guard is opposite with the given guard, ie. always if one is executed, another is not executed.
| guard | The other guard. |
Implements TTAMachine::Guard.
Definition at line 491 of file Guard.cc.
References TTAMachine::Guard::isInverted(), registerFile(), and registerIndex().

|
virtual |
Loads its state from the given ObjectState instance.
| state | The ObjectState instance. |
| ObjectStateLoadingException | If the given ObjectState instance is invalid or if the reference to the register file cannot be resolved. |
Reimplemented from TTAMachine::Guard.
Definition at line 535 of file Guard.cc.
References __func__, TTAMachine::Machine::controlUnit(), Exception::errorMessage(), TTAMachine::ControlUnit::globalGuardLatency(), TTAMachine::RegisterFile::guardLatency(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ObjectState::intAttribute(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Guard::loadState(), TTAMachine::Component::machine(), TTAMachine::Component::name(), ObjectState::name(), TTAMachine::BaseRegisterFile::numberOfRegisters(), OSKEY_INDEX, OSKEY_REGFILE, OSNAME_REGISTER_GUARD, TTAMachine::Guard::parentBus(), regFile_, TTAMachine::Machine::registerFileNavigator(), registerIndex_, ObjectState::stringAttribute(), Texts::TextGenerator::text(), Conversion::toString(), MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR_REGISTER, and MOMTextGenerator::TXT_INVALID_GUARD_LATENCY.
Referenced by RegisterGuard().

| const RegisterFile * TTAMachine::RegisterGuard::registerFile | ( | ) | const |
Referenced by CodeCompressorPlugin::addBitsForGuardField(), BEMGenerator::addEncodings(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), TDGen::analyzeRegisters(), MachineStateBuilder::buildMachineState(), UtilizationStats::calculateForInstruction(), SimpleIfConverter::canConvert(), ProgrammabilityValidator::checkBooleanRegister(), BEMValidator::checkGuardField(), CompiledSimCodeGenerator::CompiledSimCodeGenerator(), DefaultDecoderGenerator::completeDecoderBlock(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), DefaultDecoderGenerator::containsSimilarGuard(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createGuard(), llvm::LLVMTCEBuilder::createGuard(), TTAProgram::CodeGenerator::createInverseGuard(), ProgramDependenceGraph::createJump(), TTAMachine::RegisterFile::deleteGuards(), DataDependenceGraph::destRenamed(), CopyingDelaySlotFiller::fillDelaySlots(), findBooleanGuard(), DefaultDecoderGenerator::findGuard(), TTAProgram::TPEFProgramFactory::findGuard(), RegisterRenamer::findGuardRegisters(), RegisterQuantityCheck::findGuardRegisters(), ProgrammabilityValidator::findRegisterGuard(), RegisterCopyAdder::findTempRegisters(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::fixInterBBAntiEdges(), CompiledSimCodeGenerator::generateGuardCondition(), CompiledSimCodeGenerator::generateGuardRead(), TTAProgram::Move::guardLatency(), CompiledSimCodeGenerator::guardPipelineTopSymbol(), DefaultDecoderGenerator::guardPortName(), DataDependenceGraph::guardRenamed(), MachineConnectivityCheck::hasBothGuards(), MachineConnectivityCheck::hasConditionalMoves(), TTAMachine::ControlUnit::hasLocalGuardLatencyOfZero(), isEqual(), isOpposite(), TTAMachine::RegisterFile::isUsedAsGuard(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterGuardReads(), ListCompareFunction(), MachineInfo::longestGuardLatency(), RFGuardDialog::onOK(), DataDependenceGraphBuilder::processGuard(), MachineResourceManager::registerFileIndexReference(), RegisterGuard(), RegisterRenamer::renameLiveRange(), HDB::RFArchitecture::RFArchitecture(), HDB::RFArchitecture::RFArchitecture(), MachineResourceManager::rFPortOrFUIndexReference(), DataDependenceGraph::sanityCheck(), SequentialScheduler::scheduleMove(), BFRenameLiveRange::setGuard(), MachineInfo::supportsBoolRegisterGuardedJumps(), PostpassOperandSharer::tryRemoveOperandWrite(), and BusDialog::updateGuardLists().
| int TTAMachine::RegisterGuard::registerIndex | ( | ) | const |
Referenced by CodeCompressorPlugin::addBitsForGuardField(), BEMGenerator::addEncodings(), TDGen::analyzeRegisters(), MachineStateBuilder::buildMachineState(), UtilizationStats::calculateForInstruction(), SimpleIfConverter::canConvert(), ProgrammabilityValidator::checkBooleanRegister(), BEMValidator::checkGuardField(), CompiledSimCodeGenerator::CompiledSimCodeGenerator(), DefaultDecoderGenerator::completeDecoderBlock(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), DefaultDecoderGenerator::containsSimilarGuard(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createGuard(), llvm::LLVMTCEBuilder::createGuard(), TTAProgram::CodeGenerator::createInverseGuard(), ProgramDependenceGraph::createJump(), TTAMachine::RegisterFile::deleteGuards(), DataDependenceGraph::destRenamed(), CopyingDelaySlotFiller::fillDelaySlots(), DefaultDecoderGenerator::findGuard(), TTAProgram::TPEFProgramFactory::findGuard(), RegisterRenamer::findGuardRegisters(), RegisterQuantityCheck::findGuardRegisters(), ProgrammabilityValidator::findRegisterGuard(), RegisterCopyAdder::findTempRegisters(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::fixInterBBAntiEdges(), CompiledSimCodeGenerator::generateGuardCondition(), CompiledSimCodeGenerator::generateGuardRead(), CompiledSimCodeGenerator::guardPipelineTopSymbol(), DefaultDecoderGenerator::guardPortName(), DataDependenceGraph::guardRenamed(), MachineConnectivityCheck::hasBothGuards(), MachineConnectivityCheck::hasConditionalMoves(), isEqual(), isOpposite(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterGuardReads(), ListCompareFunction(), DataDependenceGraphBuilder::processGuard(), MachineResourceManager::registerFileIndexReference(), RegisterGuard(), RegisterGuard(), RegisterRenamer::renameLiveRange(), MachineResourceManager::rFPortOrFUIndexReference(), BFRenameLiveRange::setGuard(), PostpassOperandSharer::tryRemoveOperandWrite(), and BusDialog::updateGuardLists().
|
virtual |
Saves the contents to an ObjectState object.
Reimplemented from TTAMachine::Guard.
Definition at line 514 of file Guard.cc.
References TTAMachine::Component::name(), OSKEY_INDEX, OSKEY_REGFILE, OSNAME_REGISTER_GUARD, regFile_, registerIndex_, TTAMachine::Guard::saveState(), ObjectState::setAttribute(), and ObjectState::setName().

|
static |
ObjectState attribute key for register index.
Definition at line 163 of file Guard.hh.
Referenced by ADFSerializer::busToMachine(), ADFSerializer::busToMDF(), loadState(), and saveState().
|
static |
ObjectState attribute key for register file name.
Definition at line 161 of file Guard.hh.
Referenced by ADFSerializer::busToMachine(), ADFSerializer::busToMDF(), loadState(), and saveState().
|
static |
ObjectState name for RegisterGuard.
Definition at line 159 of file Guard.hh.
Referenced by ADFSerializer::busToMachine(), ADFSerializer::busToMDF(), TTAMachine::Bus::loadState(), loadState(), and saveState().
|
private |
RegisterFile from which the condition term is taken.
Definition at line 167 of file Guard.hh.
Referenced by copyTo(), loadState(), and saveState().
|
private |
Index of the register from which the condition term is taken.
Definition at line 169 of file Guard.hh.
Referenced by copyTo(), loadState(), and saveState().