Skip to content
  1. Aug 12, 2013
    • Shuxin Yang's avatar
      Revert r188188 and r188200. · 1826ae23
      Shuxin Yang authored
      In order to appease people (in Apple) who accuse me for committing "huge change" (?) without proper review. 
      
      Thank Eric for fixing a compile-warning. 
      
      llvm-svn: 188204
      1826ae23
    • Shuxin Yang's avatar
      Misc enhancements to LTO: · 76d082b5
      Shuxin Yang authored
        1. Add some helper classes for partitions. They are designed in a
           way such that the top-level LTO driver will not see much difference 
           with or without partitioning.
      
        2. Introduce work-dir. Now all intermediate files generated during 
           LTO phases will be saved under work-dir. User can specify the workdir
           via -lto-workdir=/path/to/dir. By default the work-dir will be 
           erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1.
      
          TODO: Erase the workdir, if the linker exit prematurely.  
            We are currently not able to remove directory on signal. The support 
            routines simply ignore directory.
      
        3. Add one new API lto_codegen_get_files_need_remove().
           Linker and LTO plugin will communicate via this API about which files
          (including directories) need to removed before linker exit.
      
      llvm-svn: 188188
      76d082b5
  2. May 24, 2013
    • Diego Novillo's avatar
      Add a new function attribute 'cold' to functions. · c6399539
      Diego Novillo authored
      Other than recognizing the attribute, the patch does little else.
      It changes the branch probability analyzer so that edges into
      blocks postdominated by a cold function are given low weight.
      
      Added analysis and code generation tests.  Added documentation for the
      new attribute.
      
      llvm-svn: 182638
      c6399539
  3. May 22, 2013
  4. May 21, 2013
  5. May 06, 2013
  6. May 02, 2013
    • Filip Pizlo's avatar
      This exposes more MCJIT options via the C API: · 85e0d273
      Filip Pizlo authored
      CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like.  Previously it was only possible to 
      create an MCJIT that used CodeModel::JITDefault.
      
      EnableFastISel: It's now possible to turn on the fast instruction selector.
      
      The CodeModel option required some trickery.  The problem is that previously, we were ensuring future binary compatibility in 
      the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the 
      bindings then bzero the remaining bits.  This works great but assumes that the bitwise zero equivalent of any field is a 
      sensible default value.
      
      But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model.  In both of those, the default 
      for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero.
      
      Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with
      defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp
      illustrates the change, as does the comment in ExecutionEngine.h.
      
      llvm-svn: 180893
      85e0d273
    • Filip Pizlo's avatar
      Rename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'. · c65a6d76
      Filip Pizlo authored
      This avoids namespace collisions with llvm::LLVMTargetMachine.
      
      llvm-svn: 180891
      c65a6d76
  7. Apr 29, 2013
    • Andrew Kaylor's avatar
      Exposing MCJIT through C API · 31be5eff
      Andrew Kaylor authored
      Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).
      
      Patch by Fili Pizlo
      
      llvm-svn: 180720
      31be5eff
  8. Apr 25, 2013
  9. Apr 23, 2013
  10. Apr 18, 2013
  11. Apr 17, 2013
  12. Apr 16, 2013
    • Hans Wennborg's avatar
      Add four new functions and one new enum to the C API: · 5ff71205
      Hans Wennborg authored
      LLVMGetThreadLocalMode - exposes GlobalVariable::getThreadLocalMode
      LLVMSetThreadLocalMode - exposes GlobalVariable::setThreadLocalMode
      LLVMIsExternallyInitialized - exposes GlobalVariable::isExternallyInitialized
      LLVMSetExternallyInitialized - exposes GlobalVariable::setExternallyInitialized
      LLVMThreadLocalMode - maps to GlobalVariable::ThreadLocalMode
      
      Patch by Moritz Maxeiner!
      
      llvm-svn: 179588
      5ff71205
  13. Apr 11, 2013
  14. Apr 04, 2013
  15. Mar 10, 2013
  16. Feb 17, 2013
  17. Feb 14, 2013
  18. Jan 28, 2013
  19. Jan 23, 2013
    • Bill Wendling's avatar
      Add the IR attribute 'sspstrong'. · d154e283
      Bill Wendling authored
      SSPStrong applies a heuristic to insert stack protectors in these situations:
      
      * A Protector is required for functions which contain an array, regardless of
        type or length.
      
      * A Protector is required for functions which contain a structure/union which
        contains an array, regardless of type or length.  Note, there is no limit to
        the depth of nesting.
      
      * A protector is required when the address of a local variable (i.e., stack
        based variable) is exposed. (E.g., such as through a local whose address is
        taken as part of the RHS of an assignment or a local whose address is taken as
        part of a function argument.)
      
      This patch implements the SSPString attribute to be equivalent to
      SSPRequired. This will change in a subsequent patch.
      
      llvm-svn: 173230
      d154e283
  20. Jan 10, 2013
  21. 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
  22. Dec 19, 2012
  23. Dec 10, 2012
    • Bill Wendling's avatar
      Revert r169656. · 4a8fc8f2
      Bill Wendling authored
      The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that
      should be kept around. The linker will pretend that a dylib is being created.
      <rdar://problem/12528059>
      
      llvm-svn: 169770
      4a8fc8f2
  24. 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
    • Jim Grosbach's avatar
      Add C API for specifying CPU to the disassembler. · 0ca9d5b7
      Jim Grosbach authored
      It was a nasty oversight that we didn't include this when we added this
      API in the first place. Blech.
      
      rdar://12839439
      
      llvm-svn: 169653
      0ca9d5b7
  25. Dec 05, 2012
    • Kevin Enderby's avatar
      Added a option to the disassembler to print immediates as hex. · 168ffb36
      Kevin Enderby authored
      This is for the lldb team so most of but not all of the values are
      to be printed as hex with this option.  Some small values like the
      scale in an X86 address were requested to printed in decimal
      without the leading 0x.
      
      There may be some tweaks need to places that may still be in
      decimal that they want in hex.  Specially for arm.  I made my best
      guess.  Any tweaks from here should be simple.
      
      I also did the best I know now with help from the C++ gurus
      creating the cleanest formatImm() utility function and containing
      the changes.  But if someone has a better idea to make something
      cleaner I'm all ears and game for changing the implementation.
      
      rdar://8109283
      
      llvm-svn: 169393
      168ffb36
  26. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  27. Nov 24, 2012
    • Benjamin Kramer's avatar
      libLTO: Add a utility method to initialize the disassemblers. · 9bcb9226
      Benjamin Kramer authored
      Necessary to give disassembler users (like darwin's otool) a possibility to
      dlopen libLTO and still initialize the required LLVM bits. This used to go
      through libMCDisassembler but that's a gross layering violation, the MC layer
      can't pull in functions from the targets. Adding a function to libLTO is a bit
      of a hack but not worse than exposing other disassembler bits from libLTO.
      
      Fixes PR14362.
      
      llvm-svn: 168545
      9bcb9226
Loading