diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-06-07 14:29:52 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-06-07 14:29:52 +0000 |
commit | 4137d51bc19acd65045bb3d6777422c446d4a7fe (patch) | |
tree | 5aa97ee2fb4b1f314021dbbba42cdaeb664375aa /llvm/lib/CodeGen | |
parent | e1888d438868e70d6c787a9c9dc4563f31364754 (diff) | |
download | bcm5719-llvm-4137d51bc19acd65045bb3d6777422c446d4a7fe.tar.gz bcm5719-llvm-4137d51bc19acd65045bb3d6777422c446d4a7fe.zip |
[CGP] getParent()->getParent() --> getFunction(); NFCI
llvm-svn: 304916
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index ac1e0b46fcd..7b55556530a 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -2199,7 +2199,7 @@ static bool expandMemCmp(CallInst *CI, const TargetTransformInfo *TTI, 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, const TargetTransformInfo *TTI, 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(Value *Addr, unsigned Depth) { 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::optimizeInlineAsmInst(CallInst *CS) { 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; |