[PATCH] D24598: Separate builtins for x84-64 and i386; implement __mulh and __umulh

Albert Gutowski via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 11:45:40 PDT 2016


agutowski added inline comments.


> rnk wrote in TargetBuiltins.h:100
> I think this would be better with just one enum to reduce compilation time:
> 
>     /// \brief X86 builtins
>     namespace X86 {
>     enum {
>       LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
>   #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
>   #include "clang/Basic/BuiltinsX86.def"
>       FirstX86_64Builtin,
>       LastX86CommonBuiltin = FirstX86_64Builtin - 1,
>   #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
>   #include "clang/Basic/BuiltinsX86_64.def"
>       LastTSBuiltin
>     };
>     }

Nice, thanks!
As far as I see, it creates some inconsistency in usage of the word "last", because it's used wrong everywhere else - LastTSBuiltin is the number of the last target-specific builtin **plus one**, while LastX86CommonBuiltin doesn't have this additional one. I would leave it like that, but wanted to point that out, in case you think it's not acceptable.

https://reviews.llvm.org/D24598





More information about the cfe-commits mailing list