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: An unusual Performance approach using Synthetic registers



       > Otherwise, what you lose for locals/args (the dominant case) will
       > probably exceed what you gain for other values.

       Actually I think you will break even most of the time and
       generate essentially identical code.


Won't you still get stupid sequences such as a maybe-aliased local
being loaded repeatedly into a synthreg in a loop?

If it weren't for problems like that then, yeah, sure, have a huge
number of potential synthregs, almost never spill, and get code that
looks just like usual -- except that it caches some values that are
stored in memory on the stack (pretty much the goal).

But no, if you just "trick" the reg allocator by raising the number of
apparent registers, it'll do stupid things like pointlessly moving a
local to a synthreg before operating on it.

So, the decision about what non-local, non-arg, non-intermediate
values to put in synthregs -- that _is_ isomorphic to the register
allocation problem -- but before tricking the register allocator into
that, the register allocator would have to recognize that real
registers are cheaper than everthing and that synthregs are equal to
local/args/intermediates -- so that's presumably a generalization of
graph coloring.


-t


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