mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Do one lookup instead of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d578a40853
commit
46fd7a6ef8
@ -161,9 +161,10 @@ RegUseTracker::DropUse(size_t LUIdx) {
|
||||
|
||||
bool
|
||||
RegUseTracker::isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const {
|
||||
if (!RegUsesMap.count(Reg)) return false;
|
||||
const SmallBitVector &UsedByIndices =
|
||||
RegUsesMap.find(Reg)->second.UsedByIndices;
|
||||
RegUsesTy::const_iterator I = RegUsesMap.find(Reg);
|
||||
if (I == RegUsesMap.end())
|
||||
return false;
|
||||
const SmallBitVector &UsedByIndices = I->second.UsedByIndices;
|
||||
int i = UsedByIndices.find_first();
|
||||
if (i == -1) return false;
|
||||
if ((size_t)i != LUIdx) return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user