Skip to content

Commit

Permalink
[GVN] Remove a todo introduced w/rL370791
Browse files Browse the repository at this point in the history
When I dug into this, it turns out to be *much* more involved than I'd realized and doesn't actually simplify anything.  

The general purpose of the leader table is that we want to find the most-dominating definition quickly.  The problem for equivalance folding is slightly different; we want to find the most dominating *value* whose definition block dominates our use quickly.

To make this change, we'd end up having to restructure the leader table (either the sorting thereof, or maybe even introducing multiple leader tables per value) and that complexity is just not worth it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370824 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
preames committed Sep 3, 2019
1 parent 3b8e736 commit 074bcc7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/Transforms/Scalar/GVN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1754,9 +1754,6 @@ void GVN::assignBlockRPONumber(Function &F) {
}

bool GVN::replaceOperandsForInBlockEquality(Instruction *Instr) const {
// TODO: We can remove the separate ReplaceOperandsWithMap data structure in
// favor of putting equalitys into the leader table and using findLeader
// here.
bool Changed = false;
for (unsigned OpNum = 0; OpNum < Instr->getNumOperands(); ++OpNum) {
Value *Operand = Instr->getOperand(OpNum);
Expand Down

0 comments on commit 074bcc7

Please sign in to comment.