[llvm-commits] [llvm] r157006 - in /llvm/trunk/lib/CodeGen: MachineScheduler.cpp RegisterPressure.cpp RegisterPressure.h

Eric Christopher echristo at apple.com
Thu May 17 16:11:39 PDT 2012


On May 17, 2012, at 3:59 PM, Andrew Trick <atrick at apple.com> wrote:

> 
> On May 17, 2012, at 2:13 PM, Eric Christopher <echristo at apple.com> wrote:
> 
>>> +  /// List of pressure sets that exceed the target's pressure limit before
>>> +  /// scheduling, listed in increasing set ID order. Each pressure set is paired
>>> +  /// with its max pressure in the currently scheduled regions.
>>> +  std::vector<PressureElement> RegionCriticalPSets;
>>> +
>> 
>> Not sure how many of any of the things you have in std::vector you expect, but
>> if it's small perhaps a SmallVector?
> 
> Not sure it makes a difference. But for the intellectually curious, this was my reasoning: DAG is only allocated once per function so its vectors get reused. The vectors are always passed around as their own ArrayRefs, not as some subpart of another container. DAG is a large collection of top level fields that I didn't want to pad.
> 

Sounds fair to me :)

>>> +/// Return true if the LHS reg pressure effect is better than RHS.
>> 
>> "Better"? :)
> 
> Better comments committed. We can't just say that one regpressure delta is less than another though. Register pressure has a number of dimensions and we view it as good or bad using heuristcs and comparing it to other things going on in the scheduling region.

Sure. Ultimately probably a list description of what we'll consider more desirable would be good, but it's also in flux at the moment :)

-eric



More information about the llvm-commits mailing list