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

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Feb 22 11:24:34 PST 2012


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




More information about the llvm-commits mailing list