[PATCH] D73674: Propeller: LLVM support for basic block sections (Base Patch - Part 2)

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 17:30:41 PST 2020


tmsriram added a comment.

In D73674#1877420 <https://reviews.llvm.org/D73674#1877420>, @tmsriram wrote:

> In D73674#1877341 <https://reviews.llvm.org/D73674#1877341>, @efriedma wrote:
>
> > In D73674#1877267 <https://reviews.llvm.org/D73674#1877267>, @tmsriram wrote:
> >
> > > In D73674#1868439 <https://reviews.llvm.org/D73674#1868439>, @efriedma wrote:
> > >
> > > > I'm afraid the way this patch is written, we're going to have to substantially rewrite it to port to other targets.  In particular, we're assigning blocks to sections in the asmprinter, which is way too late for targets that do branch relaxation as an MIR pass.
> > >
> > >
> > > Hi Eli, What do you suggest we do here? An MIR pass that assigns sections to basic blocks?
> >
> >
> > Yes, that would make sense.  Not completely sure where it should run, but we can adjust that later.  Maybe we want it to happen before MachineBlockPlacement, so we can do section-aware block placement?
>


Created a new pass, BBSectionsPrepare.cpp that does all the work of assigning sections to MBBs.  This removes all code from CodeGenPrepare.cpp and Function.h.

>> 
>> 
>>>> Is there some reason to emit "cold" and "exception" blocks into separate sections?  Not sure what benefit you get from separating them.
>>> 
>>> Sections containing hot blocks can be grouped together, function splitting of cold basic blocks and placing all the cold blocks together and away from the hot blocks gives us better iTLB utilization.
>> 
>> I meant, is there some reason to emit "cold" and "exception" sections separately from each other.  I understand the benefit of separating both of them from the hot blocks.
> 
> Apologies, I misread the original question.  Yes, in cases where exception blocks are hot, it does not help placing them along with cold blocks.  One of the SPEC benchmarks had a performance improvement doing this.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73674/new/

https://reviews.llvm.org/D73674





More information about the llvm-commits mailing list