This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ipa vrp implementation in gcc




On 19/01/16 04:10, Jan Hubicka wrote:
In general, given that we have existing VRP implementation I would suggest
first implementing the IPA propagation and profile estimation bits using
existing VRP pass and then try to compare the simple dominator based approach
with the VRP we have and see what are the compile time/code quality effects
of both. Based on that we can decide how complex VRP we really want.

It will be probably also more fun to implement it this way:)
I plan to collect some data on early VRP and firefox today or tomorrow.


Thanks. I started experimenting with it. Prototype patch is attached. I haven't tested it in any detailed way yet. This is just to understand the LTO and see how we can implement it.


I wanted to set the value range to parameter based on the ipa-vrp. For example:

extern void foo (int);

void bar (unsigned long l)
{
  foo(l == 0);
}

void bar2 (unsigned long l)
{
  foo(l & 0x2);
}


unsigned long x;

int main()
{
  x = 0;
  bar (x);
  x = 1;
  bar (x);
  x = 3;
  bar2 (x);
  x = 5;
  bar2 (x);
}


In the above case, I wanted value range of the ssa_name that gets initialized to [0,2]. As can be seen from the ipa-cp dump (attached), this is now happening. Any comments ? I also have some questions:


1.I think even if we are not going to use the tree-vrp for intra-procedural value range propagation, we can factor out some of the routines and share it. Any thoughts on this?


2. Is the DOM based intra-procedural prototype Richard Biener implemented available anywhere. Can you please point me to that.


Thanks,
Kugan


Attachment: t2.o.067i.cp
Description: Text document

Attachment: p.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]