use minSize wrapper; NFCI

These were missed when other uses were switched over:
http://llvm.org/viewvc/llvm-project?view=revision&revision=243994



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2015-08-18 16:44:23 +00:00
parent bfd49ab589
commit 08c1ad0c38
3 changed files with 3 additions and 6 deletions

View File

@ -306,8 +306,7 @@ bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
Function *ParentFn = I->getParent()->getParent();
// If we're only optimizing for size, ignore non-minsize functions.
if (OnlyOptimizeForSize &&
!ParentFn->hasFnAttribute(Attribute::MinSize))
if (OnlyOptimizeForSize && !ParentFn->optForMinSize())
continue;
size_t UGSIdx = GlobalUsesByFunction[ParentFn];

View File

@ -286,7 +286,7 @@ bool ARMSubtarget::enableAtomicExpand() const {
}
bool ARMSubtarget::useStride4VFPs(const MachineFunction &MF) const {
return isSwift() && !MF.getFunction()->hasFnAttribute(Attribute::MinSize);
return isSwift() && !MF.getFunction()->optForMinSize();
}
bool ARMSubtarget::useMovt(const MachineFunction &MF) const {

View File

@ -2995,8 +2995,6 @@ combineInstructionsOverFunction(Function &F, InstCombineWorklist &Worklist,
AliasAnalysis *AA, AssumptionCache &AC,
TargetLibraryInfo &TLI, DominatorTree &DT,
LoopInfo *LI = nullptr) {
// Minimizing size?
bool MinimizeSize = F.hasFnAttribute(Attribute::MinSize);
auto &DL = F.getParent()->getDataLayout();
/// Builder - This is an IRBuilder that automatically inserts new
@ -3019,7 +3017,7 @@ combineInstructionsOverFunction(Function &F, InstCombineWorklist &Worklist,
if (prepareICWorklistFromFunction(F, DL, &TLI, Worklist))
Changed = true;
InstCombiner IC(Worklist, &Builder, MinimizeSize,
InstCombiner IC(Worklist, &Builder, F.optForMinSize(),
AA, &AC, &TLI, &DT, DL, LI);
if (IC.run())
Changed = true;