diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Target/ARM/ARMConstantPoolValue.h | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantPoolValue.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMConstantPoolValue.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantPoolValue.h b/llvm/lib/Target/ARM/ARMConstantPoolValue.h index 660b7fc88d82..261070a74ba3 100644 --- a/llvm/lib/Target/ARM/ARMConstantPoolValue.h +++ b/llvm/lib/Target/ARM/ARMConstantPoolValue.h @@ -76,13 +76,11 @@ protected: bool AddCurrentAddress); template <typename Derived> - int getExistingMachineCPValueImpl(MachineConstantPool *CP, - unsigned Alignment) { - unsigned AlignMask = Alignment - 1; + int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment) { const std::vector<MachineConstantPoolEntry> &Constants = CP->getConstants(); for (unsigned i = 0, e = Constants.size(); i != e; ++i) { if (Constants[i].isMachineConstantPoolEntry() && - (Constants[i].getAlignment() & AlignMask) == 0) { + Constants[i].getAlign() >= Alignment) { auto *CPV = static_cast<ARMConstantPoolValue*>(Constants[i].Val.MachineCPVal); if (Derived *APC = dyn_cast<Derived>(CPV)) @@ -114,7 +112,7 @@ public: bool isPromotedGlobal() const{ return Kind == ARMCP::CPPromotedGlobal; } int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) override; + Align Alignment) override; void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; @@ -187,7 +185,7 @@ public: } int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) override; + Align Alignment) override; /// hasSameValue - Return true if this ARM constpool value can share the same /// constantpool entry as another ARM constpool value. @@ -223,7 +221,7 @@ public: StringRef getSymbol() const { return S; } int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) override; + Align Alignment) override; void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; @@ -259,7 +257,7 @@ public: const MachineBasicBlock *getMBB() const { return MBB; } int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) override; + Align Alignment) override; void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; |