Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
4ea9d495
Commit
4ea9d495
authored
16 years ago
by
Evan Cheng
Browse files
Options
Downloads
Patches
Plain Diff
Use a better idiom to silence compiler warnings.
llvm-svn: 51131
parent
e15051d6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+5
-20
5 additions, 20 deletions
llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
with
5 additions
and
20 deletions
llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+
5
−
20
View file @
4ea9d495
...
@@ -406,11 +406,8 @@ void ScheduleDAG::EmitCopyFromReg(SDNode *Node, unsigned ResNo,
...
@@ -406,11 +406,8 @@ void ScheduleDAG::EmitCopyFromReg(SDNode *Node, unsigned ResNo,
// Just use the input register directly!
// Just use the input register directly!
if
(
InstanceNo
>
0
)
if
(
InstanceNo
>
0
)
VRBaseMap
.
erase
(
SDOperand
(
Node
,
ResNo
));
VRBaseMap
.
erase
(
SDOperand
(
Node
,
ResNo
));
#ifndef NDEBUG
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
SrcReg
));
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
SrcReg
));
#else
isNew
=
isNew
;
// Silence compiler warning.
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
SrcReg
));
#endif
assert
(
isNew
&&
"Node emitted out of order - early"
);
assert
(
isNew
&&
"Node emitted out of order - early"
);
return
;
return
;
}
}
...
@@ -468,11 +465,8 @@ void ScheduleDAG::EmitCopyFromReg(SDNode *Node, unsigned ResNo,
...
@@ -468,11 +465,8 @@ void ScheduleDAG::EmitCopyFromReg(SDNode *Node, unsigned ResNo,
if
(
InstanceNo
>
0
)
if
(
InstanceNo
>
0
)
VRBaseMap
.
erase
(
SDOperand
(
Node
,
ResNo
));
VRBaseMap
.
erase
(
SDOperand
(
Node
,
ResNo
));
#ifndef NDEBUG
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
VRBase
));
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
VRBase
));
#else
isNew
=
isNew
;
// Silence compiler warning.
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
ResNo
),
VRBase
));
#endif
assert
(
isNew
&&
"Node emitted out of order - early"
);
assert
(
isNew
&&
"Node emitted out of order - early"
);
}
}
...
@@ -529,11 +523,8 @@ void ScheduleDAG::CreateVirtualRegisters(SDNode *Node, MachineInstr *MI,
...
@@ -529,11 +523,8 @@ void ScheduleDAG::CreateVirtualRegisters(SDNode *Node, MachineInstr *MI,
MI
->
addOperand
(
MachineOperand
::
CreateReg
(
VRBase
,
true
));
MI
->
addOperand
(
MachineOperand
::
CreateReg
(
VRBase
,
true
));
}
}
#ifndef NDEBUG
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
i
),
VRBase
));
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
i
),
VRBase
));
#else
isNew
=
isNew
;
// Silence compiler warning.
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
i
),
VRBase
));
#endif
assert
(
isNew
&&
"Node emitted out of order - early"
);
assert
(
isNew
&&
"Node emitted out of order - early"
);
}
}
}
}
...
@@ -785,11 +776,8 @@ void ScheduleDAG::EmitSubregNode(SDNode *Node,
...
@@ -785,11 +776,8 @@ void ScheduleDAG::EmitSubregNode(SDNode *Node,
}
else
}
else
assert
(
0
&&
"Node is not insert_subreg, extract_subreg, or subreg_to_reg"
);
assert
(
0
&&
"Node is not insert_subreg, extract_subreg, or subreg_to_reg"
);
#ifndef NDEBUG
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
0
),
VRBase
));
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
0
),
VRBase
));
#else
isNew
=
isNew
;
// Silence compiler warning.
VRBaseMap
.
insert
(
std
::
make_pair
(
SDOperand
(
Node
,
0
),
VRBase
));
#endif
assert
(
isNew
&&
"Node emitted out of order - early"
);
assert
(
isNew
&&
"Node emitted out of order - early"
);
}
}
...
@@ -1016,11 +1004,8 @@ void ScheduleDAG::EmitCrossRCCopy(SUnit *SU,
...
@@ -1016,11 +1004,8 @@ void ScheduleDAG::EmitCrossRCCopy(SUnit *SU,
// Copy from physical register.
// Copy from physical register.
assert
(
I
->
Reg
&&
"Unknown physical register!"
);
assert
(
I
->
Reg
&&
"Unknown physical register!"
);
unsigned
VRBase
=
MRI
.
createVirtualRegister
(
SU
->
CopyDstRC
);
unsigned
VRBase
=
MRI
.
createVirtualRegister
(
SU
->
CopyDstRC
);
#ifndef NDEBUG
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SU
,
VRBase
));
bool
isNew
=
VRBaseMap
.
insert
(
std
::
make_pair
(
SU
,
VRBase
));
#else
isNew
=
isNew
;
// Silence compiler warning.
VRBaseMap
.
insert
(
std
::
make_pair
(
SU
,
VRBase
));
#endif
assert
(
isNew
&&
"Node emitted out of order - early"
);
assert
(
isNew
&&
"Node emitted out of order - early"
);
TII
->
copyRegToReg
(
*
BB
,
BB
->
end
(),
VRBase
,
I
->
Reg
,
TII
->
copyRegToReg
(
*
BB
,
BB
->
end
(),
VRBase
,
I
->
Reg
,
SU
->
CopyDstRC
,
SU
->
CopySrcRC
);
SU
->
CopyDstRC
,
SU
->
CopySrcRC
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment