[llvm-commits] [llvm] r151038 - /llvm/trunk/include/llvm/MC/MCRegisterInfo.h

Craig Topper craig.topper at gmail.com
Thu Feb 23 00:47:05 PST 2012


I've remove the conditional. What's the best way to figure out how the
remainder of the patch affects compile time?

On Wed, Feb 22, 2012 at 11:24 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Feb 20, 2012, at 10:22 PM, Craig Topper <craig.topper at gmail.com> wrote:
>
> > Author: ctopper
> > Date: Tue Feb 21 00:22:36 2012
> > New Revision: 151038
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=151038&view=rev
> > Log:
> > Merge some tables in generated RegisterInfo file. Store indices into
> larger table instead of pointers to reduce relocations and shrink table
> size on 64-bit builds. Shaves ~24K off X86MCTargetDesc.o
>
> These functions are extremely hot. How does this affect compile times?
>
> >   const unsigned *getAliasSet(unsigned RegNo) const {
> >     // The Overlaps set always begins with Reg itself.
> > -    return get(RegNo).Overlaps + 1;
> > +    if (get(RegNo).Overlaps < 0) return 0;
> > +    return Overlaps + get(RegNo).Overlaps + 1;
> >   }
>
> Please don't add conditional code to these functions. They should never
> return NULL anyway.
>
> It's probably easiest to give NOREG a dummy empty set.
>
> /jakob
>
>


-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120223/7ee37eee/attachment.html>


More information about the llvm-commits mailing list