[PATCH] Factor DataflowWorklist out of LiveVariables and UninitializedValues analyses

Artyom Skrobov Artyom.Skrobov at arm.com
Fri Apr 25 10:43:45 PDT 2014


> Are you sure this is correct? One worklist treats the entry block as
already analyzed, the other doesn't. One starts with no blocks enqueued, the
other effectively has all blocks enqueued because of the iterators.

 

Well, the patch keeps all tests passing.

How can we trigger the supposed difference in their behaviour?

 

Anyway, the version that "effectively has all blocks enqueued because of the
iterators" had

  worklist.enqueueSuccessors(&cfg.getEntry());

called immediately upon the creation.

What would be the point of enqueuing blocks onto a list that already has all
blocks enqueued?

 

> Why doesn't enqueueSuccessors use enqueueBlock?

 

Thanks for spotting that! Attaching the updated patch.

 

> Since this is only used by classes in the same component of Clang, it
might make sense to put even the header in the lib/ directory. That way it
doesn't show up when other people build tools on top of Clang. Then again,
it is a generally reusable component.

 

Yes, I think it is as generally reusable as PostOrderCFGView it builds upon
(which is, similarly, only used by classes in the same component).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140425/ac99adc2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DataflowWorklist.patch
Type: application/octet-stream
Size: 10702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140425/ac99adc2/attachment.obj>


More information about the cfe-commits mailing list