Skip to content
  1. Aug 07, 2013
  2. Aug 06, 2013
  3. Jul 27, 2013
  4. Jul 23, 2013
  5. Jul 22, 2013
    • 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
  6. 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
  7. Jul 09, 2013
  8. Jul 05, 2013
  9. Jun 18, 2013
  10. Jun 17, 2013
  11. Jun 13, 2013
  12. May 29, 2013
  13. May 23, 2013
  14. May 04, 2013
  15. 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
  16. Mar 30, 2013
  17. Mar 13, 2013
  18. 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
  19. Jan 15, 2013
  20. 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
  21. Jan 05, 2013
  22. 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
  23. Dec 11, 2012
  24. Dec 10, 2012
  25. Dec 08, 2012
    • Bill Wendling's avatar
      Add the `lto_codegen_set_export_dynamic' function. · 65a6ee11
      Bill Wendling authored
      This function sets the `_exportDynamic' ivar. When that's set, we export all
      symbols (e.g. we don't run the internalize pass). This is equivalent to the
      `--export-dynamic' linker flag in GNU land:
      
      --export-dynamic
        When creating a dynamically linked executable, add all symbols to the dynamic
        symbol table. The dynamic symbol table is the set of symbols which are visible
        from dynamic objects at run time. If you do not use this option, the dynamic
        symbol table will normally contain only those symbols which are referenced by
        some dynamic object mentioned in the link. If you use dlopen to load a dynamic
        object which needs to refer back to the symbols defined by the program, rather
        than some other dynamic object, then you will probably need to use this option
        when linking the program itself.
      
      The Darwin linker will support this via the `-export_dynamic' flag. We should
      modify clang to support this via the `-rdynamic' flag.
      
      llvm-svn: 169656
      65a6ee11
  26. Dec 04, 2012
    • Chandler Carruth's avatar
      Sort the #include lines for tools/... · 4d88a1c2
      Chandler Carruth authored
      Again, tools are trickier to pick the main module header for than
      library source files. I've started to follow the pattern of using
      LLVMContext.h when it is included as a stub for program source files.
      
      llvm-svn: 169252
      4d88a1c2
  27. Nov 29, 2012
  28. Nov 27, 2012
    • Owen Anderson's avatar
      Revert r168635 "Step towards implementation of pass manager with... · 1db12f51
      Owen Anderson authored
      Revert r168635 "Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model".
      It appears to have broken at least one buildbot.
      
      llvm-svn: 168654
      1db12f51
    • Owen Anderson's avatar
      Step towards implementation of pass manager with doInitialization and... · 336368c4
      Owen Anderson authored
      Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model
      
      Patch by Pedro Artigas, with feedback from by Chandler Carruth.
      
      llvm-svn: 168635
      336368c4
  29. Nov 15, 2012
  30. Oct 19, 2012
  31. Oct 18, 2012
    • Bob Wilson's avatar
      Temporarily revert the TargetTransform changes. · d6d9ccca
      Bob Wilson authored
      The TargetTransform changes are breaking LTO bootstraps of clang.  I am
      working with Nadav to figure out the problem, but I am reverting it for now
      to get our buildbots working.
      
      This reverts svn commits: 165665 165669 165670 165786 165787 165997
      and I have also reverted clang svn 165741
      
      llvm-svn: 166168
      d6d9ccca
  32. Oct 16, 2012
  33. Oct 12, 2012
  34. Oct 08, 2012
Loading