dg icon indicating copy to clipboard operation
dg copied to clipboard

A question on marking nodes of a control-dependent BBlock

Open ruizhang2015 opened this issue 7 years ago • 2 comments

https://github.com/mchalupa/dg/blob/1d657baa781b9f6105128fd27da968b66ac6910b/include/dg/analysis/NodesWalk.h#L294

Hello,

I have a question on the above line. Why does only the first node of a dependent bblock CD is enqueued for marking and slicing rather than all CD's nodes? All of the nodes are equally control dependent on n and n's bblock, aren't they?

Thanks for your great tool anyway! :)

Cheers, Rui

ruizhang2015 avatar Jan 04 '19 21:01 ruizhang2015

Hi,

it's a good question, I guess it's a bug (frankly, I do not remember why I wrote it like this, it's quite old code and I hope I will replace it soon :). However, it should have an effect only on forward slicing (or dependency analysis), backward slicing should work fine.

Do you feel like creating a PR? That would be great!

Thanks, Marek

mchalupa avatar Jan 05 '19 08:01 mchalupa

Thanks for the quick replay, Marek! I'll work on a PR soon. :)

ruizhang2015 avatar Jan 07 '19 01:01 ruizhang2015