summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/RDFLiveness.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2019-12-22 19:35:02 +0100
committerMark de Wever <koraq@xs4all.nl>2019-12-22 19:35:02 +0100
commit9c11026c1b0180f66e4b2a70611ec4f2d21ed3f7 (patch)
tree3d88e03611774eae183ee74b4cca0adb68633049 /llvm/lib/Target/Hexagon/RDFLiveness.cpp
parent31262d6722c7ae6a9966a76064af43e5b3a8df71 (diff)
downloadbcm5719-llvm-9c11026c1b0180f66e4b2a70611ec4f2d21ed3f7.tar.gz
bcm5719-llvm-9c11026c1b0180f66e4b2a70611ec4f2d21ed3f7.zip
[Hexagon] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71814
Diffstat (limited to 'llvm/lib/Target/Hexagon/RDFLiveness.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/RDFLiveness.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/Hexagon/RDFLiveness.cpp b/llvm/lib/Target/Hexagon/RDFLiveness.cpp
index 7d7b89462ff..e2c007c9d01 100644
--- a/llvm/lib/Target/Hexagon/RDFLiveness.cpp
+++ b/llvm/lib/Target/Hexagon/RDFLiveness.cpp
@@ -620,7 +620,7 @@ void Liveness::computePhiInfo() {
for (NodeAddr<UseNode*> UA : PUs) {
std::map<NodeId,RegisterAggr> &PUM = PhiUp[UA.Id];
RegisterRef UR = PRI.normalize(UA.Addr->getRegRef(DFG));
- for (const std::pair<NodeId,RegisterAggr> &P : PUM) {
+ for (const std::pair<const NodeId, RegisterAggr> &P : PUM) {
bool Changed = false;
const RegisterAggr &MidDefs = P.second;
@@ -636,7 +636,7 @@ void Liveness::computePhiInfo() {
// if MidDefs does not cover (R,U)
// then add (R-MidDefs,U) to RealUseMap[P]
//
- for (const std::pair<RegisterId,NodeRefSet> &T : RUM) {
+ for (const std::pair<const RegisterId, NodeRefSet> &T : RUM) {
RegisterRef R(T.first);
// The current phi (PA) could be a phi for a regmask. It could
// reach a whole variety of uses that are not related to the
@@ -768,7 +768,7 @@ void Liveness::computeLiveIns() {
auto PrA = DFG.addr<BlockNode*>(PUA.Addr->getPredecessor());
RefMap &LOX = PhiLOX[PrA.Addr->getCode()];
- for (const std::pair<RegisterId,NodeRefSet> &RS : RUs) {
+ for (const std::pair<const RegisterId, NodeRefSet> &RS : RUs) {
// We need to visit each individual use.
for (std::pair<NodeId,LaneBitmask> P : RS.second) {
// Create a register ref corresponding to the use, and find
@@ -991,7 +991,7 @@ void Liveness::traverse(MachineBasicBlock *B, RefMap &LiveIn) {
RefMap LiveInCopy = LiveIn;
LiveIn.clear();
- for (const std::pair<RegisterId,NodeRefSet> &LE : LiveInCopy) {
+ for (const std::pair<const RegisterId, NodeRefSet> &LE : LiveInCopy) {
RegisterRef LRef(LE.first);
NodeRefSet &NewDefs = LiveIn[LRef.Reg]; // To be filled.
const NodeRefSet &OldDefs = LE.second;
@@ -1105,7 +1105,7 @@ void Liveness::traverse(MachineBasicBlock *B, RefMap &LiveIn) {
for (auto C : IIDF[B]) {
RegisterAggr &LiveC = LiveMap[C];
- for (const std::pair<RegisterId,NodeRefSet> &S : LiveIn)
+ for (const std::pair<const RegisterId, NodeRefSet> &S : LiveIn)
for (auto R : S.second)
if (MDT.properlyDominates(getBlockWithRef(R.first), C))
LiveC.insert(RegisterRef(S.first, R.second));
OpenPOWER on IntegriCloud