diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-04-29 11:26:14 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-05-13 17:18:18 +0800 |
commit | 89b490b5a17cfda2d9816dc1c246ce5bbff12648 (patch) | |
tree | 310c93308858f0c0fe0aac5559fc2926f6b591c7 /backend/src/ir | |
parent | 5c8402a64e1372976796fb7ed643c4f575790824 (diff) |
GBE: No need to compute liveout again in value.cpp.
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@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
Diffstat (limited to 'backend/src/ir')
-rw-r--r-- | backend/src/ir/value.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/backend/src/ir/value.cpp b/backend/src/ir/value.cpp index 1dbd4f4d..cdc1a4c6 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; |