File tree 1 file changed +14
-0
lines changed
llvm/include/llvm/CodeGen
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -870,6 +870,12 @@ END_TWO_BYTE_PACK()
870
870
SmallVectorImpl<const SDNode *> &Worklist,
871
871
unsigned int MaxSteps = 0 ,
872
872
bool TopologicalPrune = false ) {
873
+ // NOTE(TimNN): I'm not confident that the in-progress D53106 actually
874
+ // handles the topological ordering correctly, so I'm disabling
875
+ // this performance optimization until the upstream patch has
876
+ // been accepted.
877
+ TopologicalPrune = false ;
878
+
873
879
SmallVector<const SDNode *, 8 > DeferredNodes;
874
880
if (Visited.count (N))
875
881
return true ;
@@ -901,6 +907,14 @@ END_TWO_BYTE_PACK()
901
907
}
902
908
for (const SDValue &OpV : M->op_values ()) {
903
909
SDNode *Op = OpV.getNode ();
910
+ // If we are adding a glued node, its glued user should be considered a
911
+ // predecessor as well to prevent a node merge causing a non-immediate
912
+ // use of a glue operand. Walk down all unvisited glue users.
913
+ while (auto *GN = Op->getGluedUser ()) {
914
+ if ((GN == M) || Visited.count (GN))
915
+ break ;
916
+ Op = GN;
917
+ }
904
918
if (Visited.insert (Op).second )
905
919
Worklist.push_back (Op);
906
920
if (Op == N)
You can’t perform that action at this time.
0 commit comments