On Tue, Mar 06 2018, Bin Cheng wrote:
> On Tue, Mar 6, 2018 at 2:28 PM, Richard Biener
>> Do you think the situation happens often enough to make this worthwhile?
> There is one probably more useful case. Program may use global flags
> how it does (heavy) computation. Such flags are only set couple of
> times in execution
> time. It would be useful if we can (IPA) propagate flags into computation
> functions by versioning (if necessary). For example:
> int flag = 1;
> void foo ()
> //heavy computation wrto to flag
> void main()
> flag = 2;
> flag = 1;
So basically IPA-CP done on (not-addressable) static global variables.
Do you happen to know some real code which would benefit? I'd like to
experiment with it but would like to have a real thing to look at, as
opposed to artificial test cases.