[llvm-dev] Multi-Threading Compilers

Doerfert, Johannes via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 26 08:10:59 PDT 2020


On 3/25/20 11:33 PM, Chris Lattner wrote:
 >
 >
 >> On Mar 25, 2020, at 5:14 PM, Doerfert, Johannes <jdoerfert at anl.gov> 
wrote:
 >>
 >>>> Let's assume you
 >>>> walk the uses and we "removed" the use list so there are none, 
what does
 >>>> that mean. I'd say, nothing much. If you inspect the Value and see 
it's
 >>>> a Constant you have to assume it has Aliases that denote the same 
value
 >>>> so direct uses are not really interesting anyway. If you inspect 
further
 >>>> and see ConstantInt/Float/... you can deal with the missing use 
list. If
 >>>> you don't inspect the Value you cannot really make much of an 
empty use
 >>>> list, or can you? I doubt we ever call RAUW on a ConstantInt/Float/...
 >>>>
 >>>> Feel free to elaborate on your concerns.
 >>>
 >>>
 >>> Have you tested your thesis that no one walks the use-def chains?  You
 >>> could just add an assertion to the compiler (the methods like
 >>> use_begin() hasOneUse() etc), that aborts on constants, then run the
 >>> test suite.
 >>
 >> That is what I suggested a few emails back. However, I never said it is
 >> safe because no one walks it but what I suggested is that it will
 >> actually not impact much if we don't remember the uses of Constants
 >> (except globals).
 >
 > Sure, I was just curious what you base that opinion on.  Have you 
done an experiment?

I haven't but, I suggested a few emails back we should gather such data

(and I was hoping Nicholas was going to do it).


Could you elaborate on what you said earlier. Why is problematic to
remove the use-lists tracking from Constants, except globals? If you
have a use case in which an always empty use list for such constants
would be problematic it would be beneficial for us to consider it sooner
than later.

Thanks,
   Johannes



 >
 > -Chris





More information about the llvm-dev mailing list