[PATCH] D15302: [Greedy regalloc] Replace analyzeSiblingValues with something new [Part1]

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 10:25:35 PST 2016


> On Jan 11, 2016, at 2:06 PM, Wei Mi <wmi at google.com> wrote:
> 
>>>> As for path part 2, it does not do anything at the moment does? (I.e., we clear the set before walking through it).
>>> 
>>> 
>>> The set DeadRemats is used to record def instructions which should have been removed when they are found to be dead after rematerialization. However, the def may still be useful for rematerialization of other siblings (Note without DefMI setting in analyzeSiblingValues, for all the siblings with equal values, the original_register_VNI->def is the best place to query the value expression. If the original def is deleted, we have no place to query value expression for rematerialization of siblings in the following rounds of selectOrSplit).
>> 
>> I am aware of that. What I was saying is that DeadRemats is not used to remove the instructions in the end (the patch clears the set before walking through it :)).
> 
> The clear of DeadRemats is called before func allocatePhysRegs. It is
> an initialization which is used to clear leftover from compiling
> previous func. DeadRemats will be filled in func allocatePhysRegs and
> be walked through after allocatePhysRegs.

> 
> Maybe it is clearer to put DeadRemats.clear() after the walking
> through. I put it before allocatePhysRegs only to make it consistent
> with SetOfBrokenHints.
My mistake, that’s fine :).



More information about the llvm-commits mailing list