Skip to content
  1. Jul 22, 2013
    • Bill Wendling's avatar
      Recommit r186217 with testcase fix: · c02a0aab
      Bill Wendling authored
       Use the function attributes to pass along the stack protector buffer size.
      
       Now that we have robust function attributes, don't use a command line option to
       specify the stack protecto buffer size.
      
      llvm-svn: 186863
      c02a0aab
    • Shuxin Yang's avatar
      Initialize/Register LTO passes to enable flags like -print-after=<lto-pass> · 1e6d80e2
      Shuxin Yang authored
      There already have two "dead" functions, initialize{IPO|IPA}, defined for 
      similar purpose. I decide not to call these two functions for two reasons:
        o. they don't cover all LTO passes (which will soon be separated into IPO 
           and post-IPO passes)
        o. We have not yet figured out the right passes and the ordering for IPO 
           and post-IPO stages, meaning this change is only for the time being.
      
      Since LTO passes are registered, we are now able to print IR before and 
      after particular point.
      
      For OSX users:
      --------------
        "...-Wl,-mllvm -Wl,-print-after=<pass-name>" will print IR after the
        specified pass.
      
      For Other UNIX with GNU gold linker:
      ------------------------------------
        "-Wl,-plugin-opt=-print-after=<pass-name>" should work.
        (NOTE: no need for "-Wl,-mllvm")
      
        Strip "-Wl," if flags are fed directly to linker instead of clang/clang++.
      
      llvm-svn: 186853
      1e6d80e2
  2. Jul 16, 2013
    • Rafael Espindola's avatar
      Add a wrapper for open. · 6d35481c
      Rafael Espindola authored
      This centralizes the handling of O_BINARY and opens the way for hiding more
      differences (like how open behaves with directories).
      
      llvm-svn: 186447
      6d35481c
  3. Jul 13, 2013
  4. Jul 09, 2013
  5. Jul 05, 2013
  6. Jul 02, 2013
    • Rafael Espindola's avatar
      Remove address spaces from MC. · 64e1af8e
      Rafael Espindola authored
      This is dead code since PIC16 was removed in 2010. The result was an odd mix,
      where some parts would carefully pass it along and others would assert it was
      zero (most of the object streamer for example).
      
      llvm-svn: 185436
      64e1af8e
  7. Jun 18, 2013
  8. Jun 17, 2013
  9. Jun 13, 2013
  10. Jun 12, 2013
  11. Jun 11, 2013
  12. Jun 10, 2013
  13. Jun 04, 2013
  14. May 29, 2013
  15. May 25, 2013
  16. May 23, 2013
  17. May 04, 2013
  18. May 03, 2013
  19. May 02, 2013
  20. Apr 24, 2013
    • Rafael Espindola's avatar
      Don't produce an empty llvm.compiler.used in LTO. · cc111b2b
      Rafael Espindola authored
      LTO was always creating an empty llvm.compiler.used. With this patch we
      now first check if there is anything to be added first.
      
      Unfortunately, there is no good way to test libLTO in isolation as it needs gold
      or ld64, but there are bots doing LTO builds that found this problem.
      
      llvm-svn: 180202
      cc111b2b
  21. Apr 17, 2013
  22. Mar 30, 2013
  23. Mar 13, 2013
  24. Feb 28, 2013
    • Bill Wendling's avatar
      Add the -disable-opt option to LTO. This adds: · c7e0a044
      Bill Wendling authored
      - Consistency with opt (which supports the same option with the same meaning and
        description).
      - Debugging gold plugin-based linking without optimizations getting in the way.
      - Debugging programs linked with the gold plugin while preserving the original
        debug info.
      - Fine-grained control over LTO passes using the gold plugin in combination with
        opt (or clang/dragonegg).
      
      Patch by Cristiano Giuffrida!
      
      llvm-svn: 176257
      c7e0a044
  25. Feb 13, 2013
  26. Feb 01, 2013
  27. Jan 15, 2013
  28. Jan 14, 2013
    • Eli Bendersky's avatar
      Expose an InitToTextSection through MCStreamer. · cbb2514d
      Eli Bendersky authored
      The aim of this patch is to fix the following piece of code in the
      platform-independent AsmParser:
      
      void AsmParser::CheckForValidSection() {
        if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) {
          TokError("expected section directive before assembly directive");
          Out.SwitchSection(Ctx.getMachOSection(
                              "__TEXT", "__text",
                              MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
                              0, SectionKind::getText()));
        }
      }
      
      This was added for the "-n" option of llvm-mc.
      
      The proposed fix adds another virtual method to MCStreamer, called
      InitToTextSection. Conceptually, it's similar to the existing
      InitSections which initializes all common sections and switches to
      text. The new method is implemented by each platform streamer in a way
      that it sees fit. So AsmParser can now do this:
      
      void AsmParser::CheckForValidSection() {
        if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) {
          TokError("expected section directive before assembly directive");
          Out.InitToTextSection();
        }
      }
      
      Which is much more reasonable.
      
      llvm-svn: 172450
      cbb2514d
  29. Jan 07, 2013
    • Eli Bendersky's avatar
      Add the align_to_end option to .bundle_lock in the MC implementation of aligned · 802b6287
      Eli Bendersky authored
      bundling. The document describing this feature and the implementation has also
      been updated:
      
      https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm
      
      llvm-svn: 171797
      802b6287
    • 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
  30. Jan 05, 2013
  31. Jan 02, 2013
    • Chandler Carruth's avatar
      Move all of the header files which are involved in modelling the LLVM IR · 9fb823bb
      Chandler Carruth authored
      into their new header subdirectory: include/llvm/IR. This matches the
      directory structure of lib, and begins to correct a long standing point
      of file layout clutter in LLVM.
      
      There are still more header files to move here, but I wanted to handle
      them in separate commits to make tracking what files make sense at each
      layer easier.
      
      The only really questionable files here are the target intrinsic
      tablegen files. But that's a battle I'd rather not fight today.
      
      I've updated both CMake and Makefile build systems (I think, and my
      tests think, but I may have missed something).
      
      I've also re-sorted the includes throughout the project. I'll be
      committing updates to Clang, DragonEgg, and Polly momentarily.
      
      llvm-svn: 171366
      9fb823bb
    • Chandler Carruth's avatar
      b034cb77
Loading