summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-10 18:06:25 +0000
committerEric Christopher <echristo@gmail.com>2014-06-10 18:06:25 +0000
commite3a06bcd8a66117538410c08c1ada39a6d335c65 (patch)
tree7ac2191c6a42c60bb27799729d90a4c1f9fc14b4 /lib/Target/AArch64
parentfc0f6e8cc55f5f88421208e0ad3a9058ff0278bc (diff)
downloadllvm-e3a06bcd8a66117538410c08c1ada39a6d335c65.tar.gz
llvm-e3a06bcd8a66117538410c08c1ada39a6d335c65.tar.bz2
llvm-e3a06bcd8a66117538410c08c1ada39a6d335c65.tar.xz
Remove caching of the subtarget for AArch64SelectionDAGInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64')
-rw-r--r--lib/Target/AArch64/AArch64SelectionDAGInfo.cpp7
-rw-r--r--lib/Target/AArch64/AArch64SelectionDAGInfo.h4
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp b/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
index 0740b3d7e6..a62c721c7e 100644
--- a/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
+++ b/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/lib/Target/AArch64/AArch64SelectionDAGInfo.h b/lib/Target/AArch64/AArch64SelectionDAGInfo.h
index 8381f9916a..c2e0c60dff 100644
--- a/lib/Target/AArch64/AArch64SelectionDAGInfo.h
+++ b/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();