Discussion:
Should "can_create_pseudo_p" check "lra_in_progress"?
Andrew Stubbs
2018-10-05 13:04:32 UTC
Permalink
I just tracked down a "reload" bug and was very surprised to find that
can_create_pseudo_p doesn't return false during register allocation when
using LRA.

It's still defined like this:

#define can_create_pseudo_p() (!reload_in_progress && !reload_completed)

Is it deliberate that it doesn't check lra_in_progress?

Thanks

Andrew
Jeff Law
2018-10-05 17:19:49 UTC
Permalink
Post by Andrew Stubbs
I just tracked down a "reload" bug and was very surprised to find that
can_create_pseudo_p doesn't return false during register allocation when
using LRA.
#define can_create_pseudo_p() (!reload_in_progress && !reload_completed)
Is it deliberate that it doesn't check lra_in_progress?
I think its deliberate. IRA and I believe LRA can create pseudos while
they are running. Vlad would know for certain.

Jeff
Vladimir Makarov
2018-10-05 18:15:52 UTC
Permalink
Post by Jeff Law
Post by Andrew Stubbs
I just tracked down a "reload" bug and was very surprised to find that
can_create_pseudo_p doesn't return false during register allocation when
using LRA.
#define can_create_pseudo_p() (!reload_in_progress && !reload_completed)
Is it deliberate that it doesn't check lra_in_progress?
I think its deliberate. IRA and I believe LRA can create pseudos while
they are running. Vlad would know for certain.
Yes, Jeff is right.  LRA works differently from reload.  Reload keeps
all decisions and RTL transformations (which are done at the very end of
reload) in internal data structures and never create pseudos.  LRA
reflects its decisions and the transformations in RTL for this it
creates new RTL insns and pseudos during all its work.

Loading...