Remove caching of the subtarget for AArch64SelectionDAGInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210553 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-06-10 18:06:25 +00:00
parent fc0f6e8cc5
commit e3a06bcd8a
2 changed files with 4 additions and 7 deletions

View File

@ -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)) {

View File

@ -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();