Skip to content
  1. May 20, 2015
    • Renato Golin's avatar
      Get Triple::getARMCPUForArch() to use TargetParser · e8048f0d
      Renato Golin authored
      First ARMTargetParser FIXME, conservatively changing the way we parse CPUs
      in the back-end. Still not perfect, with a lot of special cases, but moving
      towards a more generic solution.
      
      Moving all logic to the target parser made some unwritten assumptions
      about architectures in Clang to break. I've added a lot of architectures
      required by Clang, and default to CPUs that Clang believes it should
      (and I agree).
      
      I've also added a lot of unit tests, with the correct CPU for each
      architecture, and Clang seems to be working correctly, too.
      
      It also became clear that using "unsigned ID" as the argument for the get
      methods makes it hard to know what ID, so I also changed the argument names
      to match the enum type names.
      
      llvm-svn: 237797
      e8048f0d
  2. May 12, 2015
  3. May 08, 2015
    • Renato Golin's avatar
      TargetParser: FPU/ARCH/EXT parsing refactory - NFC · f5f373fc
      Renato Golin authored
      This new class in a global context contain arch-specific knowledge in order
      to provide LLVM libraries, tools and projects with the ability to understand
      the architectures. For now, only FPU, ARCH and ARCH extensions on ARM are
      supported.
      
      Current behaviour it to parse from free-text to enum values and back, so that
      all users can share the same parser and codes. This simplifies a lot both the
      ASM/Obj streamers in the back-end (where this came from), and the front-end
      parsers for command line arguments (where this is going to be used next).
      
      The previous implementation, using .def/.h includes is deprecated due to its
      inflexibility to be built without the backend support and for being too
      cumbersome. As more architectures join this scheme, and as more features of
      such architectures are added (such as hardware features, type sizes, etc) into
      a full blown TargetDescription class, having a set of classes is the most
      sane implementation.
      
      The ultimate goal of this refactor both LLVM's and Clang's target description
      classes into one unique interface, so that we can de-duplicate and standardise
      the descriptions, as well as make it available for other front-ends, tools,
      etc.
      
      The FPU parsing for command line options in Clang has been converted to use
      this new library and a number of aliases were added for compatibility:
       * A bogus neon-vfpv3 alias (neon defaults to vfp3)
       * armv5/v6
       * {fp4/fp5}-{sp/dp}-d16
      
      Next steps:
       * Port Clang's ARCH/EXT parsing to use this library.
       * Create a TableGen back-end to generate this information.
       * Run this TableGen process regardless of which back-ends are built.
       * Expose more information and rename it to TargetDescription.
       * Continue re-factoring Clang to use as much of it as possible.
      
      llvm-svn: 236900
      f5f373fc
Loading