[llvm-commits] [llvm] r157006 - in /llvm/trunk/lib/CodeGen: MachineScheduler.cpp RegisterPressure.cpp RegisterPressure.h
Eric Christopher
echristo at apple.com
Thu May 17 14:13:45 PDT 2012
> + /// 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?
> +/// Return true if the LHS reg pressure effect is better than RHS.
"Better"? :)
> +static bool compareRPDelta(const RegPressureDelta &LHS,
> + const RegPressureDelta &RHS) {
> + // Compare each component of pressure in decreasing order of importance
> + // without checking if any are valid. Invalid PressureElements are assumed to
> + // have UnitIncrease==0, so are neutral.
> + if (LHS.Excess.UnitIncrease != RHS.Excess.UnitIncrease)
> + return LHS.Excess.UnitIncrease < RHS.Excess.UnitIncrease;
> +
> + if (LHS.CriticalMax.UnitIncrease != RHS.CriticalMax.UnitIncrease)
> + return LHS.CriticalMax.UnitIncrease < RHS.CriticalMax.UnitIncrease;
> +
> + if (LHS.CurrentMax.UnitIncrease != RHS.CurrentMax.UnitIncrease)
> + return LHS.CurrentMax.UnitIncrease < RHS.CurrentMax.UnitIncrease;
> +
> + return false;
> +}
> +
-eric
More information about the llvm-commits
mailing list