Variable names should start with an upper case letter; NFC

llvm-svn: 244618
This commit is contained in:
Sanjay Patel 2015-08-11 16:05:43 +00:00
parent fec7965b36
commit 278004be39
1 changed files with 9 additions and 9 deletions

View File

@ -258,8 +258,8 @@ static bool InlineCallIfPossible(CallSite CS, InlineFunctionInfo &IFI,
} }
unsigned Inliner::getInlineThreshold(CallSite CS) const { unsigned Inliner::getInlineThreshold(CallSite CS) const {
int thres = InlineThreshold; // -inline-threshold or else selected by int Threshold = InlineThreshold; // -inline-threshold or else selected by
// overall opt level // overall opt level
// If -inline-threshold is not given, listen to the optsize attribute when it // If -inline-threshold is not given, listen to the optsize attribute when it
// would decrease the threshold. // would decrease the threshold.
@ -268,17 +268,17 @@ unsigned Inliner::getInlineThreshold(CallSite CS) const {
// FIXME: Use Function::optForSize(). // FIXME: Use Function::optForSize().
Caller->hasFnAttribute(Attribute::OptimizeForSize); Caller->hasFnAttribute(Attribute::OptimizeForSize);
if (!(InlineLimit.getNumOccurrences() > 0) && OptSize && if (!(InlineLimit.getNumOccurrences() > 0) && OptSize &&
OptSizeThreshold < thres) OptSizeThreshold < Threshold)
thres = OptSizeThreshold; Threshold = OptSizeThreshold;
// Listen to the inlinehint attribute when it would increase the threshold // Listen to the inlinehint attribute when it would increase the threshold
// and the caller does not need to minimize its size. // and the caller does not need to minimize its size.
Function *Callee = CS.getCalledFunction(); Function *Callee = CS.getCalledFunction();
bool InlineHint = Callee && !Callee->isDeclaration() && bool InlineHint = Callee && !Callee->isDeclaration() &&
Callee->hasFnAttribute(Attribute::InlineHint); Callee->hasFnAttribute(Attribute::InlineHint);
if (InlineHint && HintThreshold > thres && if (InlineHint && HintThreshold > Threshold &&
!Caller->hasFnAttribute(Attribute::MinSize)) !Caller->hasFnAttribute(Attribute::MinSize))
thres = HintThreshold; Threshold = HintThreshold;
// Listen to the cold attribute when it would decrease the threshold. // Listen to the cold attribute when it would decrease the threshold.
bool ColdCallee = Callee && !Callee->isDeclaration() && bool ColdCallee = Callee && !Callee->isDeclaration() &&
@ -288,10 +288,10 @@ unsigned Inliner::getInlineThreshold(CallSite CS) const {
// do not use the default cold threshold even if it is smaller. // do not use the default cold threshold even if it is smaller.
if ((InlineLimit.getNumOccurrences() == 0 || if ((InlineLimit.getNumOccurrences() == 0 ||
ColdThreshold.getNumOccurrences() > 0) && ColdCallee && ColdThreshold.getNumOccurrences() > 0) && ColdCallee &&
ColdThreshold < thres) ColdThreshold < Threshold)
thres = ColdThreshold; Threshold = ColdThreshold;
return thres; return Threshold;
} }
static void emitAnalysis(CallSite CS, const Twine &Msg) { static void emitAnalysis(CallSite CS, const Twine &Msg) {