[llvm] r307463 - [X86] Use 'unsigned' instead of 'unsigned int' for consistency in the X86 portion of Host.cpp.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 10:17:50 PDT 2017


I'd have expected across all of LLVM that 'unsigned int' was more common,
and to canonicalize in that direction rather than the other?

On Fri, Jul 7, 2017 at 10:16 PM Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: ctopper
> Date: Fri Jul  7 22:16:14 2017
> New Revision: 307463
>
> URL: http://llvm.org/viewvc/llvm-project?rev=307463&view=rev
> Log:
> [X86] Use 'unsigned' instead of 'unsigned int' for consistency in the X86
> portion of Host.cpp.
>
> Modified:
>     llvm/trunk/lib/Support/Host.cpp
>
> Modified: llvm/trunk/lib/Support/Host.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=307463&r1=307462&r2=307463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/Host.cpp (original)
> +++ llvm/trunk/lib/Support/Host.cpp Fri Jul  7 22:16:14 2017
> @@ -526,8 +526,8 @@ static void detectX86FamilyModel(unsigne
>  }
>
>  static void
> -getIntelProcessorTypeAndSubtype(unsigned int Family, unsigned int Model,
> -                                unsigned int Brand_id, unsigned int
> Features,
> +getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
> +                                unsigned Brand_id, unsigned Features,
>                                  unsigned *Type, unsigned *Subtype) {
>    if (Brand_id != 0)
>      return;
> @@ -827,9 +827,9 @@ getIntelProcessorTypeAndSubtype(unsigned
>    }
>  }
>
> -static void getAMDProcessorTypeAndSubtype(unsigned int Family,
> -                                          unsigned int Model,
> -                                          unsigned int Features,
> +static void getAMDProcessorTypeAndSubtype(unsigned Family,
> +                                          unsigned Model,
> +                                          unsigned Features,
>                                            unsigned *Type,
>                                            unsigned *Subtype) {
>    // FIXME: this poorly matches the generated SubtargetFeatureKV table.
> There
> @@ -956,10 +956,10 @@ static void getAMDProcessorTypeAndSubtyp
>    }
>  }
>
> -static unsigned getAvailableFeatures(unsigned int ECX, unsigned int EDX,
> +static unsigned getAvailableFeatures(unsigned ECX, unsigned EDX,
>                                       unsigned MaxLeaf) {
>    unsigned Features = 0;
> -  unsigned int EAX, EBX;
> +  unsigned EAX, EBX;
>    Features |= (((EDX >> 23) & 1) << FEATURE_MMX);
>    Features |= (((EDX >> 25) & 1) << FEATURE_SSE);
>    Features |= (((EDX >> 26) & 1) << FEATURE_SSE2);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/002a5568/attachment.html>


More information about the llvm-commits mailing list