[LLVMdev] Question regarding basic-block placement optimization
Chandler Carruth
chandlerc at google.com
Thu Oct 20 23:53:37 PDT 2011
On Thu, Oct 20, 2011 at 10:53 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:
>
> On Oct 20, 2011, at 9:56 AM, Chandler Carruth wrote:
>
> > A new patch is attached that is *much* less of a rough draft. Sorry for
> any confusion due to the early state of the patch.
>
> Thanks, Chandler. This is great stuff.
>
> > Still, I never intended this to be on-by-default at first. This is a
> starting point, that I hope can be improved into something that is
> on-by-default eventually, but I'll be the first to say it's almost certainly
> not ready for that just yet.
>
> I would like to see this go in ASAP under a flag. I prefer to see
> development as commits rather than a series of updated patches.
>
Awesome, same way I feel. Checked in as r142641. I've got some generic
cleanup I'll go ahead and commit to it over the next few days.
Also, let me know whether you'd prefer post-commit or pre-commit review for
various feature additions we've talked about here. I'm fine either way, so
its really what makes things easier on your end. I'll definitely want review
on all of it as some of this (especially the loop structure issues) is still
a bit new to me. =D
At least some of it (the loop alignment from CodePlacementOpt) is obvious
how to port across, but I'm sure there will be more tricky elements around
the loop structures.
Could you rename it to MachineBlockPlacement.cpp first, though? That makes
> it clear it's a CodeGen pass, and the BlockPlacement2 name is icky.
>
Yea, the 2 thing was only intended to work around a brief duplication with
the existing pass. MachineBlockPlacement solves both problems nicely.
> > I'm more hopeful that we can delete the existing block placement pass,
> and direct anyone interested in profile file guided stuff to write a simple
> pass to load profiles into metadata. I suspect this pass is already superior
> to that one.
>
> I also see it as a replacement for CodePlacementOpt.cpp, so I think your
> flag should run your pass instead of CodePlacementOpt rather than before or
> after it.
>
> You should simply clone the loop alignment stuff, it's pretty trivial.
Done, and in progress. SHould have the loop alignment stuff cloned right
away, and then i'll start looking at the loop structure issues. I'll
probably have some questions for you and/or andy about exactly how that
should work, whether CodePlacementOpt is doing the right thing, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111020/8708a06e/attachment.html>
More information about the llvm-dev
mailing list