diff options
| author | Matthias Braun <matze@braunis.de> | 2017-07-10 20:51:30 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2017-07-10 20:51:30 +0000 |
| commit | b38736706e3163499af9edc55805727714d124d8 (patch) | |
| tree | 0e2701bb29e29c85dfd25b4c156bc644f3670d5b /llvm/lib/CodeGen | |
| parent | 14612fbf253948b5378f3c0840ebec533633623b (diff) | |
| download | bcm5719-llvm-b38736706e3163499af9edc55805727714d124d8.tar.gz bcm5719-llvm-b38736706e3163499af9edc55805727714d124d8.zip | |
Revert "[DAG] Improve Aliasing of operations to static alloca"
Reverting as it breaks tramp3d-v4 in the llvm test-suite. I added some
comments to https://reviews.llvm.org/D33345 about it.
This reverts commit r307546.
llvm-svn: 307589
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 33a806d8eed..71382c18fdf 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -11373,8 +11373,12 @@ SDValue DAGCombiner::visitLOAD(SDNode *N) { SDValue Token = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Chain, ReplLoad.getValue(1)); - // Replace uses with load result and token factor - return CombineTo(N, ReplLoad.getValue(0), Token); + // Make sure the new and old chains are cleaned up. + AddToWorklist(Token.getNode()); + + // Replace uses with load result and token factor. Don't add users + // to work list. + return CombineTo(N, ReplLoad.getValue(0), Token, false); } } @@ -16699,18 +16703,6 @@ bool DAGCombiner::isAlias(LSBaseSDNode *Op0, LSBaseSDNode *Op1) const { if (BasePtr0.equalBaseIndex(BasePtr1, DAG, PtrDiff)) return !((NumBytes0 <= PtrDiff) || (PtrDiff + NumBytes1 <= 0)); - // If both BasePtr0 and BasePtr1 are FrameIndexes, we will not be - // able to calculate their relative offset if at least one arises - // from an alloca. However, these allocas cannot overlap and we - // can infer there is no alias. - if (auto *A = dyn_cast<FrameIndexSDNode>(BasePtr0.getBase())) - if (auto *B = dyn_cast<FrameIndexSDNode>(BasePtr1.getBase())) { - MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); - if (!MFI.isFixedObjectIndex(A->getIndex()) || - !MFI.isFixedObjectIndex(B->getIndex())) - return false; - } - // FIXME: findBaseOffset and ConstantValue/GlobalValue/FrameIndex analysis // modified to use BaseIndexOffset. |

