[llvm] r357563 - Revert r357256 "[DAGCombine] Improve Lifetime node chains."
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 3 00:41:58 PDT 2019
Author: hans
Date: Wed Apr 3 00:41:58 2019
New Revision: 357563
URL: http://llvm.org/viewvc/llvm-project?rev=357563&view=rev
Log:
Revert r357256 "[DAGCombine] Improve Lifetime node chains."
As it caused a pathological compile-time regressionin V8, see PR41352.
> Improve both start and end lifetime nodes chain dependencies.
>
> Reviewers: courbet
>
> Reviewed By: courbet
>
> Subscribers: hiraditya, llvm-commits
>
> Tags: #llvm
>
> Differential Revision: https://reviews.llvm.org/D59795
This also reverts the follow-up r357309:
> [DAGCombiner] Rewrite ImproveLifetimeNodeChain to avoid DAG loop.
>
> Avoid EXPENSIVE_CHECK failure. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/test/CodeGen/X86/swap.ll
llvm/trunk/test/DebugInfo/COFF/lexicalblock.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=357563&r1=357562&r2=357563&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Apr 3 00:41:58 2019
@@ -427,10 +427,6 @@ namespace {
SDValue replaceStoreOfFPConstant(StoreSDNode *ST);
SDValue visitSTORE(SDNode *N);
-
- SDValue ImproveLifetimeNodeChain(SDNode *N);
-
- SDValue visitLIFETIME_START(SDNode *N);
SDValue visitLIFETIME_END(SDNode *N);
SDValue visitINSERT_VECTOR_ELT(SDNode *N);
SDValue visitEXTRACT_VECTOR_ELT(SDNode *N);
@@ -1654,7 +1650,6 @@ SDValue DAGCombiner::visit(SDNode *N) {
case ISD::MLOAD: return visitMLOAD(N);
case ISD::MSCATTER: return visitMSCATTER(N);
case ISD::MSTORE: return visitMSTORE(N);
- case ISD::LIFETIME_START: return visitLIFETIME_START(N);
case ISD::LIFETIME_END: return visitLIFETIME_END(N);
case ISD::FP_TO_FP16: return visitFP_TO_FP16(N);
case ISD::FP16_TO_FP: return visitFP16_TO_FP(N);
@@ -15705,33 +15700,7 @@ SDValue DAGCombiner::visitSTORE(SDNode *
return ReduceLoadOpStoreWidth(N);
}
-SDValue DAGCombiner::ImproveLifetimeNodeChain(SDNode *N) {
- auto Chain = N->getOperand(0);
- auto NewChain = FindBetterChain(N, Chain);
- if (NewChain != Chain) {
- LifetimeSDNode *LN = cast<LifetimeSDNode>(N);
- // Create New Node to prevent loop in CombineTo.
- SDValue NewN = DAG.getLifetimeNode(N->getOpcode() == ISD::LIFETIME_START,
- SDLoc(N), NewChain, LN->getFrameIndex(),
- LN->hasOffset() ? LN->getSize() : -1,
- LN->hasOffset() ? LN->getOffset() : -1);
- AddToWorklist(NewN.getNode());
- auto TF = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Chain, NewN);
- return CombineTo(N, TF);
- }
- return SDValue();
-}
-
-SDValue DAGCombiner::visitLIFETIME_START(SDNode *N) {
- if (SDValue V = ImproveLifetimeNodeChain(N))
- return V;
- return SDValue();
-}
-
SDValue DAGCombiner::visitLIFETIME_END(SDNode *N) {
- if (SDValue V = ImproveLifetimeNodeChain(N))
- return V;
-
const auto *LifetimeEnd = cast<LifetimeSDNode>(N);
if (!LifetimeEnd->hasOffset())
return SDValue();
Modified: llvm/trunk/test/CodeGen/X86/swap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/swap.ll?rev=357563&r1=357562&r2=357563&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/swap.ll (original)
+++ llvm/trunk/test/CodeGen/X86/swap.ll Wed Apr 3 00:41:58 2019
@@ -94,6 +94,7 @@ define dso_local void @twoallocs(i8* noc
; AA-LABEL: twoallocs:
; AA: # %bb.0: # %entry
; AA-NEXT: vmovups (%rdi), %xmm0
+; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups %xmm0, (%rsi)
; AA-NEXT: retq
entry:
@@ -124,6 +125,7 @@ define dso_local void @onealloc_readback
; AA-LABEL: onealloc_readback_1:
; AA: # %bb.0: # %entry
; AA-NEXT: vmovups (%rsi), %xmm0
+; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups %xmm0, (%rdi)
; AA-NEXT: retq
entry:
@@ -153,6 +155,7 @@ define dso_local void @onealloc_readback
; AA-LABEL: onealloc_readback_2:
; AA: # %bb.0: # %entry
; AA-NEXT: vmovups (%rsi), %xmm0
+; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups %xmm0, (%rdi)
; AA-NEXT: retq
entry:
Modified: llvm/trunk/test/DebugInfo/COFF/lexicalblock.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/lexicalblock.ll?rev=357563&r1=357562&r2=357563&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/lexicalblock.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/lexicalblock.ll Wed Apr 3 00:41:58 2019
@@ -80,6 +80,19 @@
; CHECK: ScopeEndSym {
; CHECK: Kind: S_END {{.*}}
; CHECK: }
+; CHECK: BlockSym {
+; CHECK: Kind: S_BLOCK32 {{.*}}
+; CHECK: BlockName:
+; CHECK: }
+; CHECK: ScopeEndSym {
+; CHECK: }
+; CHECK: BlockSym {
+; CHECK: Kind: S_BLOCK32 {{.*}}
+; CHECK: BlockName:
+; CHECK: }
+; CHECK: ScopeEndSym {
+; CHECK: Kind: S_END {{.*}}
+; CHECK: }
; CHECK: ProcEnd {
; CHECK: }
;
More information about the llvm-commits
mailing list