From c5ffa24bc1165b3c1cfe6fa8ae66411f19e0eb83 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 22 Feb 2017 18:27:36 +0000 Subject: [PATCH] [RDF] Only access block live-ins when tracking liveness git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295855 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Hexagon/RDFGraph.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/Hexagon/RDFGraph.cpp b/lib/Target/Hexagon/RDFGraph.cpp index d482db3adcd..2253969290b 100644 --- a/lib/Target/Hexagon/RDFGraph.cpp +++ b/lib/Target/Hexagon/RDFGraph.cpp @@ -907,8 +907,10 @@ void DataFlowGraph::build(unsigned Options) { assert(EntryB.pred_empty() && "Function entry block has predecessors"); for (auto I = MRI.livein_begin(), E = MRI.livein_end(); I != E; ++I) LiveIns.insert(RegisterRef(I->first)); - for (auto I : EntryB.liveins()) - LiveIns.insert(RegisterRef(I.PhysReg, I.LaneMask)); + if (MRI.tracksLiveness()) { + for (auto I : EntryB.liveins()) + LiveIns.insert(RegisterRef(I.PhysReg, I.LaneMask)); + } // Add function-entry phi nodes for the live-in registers. for (std::pair P : LiveIns) { -- 2.50.1