Skip to content
  1. Oct 03, 2013
    • 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
  2. 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
  3. Sep 30, 2013
  4. Sep 25, 2013
  5. Sep 20, 2013
  6. Sep 19, 2013
  7. 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
  8. Aug 23, 2013
  9. Aug 17, 2013
  10. 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
  11. 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
  12. May 22, 2013
  13. May 21, 2013
  14. May 06, 2013
  15. 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
  16. 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
  17. Apr 25, 2013
  18. Apr 23, 2013
  19. Apr 18, 2013
  20. Apr 17, 2013
  21. 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
  22. Apr 11, 2013
  23. Apr 04, 2013
  24. Mar 10, 2013
  25. Feb 17, 2013
Loading