From: Jakob Stoklund Olesen Date: Tue, 14 Dec 2010 17:47:36 +0000 (+0000) Subject: Q.seenAllInterferences() must be called after Q.collectInterferingVRegs(). X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d84de8cf62991597c15e948ecb121ad0233ba4ec;p=oota-llvm.git Q.seenAllInterferences() must be called after Q.collectInterferingVRegs(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121774 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index 943da11ad37..46cfbe7234b 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -175,9 +175,9 @@ LiveInterval *RAGreedy::getSingleInterference(LiveInterval &VirtReg, // Check direct interferences. LiveIntervalUnion::Query &Q = query(VirtReg, PhysReg); if (Q.checkInterference()) { + Q.collectInterferingVRegs(1); if (!Q.seenAllInterferences()) return 0; - Q.collectInterferingVRegs(1); Interference = Q.interferingVRegs().front(); } @@ -185,9 +185,11 @@ LiveInterval *RAGreedy::getSingleInterference(LiveInterval &VirtReg, for (const unsigned *AliasI = TRI->getAliasSet(PhysReg); *AliasI; ++AliasI) { LiveIntervalUnion::Query &Q = query(VirtReg, *AliasI); if (Q.checkInterference()) { - if (Interference || !Q.seenAllInterferences()) + if (Interference) return 0; Q.collectInterferingVRegs(1); + if (!Q.seenAllInterferences()) + return 0; Interference = Q.interferingVRegs().front(); } }