Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LLVM bpEVL
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Lorenzo Albano
LLVM bpEVL
Commits
059c7926
Commit
059c7926
authored
18 years ago
by
Nick Lewycky
Browse files
Options
Downloads
Patches
Plain Diff
Style changes only. Remove dead code, fix a comment.
llvm-svn: 30588
parent
6bd6da40
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
+4
-11
4 additions, 11 deletions
llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
with
4 additions
and
11 deletions
llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
+
4
−
11
View file @
059c7926
...
...
@@ -72,10 +72,6 @@ namespace {
return
leaders
.
empty
();
}
typename
std
::
vector
<
ElemTy
>::
size_type
countLeaders
()
const
{
return
leaders
.
size
();
}
iterator
findLeader
(
ElemTy
e
)
{
typename
std
::
map
<
ElemTy
,
unsigned
>::
iterator
MI
=
mapping
.
find
(
e
);
if
(
MI
==
mapping
.
end
())
return
0
;
...
...
@@ -140,8 +136,7 @@ namespace {
/// Represents the set of equivalent Value*s and provides insertion
/// and fast lookup. Also stores the set of inequality relationships.
class
PropertySet
{
/// Returns true if V1 is a better choice than V2. Note that it is
/// not a total ordering.
/// Returns true if V1 is a better choice than V2.
bool
compare
(
Value
*
V1
,
Value
*
V2
)
const
{
if
(
isa
<
Constant
>
(
V1
))
{
if
(
!
isa
<
Constant
>
(
V2
))
{
...
...
@@ -393,8 +388,6 @@ namespace {
void
debug
(
std
::
ostream
&
os
)
const
{
static
const
char
*
OpcodeTable
[]
=
{
"EQ"
,
"NE"
};
unsigned
int
size
=
union_find
.
countLeaders
();
union_find
.
debug
(
os
);
for
(
std
::
vector
<
Property
>::
const_iterator
I
=
Properties
.
begin
(),
E
=
Properties
.
end
();
I
!=
E
;
++
I
)
{
...
...
@@ -552,8 +545,8 @@ Value *PredicateSimplifier::resolve(BinaryOperator *BO,
Value
*
lhs
=
resolve
(
BO
->
getOperand
(
0
),
KP
),
*
rhs
=
resolve
(
BO
->
getOperand
(
1
),
KP
);
ConstantIntegral
*
CI1
=
dyn_cast
<
ConstantIntegral
>
(
lhs
)
;
ConstantIntegral
*
CI2
=
dyn_cast
<
ConstantIntegral
>
(
rhs
);
ConstantIntegral
*
CI1
=
dyn_cast
<
ConstantIntegral
>
(
lhs
)
,
*
CI2
=
dyn_cast
<
ConstantIntegral
>
(
rhs
);
if
(
CI1
&&
CI2
)
return
ConstantExpr
::
get
(
BO
->
getOpcode
(),
CI1
,
CI2
);
...
...
@@ -612,7 +605,7 @@ void PredicateSimplifier::visitInstruction(Instruction *I,
if
(
V
!=
Oper
)
{
modified
=
true
;
++
NumVarsReplaced
;
DEBUG
(
std
::
cerr
<<
"
r
esolving "
<<
*
I
);
DEBUG
(
std
::
cerr
<<
"
R
esolving "
<<
*
I
);
I
->
setOperand
(
i
,
V
);
DEBUG
(
std
::
cerr
<<
"into "
<<
*
I
);
}
...
...
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