[PATCH] D43620: [Pipeliner] Fixed node order issue related to zero latency edges
    Danila Malyutin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jun 18 07:34:57 PDT 2020
    
    
  
danilaml added a comment.
Herald added a project: LLVM.
Sorry for commenting on an old merge PR, but was looking through some asserts and stumbled on this code which raised some questions.
================
Comment at: llvm/trunk/lib/CodeGen/MachinePipeliner.cpp:3908
+  typedef std::pair<SUnit *, unsigned> UnitIndex;
+  std::vector<UnitIndex> Indices(NodeOrder.size(), std::make_pair(nullptr, 0));
+
----------------
Why Indicies is initialized with NodeOrder.size() {nullptr, 0} pairs? Are they used anywhere?
================
Comment at: llvm/trunk/lib/CodeGen/MachinePipeliner.cpp:3951
+      unsigned SuccIndex =
+          std::get<1>(*std::lower_bound(Indices.begin(), Indices.end(),
+                                        std::make_pair(SuccSU, 0), CompareKey));
----------------
Is this dereference always valid? Can SuccSU unit be exit su and not be part of the NodeOrder?
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43620/new/
https://reviews.llvm.org/D43620
    
    
More information about the llvm-commits
mailing list