forked from OSchip/llvm-project
[CGP] getParent()->getParent() --> getFunction(); NFCI
llvm-svn: 304916
This commit is contained in:
parent
e1888d4388
commit
4137d51bc1
|
@ -2199,7 +2199,7 @@ static bool expandMemCmp(CallInst *CI, const TargetTransformInfo *TTI,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Early exit from expansion if -Oz.
|
// Early exit from expansion if -Oz.
|
||||||
if (CI->getParent()->getParent()->optForMinSize())
|
if (CI->getFunction()->optForMinSize())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Early exit from expansion if size is not a constant.
|
// Early exit from expansion if size is not a constant.
|
||||||
|
@ -2221,8 +2221,7 @@ static bool expandMemCmp(CallInst *CI, const TargetTransformInfo *TTI,
|
||||||
LoadSize = LoadSize / 2;
|
LoadSize = LoadSize / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NumLoads >
|
if (NumLoads > TLI->getMaxExpandSizeMemcmp(CI->getFunction()->optForSize())) {
|
||||||
TLI->getMaxExpandSizeMemcmp(CI->getParent()->getParent()->optForSize())) {
|
|
||||||
NumMemCmpGreaterThanMax++;
|
NumMemCmpGreaterThanMax++;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3948,7 +3947,7 @@ bool AddressingModeMatcher::matchAddr(Value *Addr, unsigned Depth) {
|
||||||
static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
|
static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
|
||||||
const TargetLowering &TLI,
|
const TargetLowering &TLI,
|
||||||
const TargetRegisterInfo &TRI) {
|
const TargetRegisterInfo &TRI) {
|
||||||
const Function *F = CI->getParent()->getParent();
|
const Function *F = CI->getFunction();
|
||||||
TargetLowering::AsmOperandInfoVector TargetConstraints =
|
TargetLowering::AsmOperandInfoVector TargetConstraints =
|
||||||
TLI.ParseConstraints(F->getParent()->getDataLayout(), &TRI,
|
TLI.ParseConstraints(F->getParent()->getDataLayout(), &TRI,
|
||||||
ImmutableCallSite(CI));
|
ImmutableCallSite(CI));
|
||||||
|
@ -4545,7 +4544,7 @@ bool CodeGenPrepare::optimizeInlineAsmInst(CallInst *CS) {
|
||||||
bool MadeChange = false;
|
bool MadeChange = false;
|
||||||
|
|
||||||
const TargetRegisterInfo *TRI =
|
const TargetRegisterInfo *TRI =
|
||||||
TM->getSubtargetImpl(*CS->getParent()->getParent())->getRegisterInfo();
|
TM->getSubtargetImpl(*CS->getFunction())->getRegisterInfo();
|
||||||
TargetLowering::AsmOperandInfoVector TargetConstraints =
|
TargetLowering::AsmOperandInfoVector TargetConstraints =
|
||||||
TLI->ParseConstraints(*DL, TRI, CS);
|
TLI->ParseConstraints(*DL, TRI, CS);
|
||||||
unsigned ArgNo = 0;
|
unsigned ArgNo = 0;
|
||||||
|
|
Loading…
Reference in New Issue