Skip to content
  1. Aug 28, 2013
    • Reid Kleckner's avatar
      Add xml files for msbuild integration · 8f4524a7
      Reid Kleckner authored
      These files are intended to live in the msbuild toolset directory, which
      is somewhere like:
      
      C:\Program Files (x86)\MSBuild\Microsoft.Cpp\
        v4.0\Platforms\Win32\PlatformToolsets\llvm
      
      More work is needed to install them as part of the NSIS installer.
      
      Patch by Warren Hunt!
      
      llvm-svn: 189411
      8f4524a7
  2. 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
    • Charles Davis's avatar
      Revert "Fix the build broken by r189315." and "Move everything depending on... · 1827bd8a
      Charles Davis authored
      Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h."
      
      This reverts commits r189319 and r189315. r189315 broke some tests on what I
      believe are big-endian platforms.
      
      llvm-svn: 189321
      1827bd8a
    • David Blaikie's avatar
      Fix the build broken by r189315. · ed80aa55
      David Blaikie authored
      (this triggered Clang's -Wsometimes-uninitialized on the default path
      through the switch)
      
      llvm-svn: 189319
      ed80aa55
    • Charles Davis's avatar
      0c6f71b4
    • 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
  3. Aug 26, 2013
  4. Aug 23, 2013
  5. Aug 21, 2013
    • Argyrios Kyrtzidis's avatar
      [CMake] Automatically pick up subdirectories in llvm/tools as 'external... · 7eec9d0c
      Argyrios Kyrtzidis authored
      [CMake] Automatically pick up subdirectories in llvm/tools as 'external projects' if they contain a 'CMakeLists.txt' file.
      
      Allow CMake to pick up external projects in llvm/tools without the need to modify the "llvm/tools/CMakeLists.txt" file.
      This makes it easier to work with projects that live in other repositories, without needing to specify each one in "llvm/tools/CMakeLists.txt".
      
      llvm-svn: 188921
      7eec9d0c
    • Ahmed Bougacha's avatar
      Add basic YAML MC CFG testcase. · d56f705d
      Ahmed Bougacha authored
      Drive-by llvm-objdump cleanup (don't hardcode ToolName).
      
      llvm-svn: 188904
      d56f705d
    • Ahmed Bougacha's avatar
      MC CFG: Add YAML MCModule representation to enable MC CFG testing. · 17926479
      Ahmed Bougacha authored
      Like yaml ObjectFiles, this will be very useful for testing the MC CFG
      implementation (mostly MCObjectDisassembler), by matching the output
      with YAML, and for potential users of the MC CFG, by using it as an input.
      
      There isn't much to the actual format, it is just a serialization of the
      MCModule class. Of note:
        - Basic block references (pred/succ, ..) are represented by the BB's
          start address.
        - Just as in the MC CFG, instructions are MCInsts with a size.
        - Operands have a prefix representing the type (only register and
          immediate supported here).
        - Instruction opcodes are represented by their names; enum values aren't
          stable, enum names mostly are: usually, a change to a name would need
          lots of changes in the backend anyway.
          Same with registers.
      
      All in all, an example is better than 1000 words, here goes:
      
      A simple binary:
      
        Disassembly of section __TEXT,__text:
        _main:
        100000f9c:      48 8b 46 08             movq    8(%rsi), %rax
        100000fa0:      0f be 00                movsbl  (%rax), %eax
        100000fa3:      3b 04 25 48 00 00 00    cmpl    72, %eax
        100000faa:      0f 8c 07 00 00 00       jl      7 <.Lend>
        100000fb0:      2b 04 25 48 00 00 00    subl    72, %eax
        .Lend:
        100000fb7:      c3                      ret
      
      And the (pretty verbose) generated YAML:
      
        ---
        Atoms:
          - StartAddress:    0x0000000100000F9C
            Size:            20
            Type:            Text
            Content:
              - Inst:            MOV64rm
                Size:            4
                Ops:             [ RRAX, RRSI, I1, R, I8, R ]
              - Inst:            MOVSX32rm8
                Size:            3
                Ops:             [ REAX, RRAX, I1, R, I0, R ]
              - Inst:            CMP32rm
                Size:            7
                Ops:             [ REAX, R, I1, R, I72, R ]
              - Inst:            JL_4
                Size:            6
                Ops:             [ I7 ]
          - StartAddress:    0x0000000100000FB0
            Size:            7
            Type:            Text
            Content:
              - Inst:            SUB32rm
                Size:            7
                Ops:             [ REAX, REAX, R, I1, R, I72, R ]
          - StartAddress:    0x0000000100000FB7
            Size:            1
            Type:            Text
            Content:
              - Inst:            RET
                Size:            1
                Ops:             [  ]
        Functions:
          - Name:            __text
            BasicBlocks:
              - Address:         0x0000000100000F9C
                Preds:           [  ]
                Succs:           [ 0x0000000100000FB7, 0x0000000100000FB0 ]
           <snip>
        ...
      
      llvm-svn: 188890
      17926479
    • NAKAMURA Takumi's avatar
      lli/RecordingMemoryManager.cpp: Make it complain if _GLOBAL_OFFSET_TABLE_ were not provided. · b46d3c89
      NAKAMURA Takumi authored
      FIXME: Would it be responsible to provide GOT?
      llvm-svn: 188855
      b46d3c89
  6. Aug 14, 2013
  7. Aug 13, 2013
  8. 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
    • Eric Christopher's avatar
      Fix warning about unused member. · d8da06e0
      Eric Christopher authored
      llvm-svn: 188200
      d8da06e0
    • 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
  9. Aug 09, 2013
  10. Aug 07, 2013
  11. Aug 06, 2013
  12. Aug 05, 2013
  13. Aug 04, 2013
  14. Aug 02, 2013
    • Hal Finkel's avatar
      Fix invalid function pointers in bugpoint ExtractLoops · e9efbf14
      Hal Finkel authored
      The ExtractLoops function tries to reduce the failing test case by extracting
      one or more loops from the misoptimized piece of the program. In doing this,
      ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
      that the pointers refer to functions in the current failing program.
      Unfortunately, this is not trivial because:
      
       - ExtractLoops is iterative, and there are several early exits (and the
         MiscompiledFunctions vector must be consistent with the current program at
      every non-fatal exit point).
       - Several of the utility functions used by ExtractLoops (such as
         TestOptimizer, some of which are called through the TestFn callback
      parameter, and Linker::LinkModules) delete their inputs upon success.
      
      This change adds several updates of the MiscompiledFunctions vector at
      different points. The first is after the initial call to TestMergedProgram
      which checks that the loop-extracted program still works. The second is after
      the call to TestFn (TestOptimizer, for example). This function will delete its
      inputs (which is why the existing ExtractLoops logic cloned the inputs first).
      
      llvm-svn: 187674
      e9efbf14
    • Eric Christopher's avatar
      Use @rpath for libraries rather than @executable_path on OSX. · 3b5ea517
      Eric Christopher authored
      Patch by Benjamin Scarlet!
      
      llvm-svn: 187641
      3b5ea517
  15. Aug 01, 2013
  16. Jul 29, 2013
    • Rafael Espindola's avatar
      Add support for the 's' operation to llvm-ar. · b6b5f52e
      Rafael Espindola authored
      If no other operation is specified, 's' becomes an operation instead of an
      modifier. The s operation just creates a symbol table. It is the same as
      running ranlib.
      
      We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
      if the symbol table is present, then it is current. We use that to optimize
      the most common case: a broken build system that thinks it has to run ranlib.
      
      llvm-svn: 187353
      b6b5f52e
  17. Jul 27, 2013
  18. Jul 25, 2013
  19. Jul 23, 2013
    • Rafael Espindola's avatar
      Split getOpenFile into getOpenFile and getOpenFileSlice. · 3d2ac2e4
      Rafael Espindola authored
      The main observation is that we never need both the filesize and the map size.
      When mapping a slice of a file, it doesn't make sense to request a null
      terminator and that would be the only case where the filesize would be used.
      
      There are other cleanups that should be done in this area:
      
      * A client should not have to pass the size (even an explicit -1) to say if
        it wants a null terminator or not, so we should probably swap the argument
        order.
      * The default should be to not require a null terminator. Very few clients
        require this, but many end up asking for it just because it is the default.
      
      llvm-svn: 186984
      3d2ac2e4
    • Rafael Espindola's avatar
      Fix use of the getOpenFile api. · bf1a9184
      Rafael Espindola authored
      The gold plugin was passing the desired map size as the file size. This was
      working for two reasons:
      * Recent version of gold provide the get_view callback, so this code was not
        used.
      * In older versions, getOpenFile was called, but the file size is never used
        if we don't require null terminated buffers and map size defaults to the
        file size.
      
      Thanks to Eli Bendersky for noticing this.
      
      I will try to make this api a bit less error prone.
      
      llvm-svn: 186978
      bf1a9184
    • Rafael Espindola's avatar
      Fix the build in c++03 mode. · 188bfd26
      Rafael Espindola authored
      llvm-svn: 186935
      188bfd26
Loading