Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dead store elimination (draft) #257

Merged
merged 87 commits into from Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
00b0dac
Add initial prototying of DeadStoreEliminator
alberdingk-thijm Apr 30, 2018
d5acfda
Improve upon DeadStoreEliminator prototype
alberdingk-thijm Apr 30, 2018
7f24885
Add initial code for DeadStoreEliminator
alberdingk-thijm May 1, 2018
90ff8cd
Update state analyzer and fix type errors
alberdingk-thijm May 1, 2018
59c1fdd
Add remill::VisitSequential for arrays and vectors
alberdingk-thijm May 2, 2018
04e9d68
Begin refactor of Visit funcs to StateVisitor
alberdingk-thijm May 2, 2018
fa06b48
Fix segfault in StateVisitor::visit, code style
alberdingk-thijm May 2, 2018
0ba27db
Prototype ForwardAliasVisitor for alias analysis
alberdingk-thijm May 4, 2018
e2c46a0
Add non-working visit functions for alias analysis
alberdingk-thijm May 10, 2018
747fbba
Fix compilation of alias analysis visit funcs
alberdingk-thijm May 10, 2018
f0ea41c
Change ForwardAliasVisitor to RetTy=bool
alberdingk-thijm May 10, 2018
947712b
Add progress tracking to AliasAnalysis
alberdingk-thijm May 10, 2018
f9b2e6c
Correct progress tracker, use BasicBlockFunction()
alberdingk-thijm May 10, 2018
bbb7d91
Change ForwardAliasAnalysis<RetTy = AliasResult>
alberdingk-thijm May 10, 2018
6bd27c6
Add FAV state pointer field, PHINode impl
alberdingk-thijm May 15, 2018
e639d73
Allow non-const add and sub in FAV
alberdingk-thijm May 16, 2018
814332c
Update PHINode impl in FAV
alberdingk-thijm May 17, 2018
4666eb8
Clean up use of StateSlots to create AAMDNodes
alberdingk-thijm May 18, 2018
cf60352
Complete addition of AAMDNodes for load and store
alberdingk-thijm May 18, 2018
8c1f269
Add GenerateLiveSet func
alberdingk-thijm May 23, 2018
d56760e
Initialize live set, add AAMDNodes to stores
alberdingk-thijm May 23, 2018
7dd39f3
Change LiveSet creation to a block visitor class
alberdingk-thijm May 25, 2018
5695981
Add to_remove set to LSBV
alberdingk-thijm May 25, 2018
0d4b859
Update build script to use os-release for OS detection
alberdingk-thijm May 29, 2018
79b7a58
Update DSE code to conform to pag's review
alberdingk-thijm May 29, 2018
376121d
Refactor LiveSetBlockVisitor to one LiveSet per block
alberdingk-thijm May 29, 2018
cb49482
Update VisitBlock to better check instruction type
alberdingk-thijm May 30, 2018
76f4010
Fix VisitBlock CallInst and InvokeInst cases
alberdingk-thijm May 30, 2018
5c5588e
Stack allocate AAMDInfo in AnalyzeAliases
alberdingk-thijm May 30, 2018
b86cbc3
Add remove pass option for VisitBlock
alberdingk-thijm May 30, 2018
19b050b
Add DOT digraph generation
alberdingk-thijm Jun 4, 2018
8e4d4ce
Fix bugs in dot digraph
alberdingk-thijm Jun 4, 2018
08a29d7
Fix various bugs in AAMDNodes and LSBV
alberdingk-thijm Jun 4, 2018
915a1cd
Fix various function prototypes, overflow checks
alberdingk-thijm Jun 4, 2018
f2d1c0d
Merge AliasMap and OffsetMap
alberdingk-thijm Jun 4, 2018
07d8ea5
Change add/sub insts to be safer
alberdingk-thijm Jun 4, 2018
031c99f
Refactor GetUnsignedOffset style
alberdingk-thijm Jun 4, 2018
929be48
Fix illegal instruction error
alberdingk-thijm Jun 4, 2018
2fc73e7
Add offset checking for GEP, provide log messages
alberdingk-thijm Jun 5, 2018
3daf6a3
Fix APInt initialization in VisitGEP
alberdingk-thijm Jun 5, 2018
29d52b0
Re-add dead store elimination and alias map
alberdingk-thijm Jun 5, 2018
1aece59
Move LSBV into alias analysis, expand callinst
alberdingk-thijm Jun 5, 2018
32bde83
Improve DOT creation, fix errors for callinsts
alberdingk-thijm Jun 6, 2018
31172a4
Clean up code per @pag's comments
alberdingk-thijm Jun 6, 2018
485608f
Clean up code, add selectinst, fix compile errors
alberdingk-thijm Jun 6, 2018
c2f63e5
Clean up logging
alberdingk-thijm Jun 6, 2018
e43e8bf
More changes to please Peter
alberdingk-thijm Jun 6, 2018
ecca677
Correct errors in visitSelect
alberdingk-thijm Jun 15, 2018
d5e0042
Merge branch 'alberdingk-thijm_dead_store' of github.com:trailofbits/…
pgoodman Jun 18, 2018
14a484f
Add load forwarding code
alberdingk-thijm Jun 18, 2018
3ccec78
Add code to run FBV
alberdingk-thijm Jun 18, 2018
8d70f2b
Fix map usage error in FBV
alberdingk-thijm Jun 18, 2018
7b6b16c
Add call, invoke cases for FBV
alberdingk-thijm Jun 18, 2018
4bb9b8b
Here are the changes whoops
pgoodman Jun 19, 2018
e0136dd
Minor API change
pgoodman Jun 19, 2018
d3f1f6e
Minor tweaks to DOT digraph printing, as well as attempts to handle t…
pgoodman Jun 19, 2018
fb0f06f
Change log level
pgoodman Jun 20, 2018
dbdf90a
Merge pag_dead_store
alberdingk-thijm Jun 21, 2018
4dcd5e4
Fix compile errors due to messy merge
alberdingk-thijm Jun 21, 2018
b5ce5ff
Pag dead store (#262)
pgoodman Jun 21, 2018
3cb744e
Improve call/invoke case of FBV
alberdingk-thijm Jun 21, 2018
80592f8
Improve call/invoke case of FBV
alberdingk-thijm Jun 21, 2018
e477bae
Removes a level of indirection in the __remill_basic_block function
pgoodman Jun 21, 2018
a34caed
Create dedicated stats tracker
alberdingk-thijm Jun 21, 2018
7db3c07
Code style tweaks that flatten out control flow; some bug fixes; hand…
pgoodman Jun 22, 2018
1a9a8ad
Merge branch 'alberdingk-thijm_dead_store' into pag_dead_store
alberdingk-thijm Jun 22, 2018
d06b614
Merge branch 'pag_dead_store' of https://github.com/trailofbits/remil…
alberdingk-thijm Jun 22, 2018
6032866
Merge pull request #263 from trailofbits/pag_dead_store
alberdingk-thijm Jun 22, 2018
4ad9dc8
Move call/invoke LiveSet gen to static func
alberdingk-thijm Jun 22, 2018
3f6a23d
Add code to FAV for calls and invokes
alberdingk-thijm Jun 22, 2018
5899950
Begin change of LSBV to module-level
alberdingk-thijm Jun 22, 2018
b72baa2
Minor bug fixes
pgoodman Jun 22, 2018
c929dd4
Remove some dead code
pgoodman Jun 22, 2018
0aeb7f8
Begin adding more code for call/invoke LSBV
alberdingk-thijm Jun 25, 2018
7126ed8
Add entry block checks for LSBV call/invoke
alberdingk-thijm Jun 25, 2018
cdb0266
Info about register names, as well as printing them in the digraphs.
pgoodman Jun 25, 2018
d184182
Merge branch 'alberdingk-thijm_dead_store' of github.com:trailofbits/…
pgoodman Jun 25, 2018
da65fe9
Make DOT printing only happen per function, as opposed to printing ev…
pgoodman Jun 25, 2018
d5ca40e
Bug fixes and DOT printing improvements.
pgoodman Jun 25, 2018
80b2d8b
Bug fixes and DOT printing improvements.
pgoodman Jun 25, 2018
bb4b577
Also print out DOT digraphs of functions after removing stuff
pgoodman Jun 25, 2018
13459c8
Tried to make it treat everything before a call to __remill_error as …
pgoodman Jun 26, 2018
3634440
Use datalayout and type sizes to handle the number of elements in a s…
pgoodman Jun 27, 2018
bfeb1d9
More stats, hopefully fixes a bitcast issue.
pgoodman Jun 27, 2018
6690a02
Minor bug fixes, and more DOT printing to help diagnose when the offs…
pgoodman Jun 28, 2018
93273ca
Some possible bug fixes
pgoodman Jun 28, 2018
fbd97f6
Minor bug fix
pgoodman Jun 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -27,11 +27,13 @@ lib/*

third_party/*
build/*
remill-build/*
generated/*
gtest_build/*

tools/build/*
tools/dist/*
tools/mcsema/*
tools/remill_disass.egg-info/*
tools/remill_disass/CFG.proto
tools/remill_disass/CFG_pb2.py
Expand Down Expand Up @@ -89,3 +91,6 @@ obj-intel64/*

# VIM
*.swp

# Lifted binaries
*.lifted
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -201,6 +201,7 @@ add_library(${PROJECT_NAME} STATIC
remill/BC/IntrinsicTable.cpp
remill/BC/Lifter.cpp
remill/BC/Util.cpp
remill/BC/DeadStoreEliminator.cpp

remill/OS/FileSystem.cpp
remill/OS/OS.cpp
Expand Down