forked from OSchip/llvm-project
Remove caching of the subtarget for AArch64SelectionDAGInfo.
llvm-svn: 210553
This commit is contained in:
parent
6f2a203f24
commit
57c2319bb3
|
@ -17,8 +17,7 @@ using namespace llvm;
|
||||||
#define DEBUG_TYPE "aarch64-selectiondag-info"
|
#define DEBUG_TYPE "aarch64-selectiondag-info"
|
||||||
|
|
||||||
AArch64SelectionDAGInfo::AArch64SelectionDAGInfo(const TargetMachine &TM)
|
AArch64SelectionDAGInfo::AArch64SelectionDAGInfo(const TargetMachine &TM)
|
||||||
: TargetSelectionDAGInfo(TM.getDataLayout()),
|
: TargetSelectionDAGInfo(TM.getDataLayout()) {}
|
||||||
Subtarget(&TM.getSubtarget<AArch64Subtarget>()) {}
|
|
||||||
|
|
||||||
AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {}
|
AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {}
|
||||||
|
|
||||||
|
@ -30,7 +29,9 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
|
||||||
ConstantSDNode *V = dyn_cast<ConstantSDNode>(Src);
|
ConstantSDNode *V = dyn_cast<ConstantSDNode>(Src);
|
||||||
ConstantSDNode *SizeValue = dyn_cast<ConstantSDNode>(Size);
|
ConstantSDNode *SizeValue = dyn_cast<ConstantSDNode>(Size);
|
||||||
const char *bzeroEntry =
|
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
|
// For small size (< 256), it is not beneficial to use bzero
|
||||||
// instead of memset.
|
// instead of memset.
|
||||||
if (bzeroEntry && (!SizeValue || SizeValue->getZExtValue() > 256)) {
|
if (bzeroEntry && (!SizeValue || SizeValue->getZExtValue() > 256)) {
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
class AArch64SelectionDAGInfo : public TargetSelectionDAGInfo {
|
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:
|
public:
|
||||||
explicit AArch64SelectionDAGInfo(const TargetMachine &TM);
|
explicit AArch64SelectionDAGInfo(const TargetMachine &TM);
|
||||||
~AArch64SelectionDAGInfo();
|
~AArch64SelectionDAGInfo();
|
||||||
|
|
Loading…
Reference in New Issue