[llvm] r304916 - [CGP] getParent()->getParent() --> getFunction(); NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 07:29:52 PDT 2017
Author: spatel
Date: Wed Jun 7 09:29:52 2017
New Revision: 304916
URL: http://llvm.org/viewvc/llvm-project?rev=304916&view=rev
Log:
[CGP] getParent()->getParent() --> getFunction(); NFCI
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=304916&r1=304915&r2=304916&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Wed Jun 7 09:29:52 2017
@@ -2199,7 +2199,7 @@ static bool expandMemCmp(CallInst *CI, c
return false;
// Early exit from expansion if -Oz.
- if (CI->getParent()->getParent()->optForMinSize())
+ if (CI->getFunction()->optForMinSize())
return false;
// Early exit from expansion if size is not a constant.
@@ -2221,8 +2221,7 @@ static bool expandMemCmp(CallInst *CI, c
LoadSize = LoadSize / 2;
}
- if (NumLoads >
- TLI->getMaxExpandSizeMemcmp(CI->getParent()->getParent()->optForSize())) {
+ if (NumLoads > TLI->getMaxExpandSizeMemcmp(CI->getFunction()->optForSize())) {
NumMemCmpGreaterThanMax++;
return false;
}
@@ -3948,7 +3947,7 @@ bool AddressingModeMatcher::matchAddr(Va
static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
const TargetLowering &TLI,
const TargetRegisterInfo &TRI) {
- const Function *F = CI->getParent()->getParent();
+ const Function *F = CI->getFunction();
TargetLowering::AsmOperandInfoVector TargetConstraints =
TLI.ParseConstraints(F->getParent()->getDataLayout(), &TRI,
ImmutableCallSite(CI));
@@ -4545,7 +4544,7 @@ bool CodeGenPrepare::optimizeInlineAsmIn
bool MadeChange = false;
const TargetRegisterInfo *TRI =
- TM->getSubtargetImpl(*CS->getParent()->getParent())->getRegisterInfo();
+ TM->getSubtargetImpl(*CS->getFunction())->getRegisterInfo();
TargetLowering::AsmOperandInfoVector TargetConstraints =
TLI->ParseConstraints(*DL, TRI, CS);
unsigned ArgNo = 0;
More information about the llvm-commits
mailing list