Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrea Gussoni
artifacts-asiaccs20
Commits
69dd349f
Commit
69dd349f
authored
Dec 11, 2020
by
Andrea Gussoni
Browse files
Add revng script for lifting and isolation
parent
2c005a5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripting/revng-extraction-scripts/lift-and-isolate-all.sh
0 → 100755
View file @
69dd349f
#!/bin/bash
if
[
$#
-eq
0
]
;
then
echo
"No arguments supplied"
exit
1
fi
basepath
=
$(
pwd
)
arch
=
$1
workdir
=
$basepath
/workdir-
$arch
isolated_dir
=
$workdir
/revng-isolated
if
[
!
-d
$isolated_dir
]
;
then
mkdir
$isolated_dir
;
fi
timing_path
=
$workdir
/timings
if
[
!
-d
$timing_path
]
;
then
mkdir
$timing_path
;
fi
cd
$arch
for
filename
in
*
do
echo
"Isolating input:
$filename
"
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-lift.time"
revng lift
--use-debug-symbols
--debug-info
ll
$filename
$isolated_dir
/
$filename
.ll
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-detect.time"
revng opt
-S
$isolated_dir
/
$filename
.ll
-function-boundaries-function-symbol
-simple-return-instruction-analysis
-o
$isolated_dir
/
$filename
.ll.hints
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-detect.time"
revng opt
-S
$isolated_dir
/
$filename
.ll.hints
-detect-function-boundaries
-detect-abi
-o
$isolated_dir
/
$filename
.ll.functions
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-isolate.time"
revng opt
-S
$isolated_dir
/
$filename
.ll.functions
-isolate
-enforce-abi
-o
$isolated_dir
/
$filename
.ll.isolated
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-purge.time"
revng opt
-S
$isolated_dir
/
$filename
.ll.isolated
-remove-pc-stores
-remove-bad-pc
-remove-switch
-o
$isolated_dir
/
$filename
.ll.isolated.purged
/usr/bin/time
--format
=
"%S,%U,%e,%M"
-o
"
$timing_path
/
$filename
.revng-purge.time"
revng opt
-S
$isolated_dir
/
$filename
.ll.isolated.purged
-sroa
-reassociate
-instcombine
-constprop
-dce
-early-cse
-o
$isolated_dir
/
$filename
.ll.isolated.purged.sroa
rm
$isolated_dir
/
$filename
.ll.coverage.csv
rm
$isolated_dir
/
$filename
.ll.li.csv
rm
$isolated_dir
/
$filename
.ll.need.csv
rm
$isolated_dir
/
$filename
.ll.functions
rm
$isolated_dir
/
$filename
.ll.hints
rm
$isolated_dir
/
$filename
.ll.isolated
done
;
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment