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

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 11:09:41 PDT 2016


rnk added a comment.

Let's avoid the duplicate enum, otherwise looks good



> TargetBuiltins.h:100
> +  /// \brief X86-64 builtins
> +  namespace X86_64 {
> +  enum {

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
    };
    }

https://reviews.llvm.org/D24598





More information about the cfe-commits mailing list