Skip to content
  1. Oct 23, 2013
  2. Oct 22, 2013
  3. Oct 17, 2013
    • Anders Waldenborg's avatar
      llvm-c: Add LLVMIntPtrType{,ForAS}InContext · 959f0407
      Anders Waldenborg authored
      All of the Core API functions have versions which accept explicit context, in
      addition to ones which work on global context. This commit adds functions
      which accept explicit context to the Target API for consistency.
      
      Patch by Peter Zotov
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1912
      
      llvm-svn: 192913
      959f0407
    • Filip Pizlo's avatar
      Expose install_fatal_error_handler() through the C API. · a535b141
      Filip Pizlo authored
      I expose the API with some caveats:
      
      - The C++ API involves a traditional void* opaque pointer for the fatal 
      error callback.  The C API doesn’t do this.  I don’t think that the void* 
      opaque pointer makes any sense since this is a global callback - there will 
      only be one of them.  So if you need to pass some data to your callback, 
      just put it in a global variable.
      
      - The bindings will ignore the gen_crash_diag boolean.  I ignore it because 
      (1) I don’t know what it does, (2) it’s not documented AFAIK, and (3) I 
      couldn’t imagine any use for it.  I made the gut call that it probably 
      wasn’t important enough to expose through the C API.
      
      llvm-svn: 192864
      a535b141
  4. Oct 16, 2013
  5. Oct 15, 2013
  6. Oct 10, 2013
  7. Oct 09, 2013
  8. Oct 03, 2013
    • Rafael Espindola's avatar
      Optimize linkonce_odr unnamed_addr functions during LTO. · cda2911c
      Rafael Espindola authored
      Generalize the API so we can distinguish symbols that are needed just for a DSO
      symbol table from those that are used from some native .o.
      
      The symbols that are only wanted for the dso symbol table can be dropped if
      llvm can prove every other dso has a copy (linkonce_odr) and the address is not
      important (unnamed_addr).
      
      llvm-svn: 191922
      cda2911c
    • Quentin Colombet's avatar
      [llvm-c][Disassembler] Add an option to print latency information in · 5f09cb0d
      Quentin Colombet authored
      disassembled output alongside the instructions.
      E.g., on a vector shuffle operation with a memory operand, disassembled
      outputs are:
      * Without the option:
          vpshufd $-0x79, (%rsp), %xmm0
          
      * With the option:
          vpshufd $-0x79, (%rsp), %xmm0   ## Latency: 5
      
      The printed latency is extracted from the schedule model available in the
      disassembler context. Thus, this option has no effect if there is not a
      scheduling model for the target.
      This boils down to one may need to specify the CPU string, so that this
      option could have an effect.
      
      Note: Latency < 2 are not printed.
      
      This part of <rdar://problem/14687488>.
      
      llvm-svn: 191859
      5f09cb0d
  9. Oct 02, 2013
    • Filip Pizlo's avatar
      This threads SectionName through the allocateCodeSection/allocateDataSection... · 7aa695e0
      Filip Pizlo authored
      This threads SectionName through the allocateCodeSection/allocateDataSection APIs, both in C++ and C land.  
      It's useful for the memory managers that are allocating a section to know what the name of the section is.  
      At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what 
      memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about 
      what each allocation is for.  This allows clients that supply their own memory managers to do this.  
      Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM 
      client.
      
      This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM.  I'm assuming that 
      it's safe to change the C++ API because that API is allowed to change.  I'm assuming that it's safe to change 
      the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory 
      management C API).
      
      llvm-svn: 191804
      7aa695e0
    • Quentin Colombet's avatar
      [llvm-c][Disassembler] Add an option to reproduce in disassembled output the · 93a98aac
      Quentin Colombet authored
      comments issued with verbose assembly.
      E.g., on a vector shuffle operation, disassembled output are:
      * Without the option:
      vpshufd $-0x79, (%rsp), %xmm0
      
      * With the option:
      vpshufd $-0x79, (%rsp), %xmm0   ## xmm0 = mem[3,1,0,2]
      
      This part of <rdar://problem/14687488>.
      
      llvm-svn: 191799
      93a98aac
  10. Sep 30, 2013
  11. Sep 25, 2013
  12. Sep 20, 2013
  13. Sep 19, 2013
  14. 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
  15. Aug 23, 2013
  16. Aug 17, 2013
  17. 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
  18. 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
  19. May 22, 2013
  20. May 21, 2013
  21. May 06, 2013
  22. 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
  23. 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
  24. Apr 25, 2013
Loading