Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Open Source Software
Zipr Toolchain
Commits
dbbbddf8
Commit
dbbbddf8
authored
8 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
zipr/irdb optimizer support
Former-commit-id: 5b5f871b59e360fb3b1b9cbd40ef0efd039d8177
parent
615fff12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libEXEIO/include/exeio.h
+2
-1
2 additions, 1 deletion
libEXEIO/include/exeio.h
libIRDB/include/util/insn_preds.hpp
+1
-0
1 addition, 0 deletions
libIRDB/include/util/insn_preds.hpp
libIRDB/src/util/insn_preds.cpp
+12
-1
12 additions, 1 deletion
libIRDB/src/util/insn_preds.cpp
with
15 additions
and
2 deletions
libEXEIO/include/exeio.h
+
2
−
1
View file @
dbbbddf8
...
...
@@ -40,6 +40,7 @@ namespace EXEIO
class
exeio_backend_t
{
public:
virtual
~
exeio_backend_t
()
{
}
virtual
void
dump_header
(
std
::
ostream
&
stream
)
=
0
;
virtual
void
dump_section_headers
(
std
::
ostream
&
stream
)
=
0
;
virtual
void
load
(
exeio_t
*
main
,
char
*
filename
)
=
0
;
...
...
@@ -76,7 +77,7 @@ namespace EXEIO
// constructors
exeio_t
()
{
Init
();
}
exeio_t
(
char
*
filename
)
{
Init
();
load
(
filename
);
}
~
exeio_t
()
{
delete
backend
;
}
virtual
~
exeio_t
()
{
delete
backend
;
}
virtual
void
load
(
std
::
string
filename
)
{
load
((
char
*
)
filename
.
c_str
());
}
...
...
This diff is collapsed.
Click to expand it.
libIRDB/include/util/insn_preds.hpp
+
1
−
0
View file @
dbbbddf8
...
...
@@ -46,6 +46,7 @@ class InstructionPredecessors_t
private
:
virtual
void
AddPred
(
const
Instruction_t
*
before
,
const
Instruction_t
*
after
);
virtual
void
AddPreds
(
const
Instruction_t
*
before
,
const
InstructionSet_t
&
after
);
PredMap_t
pred_map
;
};
...
...
This diff is collapsed.
Click to expand it.
libIRDB/src/util/insn_preds.cpp
+
12
−
1
View file @
dbbbddf8
...
...
@@ -29,6 +29,14 @@ using namespace std;
void
InstructionPredecessors_t
::
AddPreds
(
const
Instruction_t
*
before
,
const
InstructionSet_t
&
afterset
)
{
for
(
InstructionSet_t
::
const_iterator
it
=
afterset
.
begin
();
it
!=
afterset
.
end
();
++
it
)
{
pred_map
[
*
it
].
insert
((
libIRDB
::
Instruction_t
*
)
before
);
}
}
void
InstructionPredecessors_t
::
AddPred
(
const
Instruction_t
*
before
,
const
Instruction_t
*
after
)
{
assert
(
before
);
...
...
@@ -50,6 +58,9 @@ void InstructionPredecessors_t::AddFile(const FileIR_t* firp2)
Instruction_t
*
insn
=*
it
;
AddPred
(
insn
,
insn
->
GetTarget
());
AddPred
(
insn
,
insn
->
GetFallthrough
());
}
if
(
insn
->
GetIBTargets
())
AddPreds
(
insn
,
*
insn
->
GetIBTargets
());
}
}
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