diff options
| author | Eric Christopher <echristo@gmail.com> | 2014-06-10 18:06:25 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2014-06-10 18:06:25 +0000 |
| commit | 57c2319bb30b7c6bdcca77a784d148b2430b4660 (patch) | |
| tree | 6f5542cb58c4c7b01cdfd897c671af2f51b62a1b | |
| parent | 6f2a203f2427e794233010f19bcf48ceb442c9db (diff) | |
| download | bcm5719-llvm-57c2319bb30b7c6bdcca77a784d148b2430b4660.tar.gz bcm5719-llvm-57c2319bb30b7c6bdcca77a784d148b2430b4660.zip | |
Remove caching of the subtarget for AArch64SelectionDAGInfo.
llvm-svn: 210553
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp index 0740b3d7e6f..a62c721c7e1 100644 --- a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp @@ -17,8 +17,7 @@ using namespace llvm; #define DEBUG_TYPE "aarch64-selectiondag-info" AArch64SelectionDAGInfo::AArch64SelectionDAGInfo(const TargetMachine &TM) - : TargetSelectionDAGInfo(TM.getDataLayout()), - Subtarget(&TM.getSubtarget<AArch64Subtarget>()) {} + : TargetSelectionDAGInfo(TM.getDataLayout()) {} AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {} @@ -30,7 +29,9 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset( ConstantSDNode *V = dyn_cast<ConstantSDNode>(Src); ConstantSDNode *SizeValue = dyn_cast<ConstantSDNode>(Size); const char *bzeroEntry = - (V && V->isNullValue()) ? Subtarget->getBZeroEntry() : nullptr; + (V && V->isNullValue()) + ? DAG.getTarget().getSubtarget<AArch64Subtarget>().getBZeroEntry() + : nullptr; // For small size (< 256), it is not beneficial to use bzero // instead of memset. if (bzeroEntry && (!SizeValue || SizeValue->getZExtValue() > 256)) { diff --git a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h index 8381f9916a8..c2e0c60dff0 100644 --- a/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h +++ b/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h @@ -19,10 +19,6 @@ namespace llvm { class AArch64SelectionDAGInfo : public TargetSelectionDAGInfo { - /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can - /// make the right decision when generating code for different targets. - const AArch64Subtarget *Subtarget; - public: explicit AArch64SelectionDAGInfo(const TargetMachine &TM); ~AArch64SelectionDAGInfo(); |

