|
OpenASIP 2.2
|
#include <InterPassData.hh>

Public Member Functions | |
| InterPassData () | |
| virtual | ~InterPassData () |
| InterPassDatum & | datum (const std::string &key) |
| bool | hasDatum (const std::string &key) const |
| void | setDatum (const std::string &key, InterPassDatum *datum) |
| void | removeDatum (const std::string &key) |
Private Attributes | |
| std::map< std::string, InterPassDatum * > | data_ |
| container for the data | |
Class for storing inter-pass data of any type.
Provides a generic "key-value" interface and shortcut methods for accessing the most frequently used data.
Definition at line 48 of file InterPassData.hh.
| InterPassData::InterPassData | ( | ) |
|
virtual |
Destructor.
Deletes all added InterPassDatum objects.
Definition at line 48 of file InterPassData.cc.
References data_, and MapTools::deleteAllValues().

| InterPassDatum & InterPassData::datum | ( | const std::string & | key | ) |
Returns a reference to the datum associated with the given key.
It is allowed to modify the returned object directly.
| key | The key. |
| KeyNotFound | thrown if the key is not found. |
Definition at line 62 of file InterPassData.cc.
References __func__, MapTools::containsKey(), and data_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), DataDependenceGraphBuilder::DataDependenceGraphBuilder(), ProgramPass::executeProcedurePass(), BF2Scheduler::possibleTempRegRFs(), and setDatum().

| bool InterPassData::hasDatum | ( | const std::string & | key | ) | const |
Returns true if there is a datum for the given key.
Definition at line 75 of file InterPassData.cc.
References MapTools::containsKey(), and data_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), DataDependenceGraphBuilder::DataDependenceGraphBuilder(), ProgramPass::executeProcedurePass(), and BBSchedulerController::handleBasicBlock().

| void InterPassData::removeDatum | ( | const std::string & | key | ) |
Definition at line 97 of file InterPassData.cc.
References MapTools::containsKey(), and data_.

| void InterPassData::setDatum | ( | const std::string & | key, |
| InterPassDatum * | datum | ||
| ) |
Sets a datum for the given key.
Ownership of the datum is transferred. Possible previously existing datum at the given key is deleted.
| key | The key of the datum. |
| datum | The datum object. |
Definition at line 89 of file InterPassData.cc.
References MapTools::containsKey(), data_, and datum().
Referenced by LLVMBackend::compile(), and RegisterCopyAdder::findTempRegisters().

|
private |
container for the data
Definition at line 59 of file InterPassData.hh.
Referenced by datum(), hasDatum(), removeDatum(), setDatum(), and ~InterPassData().