This is the mail archive of the 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: Conflicting IRA patches

Jeff Law wrote:

So I'm sitting here looking at your patches and wondering how we're going to resolve the likely conflicts between these two hunks of work.

Yes, there will be a lot of conflicts with Bernd's patches and mine. Last week I worked a lot to resolve the conflicts with first committed Bernd's 6 patches after merging trunk into the branch.

The problem is that both patches are massive and do a lot of renaming.
As a trivial example, in Bernd's patch we want to create allocno objects and it uses the cover class to determine how many objects need to be created for a given allocno.

There is an allocno class on the branch now which is in some way an analog of cover class. For x86 example, allocno class can be A_REG or GENERAL_REGS or FLOAT_INT_REGS (or SSE_INT_REGS). After that, the branch defines what registers from allocno class can be used: we remove conflict hard regs and keep only profitable regs (it could transform GENERAL_REGS in bx,si,di if cloberred registers are not profitable). That registers actually define class used for coloring.
How is this supposed to work without cover classes?
Use the allocno class.
Let's look at a trivial issue: an allocno might fit into 2 GPRs, but take up only one FPR and the object can be profitably allocated to either kind of register. How many objects do we allocate for the allocno given that the number of objects will vary based on the final allocation?

In some cases for my purposes, I use the worst variant therefore I introduced ira_reg_class_{max,min}_nregs. We could use the same approch for now until we figure out a better solution.

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