[Beignet] [PATCH 1/5] GBE: don't need to compute liveout again in value.cpp.
Zhigang Gong
zhigang.gong at intel.com
Thu May 8 00:57:29 PDT 2014
We already did a complete liveness analysis at the liveness.cpp.
Don't need to do that again. Save about 10% of the compile time.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
backend/src/ir/value.cpp | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/backend/src/ir/value.cpp b/backend/src/ir/value.cpp
index 1dbd4f4..cdc1a4c 100644
--- a/backend/src/ir/value.cpp
+++ b/backend/src/ir/value.cpp
@@ -66,8 +66,6 @@ namespace ir {
* registers
*/
void initializeOtherDef(void);
- /*! Iterate to completely transfer the liveness and get the def sets */
- void iterateLiveOut(void);
/*! Use custom allocators */
GBE_CLASS(LiveOutSet);
};
@@ -80,7 +78,6 @@ namespace ir {
{
this->initializeInstructionDef();
this->initializeOtherDef();
- this->iterateLiveOut();
}
LiveOutSet::RegDefSet &LiveOutSet::getDefSet(const BasicBlock *bb, Register reg)
@@ -227,36 +224,6 @@ namespace ir {
}
}
- void LiveOutSet::iterateLiveOut(void) {
- bool changed = true;
-
- while (changed) {
- changed = false;
-
- // Compute the union of the current liveout definitions with the previous
- // ones. Do not take into account the killed values though
- liveness.foreach<DF_PRED>([&](Liveness::BlockInfo &curr,
- const Liveness::BlockInfo &pred)
- {
- const BasicBlock &bb = curr.bb;
- const BasicBlock &pbb = pred.bb;
- for (auto reg : curr.liveOut) {
- if (pred.inLiveOut(reg) == false) continue;
- if (curr.inVarKill(reg) == true) continue;
- RegDefSet &currSet = this->getDefSet(&bb, reg);
- RegDefSet &predSet = this->getDefSet(&pbb, reg);
-
- // Transfer the values
- for (auto def : predSet) {
- if (currSet.contains(def)) continue;
- changed = true;
- currSet.insert(def);
- }
- }
- });
- }
- }
-
LiveOutSet::~LiveOutSet(void) {
for (const auto pair : defMap) {
BlockDefMap *block = pair.second;
--
1.8.3.2
More information about the Beignet
mailing list