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

generic function #334

Merged
merged 9 commits into from
Oct 17, 2017
Merged

generic function #334

merged 9 commits into from
Oct 17, 2017

Conversation

m4b
Copy link
Collaborator

@m4b m4b commented Oct 17, 2017

If you like, can merge this and you will be able to test new and old functions side by side.

Additionally, almost everything has been ported to petgraph (except World).

Note:

  1. petgraph old function version of ssa_conversion() is broken; i note this in benchmarks, and line numbers. I believe its my dominator implementation
  2. you can test new and old via panop cli, using --neo flag for new; it will even run the new rewite_to_ssa (unfortunately, does not seem to be working, as testing on libfoo.so. etc., the function is unfinished
  3. We don't have to commit to generic function; its just very easy at the moment to have it generic so can run both side by side.
  4. Re generic functions: I have a proposal/idea for this that i think is going to work beautifully, and I think we be best of both worlds, but will require petgraph across the board
  5. I believe we want petgraph across the board; as I mentioned in PR, it looks like much of the savings are actually due to switching to petgraph.
  6. some functions I added randomly, etc., don't consider Fun the final say, etc. We can remove anything you don't like, etc.

Some numbers, specifically testing the effect of porting the Program cfg to petgraph:

libc, f2d92e1 and ae19d49, 2999 functions:

function lib program lib neo func time RES memory
petgraph panopticon yes 0:07.14 499440 KB
petgraph panopticon no 0:06.00 1822716 KB
petgraph petgraph yes 0:06.13 494684 KB
petgraph petgraph no 0:04.75 1818756 KB

rust binary, ae19d49, 2843 (long) functions:

function lib program lib neo func time RES memory
petgraph petgraph yes 0:32.40 1807908 KB
petgraph petgraph no 1:06.85 6751640 KB

m4b added 9 commits October 16, 2017 20:10
… QT build

* implement `Fun` for `neo::Function`
* Make cli app_logic completely generic (can now properly compare the two)
* Add generic asm printers to display
* Add generic IL printer
* Add SSAFunction trait for data-flow based analysis
* Move ssa_conversion into cli, to be lazy
* Impl SSAFunction as stubs for neo::Function (does nothing currently)
* Fix QT build
* Completely port old function to use petgraph
* add DataFlow trait which implements data flow algorithms
* update data-flow to use petgraph
* temporarily comment neo usage in cli as it cannot be passed into app_logic until il generics are implemented
* fix tests in data-flow
* remove postorder method in function
@flanfly
Copy link
Member

flanfly commented Oct 17, 2017

  • 0:32.40 1807908 KB
  • 1:06.85 6751640 KB

Lets call it a time memory trade off 😹

@flanfly flanfly merged commit e904fb6 into bitcode Oct 17, 2017
@sphinxc0re sphinxc0re deleted the m4b/generic_function branch October 17, 2017 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants