Skip to content
  1. Sep 25, 2013
  2. Sep 20, 2013
  3. Sep 19, 2013
  4. Aug 27, 2013
    • Shuxin Yang's avatar
      Revert 189297, the original commit message is following. · 388b52c0
      Shuxin Yang authored
      ----
        Add new API lto_codegen_compile_parallel().
      
        This API is proposed by Nick Kledzik. The semantic is:
      
        --------------------------------------------------------------------------
         Generate code for merged module into an array of native object files. On 
         success returns a pointer to an array of NativeObjectFile.  The count 
         parameter returns the number of elements in the array.  Each element is 
         a pointer/length for a generated mach-o/ELF buffer.  The buffer is owned
         by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, 
         or lto_codegen_compile() is called again. On failure, returns NULL 
         (check lto_get_error_message() for details).
      
         extern const struct  NativeObjectFile*
         lto_codegen_compile_parallel(lto_code_gen_t cg, size_t *count);
        ---------------------------------------------------------------------------
      
        This API is currently only called on OSX platform. Linux or other Unixes
      using GNU gold are not supposed to call this function, because on these systems, 
      object files are fed back to linker via disk file instead of memory buffer.
      
        In this commit, lto_codegen_compile_parallel() simply calls
      lto_codegen_compile() to return a single object file. In the near future,
      this function is the entry point for compilation with partition. Linker can
      blindly call this function even if partition is turned off; in this case,
      compiler will return only one object file.
      
      llvm-svn: 189386
      388b52c0
    • Shuxin Yang's avatar
      Add new API lto_codegen_compile_parallel(). · a44362e4
      Shuxin Yang authored
        This API is proposed by Nick Kledzik. The semantic is:
      
        --------------------------------------------------------------------------
         Generate code for merged module into an array of native object files. On 
         success returns a pointer to an array of NativeObjectFile.  The count 
         parameter returns the number of elements in the array.  Each element is 
         a pointer/length for a generated mach-o/ELF buffer.  The buffer is owned
         by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, 
         or lto_codegen_compile() is called again. On failure, returns NULL 
         (check lto_get_error_message() for details).
      
         extern const struct  NativeObjectFile*
         lto_codegen_compile_parallel(lto_code_gen_t cg, size_t *count);
        ---------------------------------------------------------------------------
      
        This API is currently only called on OSX platform. Linux or other Unixes
      using GNU gold are not supposed to call this function, because on these systems, 
      object files are fed back to linker via disk file instead of memory buffer.
      
        In this commit, lto_codegen_compile_parallel() simply calls
      lto_codegen_compile() to return a single object file. In the near future,
      this function is the entry point for compilation with partition. Linker can
      blindly call this function even if partition is turned off; in this case,
      compiler will return only one object file.
      
      llvm-svn: 189297
      a44362e4
  5. Aug 23, 2013
  6. Aug 17, 2013
  7. 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
  8. 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
  9. May 22, 2013
  10. May 21, 2013
  11. May 06, 2013
  12. 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
  13. 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
  14. Apr 25, 2013
  15. Apr 23, 2013
  16. Apr 18, 2013
  17. Apr 17, 2013
  18. 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
  19. Apr 11, 2013
  20. Apr 04, 2013
  21. Mar 10, 2013
  22. Feb 17, 2013
  23. Feb 14, 2013
  24. Jan 28, 2013
  25. 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
  26. Jan 10, 2013
Loading