Skip to content
  1. Aug 06, 2013
  2. Apr 25, 2013
  3. Jan 08, 2013
    • Preston Gurd's avatar
      Pad Short Functions for Intel Atom · a01daace
      Preston Gurd authored
      The current Intel Atom microarchitecture has a feature whereby
      when a function returns early then it is slightly faster to execute
      a sequence of NOP instructions to wait until the return address is ready,
      as opposed to simply stalling on the ret instruction until
      the return address is ready.
      
      When compiling for X86 Atom only, this patch will run a pass,
      called "X86PadShortFunction" which will add NOP instructions where less
      than four cycles elapse between function entry and return.
      
      It includes tests.
      
      This patch has been updated to address Nadav's review comments
      - Optimize only at >= O1 and don't do optimization if -Os is set
      - Stores MachineBasicBlock* instead of BBNum
      - Uses DenseMap instead of std::map
      - Fixes placement of braces
      
      Patch by Andy Zhang.
      
      llvm-svn: 171879
      a01daace
  4. Jan 07, 2013
    • Chandler Carruth's avatar
      Switch TargetTransformInfo from an immutable analysis pass that requires · 664e354d
      Chandler Carruth authored
      a TargetMachine to construct (and thus isn't always available), to an
      analysis group that supports layered implementations much like
      AliasAnalysis does. This is a pretty massive change, with a few parts
      that I was unable to easily separate (sorry), so I'll walk through it.
      
      The first step of this conversion was to make TargetTransformInfo an
      analysis group, and to sink the nonce implementations in
      ScalarTargetTransformInfo and VectorTargetTranformInfo into
      a NoTargetTransformInfo pass. This allows other passes to add a hard
      requirement on TTI, and assume they will always get at least on
      implementation.
      
      The TargetTransformInfo analysis group leverages the delegation chaining
      trick that AliasAnalysis uses, where the base class for the analysis
      group delegates to the previous analysis *pass*, allowing all but tho
      NoFoo analysis passes to only implement the parts of the interfaces they
      support. It also introduces a new trick where each pass in the group
      retains a pointer to the top-most pass that has been initialized. This
      allows passes to implement one API in terms of another API and benefit
      when some other pass above them in the stack has more precise results
      for the second API.
      
      The second step of this conversion is to create a pass that implements
      the TargetTransformInfo analysis using the target-independent
      abstractions in the code generator. This replaces the
      ScalarTargetTransformImpl and VectorTargetTransformImpl classes in
      lib/Target with a single pass in lib/CodeGen called
      BasicTargetTransformInfo. This class actually provides most of the TTI
      functionality, basing it upon the TargetLowering abstraction and other
      information in the target independent code generator.
      
      The third step of the conversion adds support to all TargetMachines to
      register custom analysis passes. This allows building those passes with
      access to TargetLowering or other target-specific classes, and it also
      allows each target to customize the set of analysis passes desired in
      the pass manager. The baseline LLVMTargetMachine implements this
      interface to add the BasicTTI pass to the pass manager, and all of the
      tools that want to support target-aware TTI passes call this routine on
      whatever target machine they end up with to add the appropriate passes.
      
      The fourth step of the conversion created target-specific TTI analysis
      passes for the X86 and ARM backends. These passes contain the custom
      logic that was previously in their extensions of the
      ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces.
      I separated them into their own file, as now all of the interface bits
      are private and they just expose a function to create the pass itself.
      Then I extended these target machines to set up a custom set of analysis
      passes, first adding BasicTTI as a fallback, and then adding their
      customized TTI implementations.
      
      The fourth step required logic that was shared between the target
      independent layer and the specific targets to move to a different
      interface, as they no longer derive from each other. As a consequence,
      a helper functions were added to TargetLowering representing the common
      logic needed both in the target implementation and the codegen
      implementation of the TTI pass. While technically this is the only
      change that could have been committed separately, it would have been
      a nightmare to extract.
      
      The final step of the conversion was just to delete all the old
      boilerplate. This got rid of the ScalarTargetTransformInfo and
      VectorTargetTransformInfo classes, all of the support in all of the
      targets for producing instances of them, and all of the support in the
      tools for manually constructing a pass based around them.
      
      Now that TTI is a relatively normal analysis group, two things become
      straightforward. First, we can sink it into lib/Analysis which is a more
      natural layer for it to live. Second, clients of this interface can
      depend on it *always* being available which will simplify their code and
      behavior. These (and other) simplifications will follow in subsequent
      commits, this one is clearly big enough.
      
      Finally, I'm very aware that much of the comments and documentation
      needs to be updated. As soon as I had this working, and plausibly well
      commented, I wanted to get it committed and in front of the build bots.
      I'll be doing a few passes over documentation later if it sticks.
      
      Commits to update DragonEgg and Clang will be made presently.
      
      llvm-svn: 171681
      664e354d
  5. Jan 05, 2013
    • Nadav Rotem's avatar
      Revert revision 171524. Original message: · 478b6a47
      Nadav Rotem authored
      URL: http://llvm.org/viewvc/llvm-project?rev=171524&view=rev
      Log:
      The current Intel Atom microarchitecture has a feature whereby when a function
      returns early then it is slightly faster to execute a sequence of NOP
      instructions to wait until the return address is ready,
      as opposed to simply stalling on the ret instruction
      until the return address is ready.
      
      When compiling for X86 Atom only, this patch will run a pass, called
      "X86PadShortFunction" which will add NOP instructions where less than four
      cycles elapse between function entry and return.
      
      It includes tests.
      
      Patch by Andy Zhang.
      
      llvm-svn: 171603
      478b6a47
  6. Jan 04, 2013
    • Preston Gurd's avatar
      The current Intel Atom microarchitecture has a feature whereby when a function · e36b685a
      Preston Gurd authored
      returns early then it is slightly faster to execute a sequence of NOP
      instructions to wait until the return address is ready,
      as opposed to simply stalling on the ret instruction
      until the return address is ready.
      
      When compiling for X86 Atom only, this patch will run a pass, called
      "X86PadShortFunction" which will add NOP instructions where less than four
      cycles elapse between function entry and return.
      
      It includes tests.
      
      Patch by Andy Zhang.
      
      llvm-svn: 171524
      e36b685a
  7. Dec 19, 2012
  8. Oct 28, 2012
  9. Jun 24, 2012
  10. Dec 20, 2011
  11. Nov 29, 2011
  12. Nov 12, 2011
  13. Nov 04, 2011
  14. Oct 06, 2011
  15. Sep 28, 2011
  16. Aug 23, 2011
    • Bruno Cardoso Lopes's avatar
      Introduce a pass to insert vzeroupper instructions to avoid AVX to · 2a3ffb5d
      Bruno Cardoso Lopes authored
      SSE transition penalty. The pass is enabled through the "x86-use-vzeroupper"
      llc command line option. This is only the first step (very naive and
      conservative one) to sketch out the idea, but proper DFA is coming next
      to allow smarter decisions. Comments and ideas now and in further commits
      will be very appreciated.
      
      llvm-svn: 138317
      2a3ffb5d
  17. Jul 29, 2011
    • Chandler Carruth's avatar
      Rewrite the CMake build to use explicit dependencies between libraries, · 9d7feab3
      Chandler Carruth authored
      specified in the same file that the library itself is created. This is
      more idiomatic for CMake builds, and also allows us to correctly specify
      dependencies that are missed due to bugs in the GenLibDeps perl script,
      or change from compiler to compiler. On Linux, this returns CMake to
      a place where it can relably rebuild several targets of LLVM.
      
      I have tried not to change the dependencies from the ones in the current
      auto-generated file. The only places I've really diverged are in places
      where I was seeing link failures, and added a dependency. The goal of
      this patch is not to start changing the dependencies, merely to move
      them into the correct location, and an explicit form that we can control
      and change when necessary.
      
      This also removes a serialization point in the build because we don't
      have to scan all the libraries before we begin building various tools.
      We no longer have a step of the build that regenerates a file inside the
      source tree. A few other associated cleanups fall out of this.
      
      This isn't really finished yet though. After talking to dgregor he urged
      switching to a single CMake macro to construct libraries with both
      sources and dependencies in the arguments. Migrating from the two macros
      to that style will be a follow-up patch.
      
      Also, llvm-config is still generated with GenLibDeps.pl, which means it
      still has slightly buggy dependencies. The internal CMake
      'llvm-config-like' macro uses the correct explicitly specified
      dependencies however. A future patch will switch llvm-config generation
      (when using CMake) to be based on these deps as well.
      
      This may well break Windows. I'm getting a machine set up now to dig
      into any failures there. If anyone can chime in with problems they see
      or ideas of how to solve them for Windows, much appreciated.
      
      llvm-svn: 136433
      9d7feab3
  18. Jul 26, 2011
    • Chandler Carruth's avatar
      Clean up a pile of hacks in our CMake build relating to TableGen. · 97c069c1
      Chandler Carruth authored
      The first problem to fix is to stop creating synthetic *Table_gen
      targets next to all of the LLVM libraries. These had no real effect as
      CMake specifies that add_custom_command(OUTPUT ...) directives (what the
      'tablegen(...)' stuff expands to) are implicitly added as dependencies
      to all the rules in that CMakeLists.txt.
      
      These synthetic rules started to cause problems as we started more and
      more heavily using tablegen files from *subdirectories* of the one where
      they were generated. Within those directories, the set of tablegen
      outputs was still available and so these synthetic rules added them as
      dependencies of those subdirectories. However, they were no longer
      properly associated with the custom command to generate them. Most of
      the time this "just worked" because something would get to the parent
      directory first, and run tablegen there. Once run, the files existed and
      the build proceeded happily. However, as more and more subdirectories
      have started using this, the probability of this failing to happen has
      increased. Recently with the MC refactorings, it became quite common for
      me when touching a large enough number of targets.
      
      To add insult to injury, several of the backends *tried* to fix this by
      adding explicit dependencies back to the parent directory's tablegen
      rules, but those dependencies didn't work as expected -- they weren't
      forming a linear chain, they were adding another thread in the race.
      
      This patch removes these synthetic rules completely, and adds a much
      simpler function to declare explicitly that a collection of tablegen'ed
      files are referenced by other libraries. From that, we can add explicit
      dependencies from the smaller libraries (such as every architectures
      Desc library) on this and correctly form a linear sequence. All of the
      backends are updated to use it, sometimes replacing the existing attempt
      at adding a dependency, sometimes adding a previously missing dependency
      edge.
      
      Please let me know if this causes any problems, but it fixes a rather
      persistent and problematic source of build flakiness on our end.
      
      llvm-svn: 136023
      97c069c1
  19. Jul 25, 2011
  20. Jul 15, 2011
    • Chandler Carruth's avatar
      Major update to CMake build to reflect changes in r135219 in the · 9a0001ae
      Chandler Carruth authored
      backend. Moved some MCAsmInfo files down into the MCTargetDesc
      sublibraries, removed some (i suspect long) dead files from other parts
      of the CMake build, etc. Also copied the include directory hack from the
      Makefile.
      
      Finally, updated the lib deps. I spot checked this, and think its
      correct, but review appreciated there.
      
      llvm-svn: 135234
      9a0001ae
  21. Jul 02, 2011
  22. Jun 28, 2011
  23. Jun 27, 2011
  24. Jun 25, 2011
  25. Jun 24, 2011
    • Evan Cheng's avatar
      Starting to refactor Target to separate out code that's needed to fully describe · 24753317
      Evan Cheng authored
      target machine from those that are only needed by codegen. The goal is to
      sink the essential target description into MC layer so we can start building
      MC based tools without needing to link in the entire codegen.
      
      First step is to refactor TargetRegisterInfo. This patch added a base class
      MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
      separate register description from the rest of the stuff.
      
      llvm-svn: 133782
      24753317
  26. Feb 20, 2011
  27. Jan 10, 2011
  28. Jan 02, 2011
  29. Dec 31, 2010
  30. Dec 20, 2010
  31. Nov 16, 2010
  32. Nov 15, 2010
  33. Sep 14, 2010
  34. Sep 10, 2010
  35. Aug 09, 2010
    • Oscar Fuentes's avatar
      CMake: eliminated unnecessary target_link_libraries. · 212cfde6
      Oscar Fuentes authored
      Next time the build is broken due to wrong library dependencies, just
      try building again (if you are on some Unix and are building all LLVM
      targets) or ask someone to commit the regenerated LLVMLibDeps.cmake.
      
      llvm-svn: 110593
      212cfde6
  36. Jul 22, 2010
  37. Jul 20, 2010
  38. Jul 16, 2010
  39. May 13, 2010
  40. Apr 17, 2010
Loading