[PATCH] D35985: Skip live range segment verification for reserved physregs
    Stefan Maksimovic via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Dec  5 07:55:56 PST 2017
    
    
  
smaksimovic added a comment.
It seems that at some places mentioned above I have erroneously acquired for the register unit's live range. The method which I used was `getRegUnit()` which computes ranges if they are missing, which I have somehow overlooked.
Looking at `RegisterCoalescer::joinReservedPhysReg(CoalescerPair &CP)` in `RegisterCoalescer.cpp` there exists a statement
  if (RHS.overlaps(LIS->getRegUnit(*UI)))
Checking inside this specific call it can be seen that the live range for this register unit is computed, i.e. it didn't exist up to this point.
By using `LIS->getCachedRegUnit(*UI)` instead and conditionally calling `getRegUnit()` in the following if statement I was able to get the test to pass, and found that no live range information was present for the register unit in question this time.
Would this method be preferable to the one I suggested above?
https://reviews.llvm.org/D35985
    
    
More information about the llvm-commits
mailing list