PrincetonUniversity / cpf

Collaborative Parallelization Framework (CPF)
MIT License
32 stars 4 forks source link

Create Opt-Repl Capability #36

Closed vgene closed 2 years ago

vgene commented 2 years ago

Added a new pass opt-repl and a new wrapper cpf-repl.

This new pass provides users a way to create a Repl (read-evaluate-print-loop) to interact with CPF. These specific functionalities are available now:

help/h (command):       print help message (for certain command)
loops/ls:       print all loops with loop id
select/s        $loop_id: select a loop to work with
quit/q: quit the repl
dump (-v):       dump the loop information (verbose: dump the loop instructions)
insts/is:       show instructions with instruction id
deps/ds (from $inst_id_from) (to $inst_id_to):  show dependences with dependence id (from or to certain instructions)
remove/r $dep_id:       remove a certain dependence from the loop
paralelize/p:   parallelize the selected loop with current dependences
modref/mr $inst_id1, $inst_id2:         query the modref between two instructions

Auto-completion and history for the repl command are also available through GNU Readline. To compile and use this new pass, GNU Readline need to be installed with sudo apt install libreadline-dev libreadline

This merge is pending on another merge on the Noelle side to facilitate the dumping PDG with edge ID feature.