[cfe-dev] Dataflow analyses in Clang -- why do we not have GEN and KILL sets?

Kristóf Umann via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 16 10:14:30 PDT 2020


Hi!

I'm about to (or, by the time you're reading this already have) upload my
initial implementation of a reaching definitions algorithm. I wondered what
my immediate reaction to such a patch would be as a reviewer, and have
taken another look for similar dataflow related code in Clang for reference.

I found UninitializedVariable and Liveness as pretty much the only two in
the Analysis library. According to my admittedly limited research, both of
these can be expressed with the use of GEN and KILL sets, yet they don't
implement such a thing. Not only that, these algorithms in theory are
pretty much the same, yet their combined LOC is close to 2k.

Is there a strong reason behind them not implementing GEN and KILL sets?
Shouldn't we direct all the small little things they duplicate into such a
set calculator?

Cheers,
Husi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200316/2627c518/attachment.html>


More information about the cfe-dev mailing list