[LLVMdev] [PATCH] Spill Comments
dag at cray.com
Mon Sep 14 10:32:10 PDT 2009
On Monday 14 September 2009 12:22, Dan Gohman wrote:
> Hi Dave,
> On Sep 11, 2009, at 3:31 PM, David Greene wrote:
> > Attached is a patch to print asm comments for spill information.
> > We've discussed the mechanisms before but I wanted to run the
> > patch by everyone before I start to commit pieces.
> The Offset->FrameIndex mapping seems rather heavy-weight, as
> any expense is incurred even when AsmVerbose is off. Would it
> be possible to use MachineMemOperands instead? In theory,
> they should already be preserving the needed information. If
> they're not sufficient, could they be improved?
Yeah, I'm not totally happy with that mapping either. With
MachineMemOperands, would that be the getOffset() method? That's
only for FPRel data, though. What if frame pointer elimination has
I would love to get out from under the map if possible.
> There is work going on to improve the register allocator's ability
> to use rematerlialization. In a world where the register allocator
> can aggressively remat misc. loads, will it still be interesting to
> identify spill reloads?
Yes. I have a later patch that marks remats as well. The idea is to get a
sense of how well regalloc is doing. And you can't remat everything.
> You mentioned at one point that you have some scripts which
> know how to read some of these comments. Would it be
> possible for you to include these scripts with the patch so that
> others can consider your patch in context?
I'm not sure. The script counts a whole bunch of things. All it does is
look for these commentsw and tally up statistics, what's in loops, etc.
It's pretty straightforward.
More information about the llvm-dev