diff options
author | Eric Christopher <echristo@gmail.com> | 2015-02-20 08:39:06 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-02-20 08:39:06 +0000 |
commit | 3ee30d060764a80f5c9d8ed8cc09194a399aed2b (patch) | |
tree | ff0ff516e0c166cf8b8c55e4dd2264efdc607416 /llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp | |
parent | 22b2ad265f22707a740ec950a73afb90ccdf0f9a (diff) | |
download | bcm5719-llvm-3ee30d060764a80f5c9d8ed8cc09194a399aed2b.tar.gz bcm5719-llvm-3ee30d060764a80f5c9d8ed8cc09194a399aed2b.zip |
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.
llvm-svn: 230000
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp index 0cfd5826aad..b9c53998752 100644 --- a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp @@ -28,15 +28,14 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset( // Check to see if there is a specialized entry-point for memory zeroing. ConstantSDNode *V = dyn_cast<ConstantSDNode>(Src); ConstantSDNode *SizeValue = dyn_cast<ConstantSDNode>(Size); + const AArch64Subtarget &STI = + DAG.getMachineFunction().getSubtarget<AArch64Subtarget>(); const char *bzeroEntry = - (V && V->isNullValue()) - ? DAG.getTarget().getSubtarget<AArch64Subtarget>().getBZeroEntry() - : nullptr; + (V && V->isNullValue()) ? STI.getBZeroEntry() : nullptr; // For small size (< 256), it is not beneficial to use bzero // instead of memset. if (bzeroEntry && (!SizeValue || SizeValue->getZExtValue() > 256)) { - const AArch64TargetLowering &TLI = - *DAG.getTarget().getSubtarget<AArch64Subtarget>().getTargetLowering(); + const AArch64TargetLowering &TLI = *STI.getTargetLowering(); EVT IntPtr = TLI.getPointerTy(); Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext()); |