A question on data flow analysis in clang

Hello all,

I wanted to know that - the data flow analysis which is implemented in Clang (include/clang/Analysis) - is incremental analysis or it re-solves the equations at every CFG node?

I will look into the source code, but, meanwhile, I thought of quickly getting “yes/no” answer before I spend time with source code.

Hi Mahesha,

To answer your question, I need to understand what you mean by "incremental". That term implies that there can be changes in the analysis results, somehow, when running the analysis multiple times. If you provided a bit of context, I could more precisely answer your question.

Operationally, analyses are typically implemented using a work list algorithm, which computes data flow values until a fix point is reached. This is a kind of incremental analysis, but I'm not certain if this is what you meant by "incremental."

Ted

Missed to cc my below reply (to Ted) into clang-dev list.

Clang’s AST is immutable so there isn’t a need for this kind of incremental computation.

Thanks Sean. That’s exactly right.