Skip to content
  1. Aug 06, 2013
  2. Aug 05, 2013
  3. Aug 04, 2013
  4. 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
  5. Aug 01, 2013
  6. 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
  7. Jul 27, 2013
  8. Jul 25, 2013
  9. 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
    • Rafael Espindola's avatar
      Add an initial implementation of archive symbol table generation. · ce7f52db
      Rafael Espindola authored
      The symbol table has forward references in the file. Instead of allocating
      a temporary buffer or counting the size and then writing, this implementation
      writes a dummy value first and patches it once the final value is known.
      
      There is room for performance improvement. I will implement them as soon as I
      get some other features (like a ranlib mode) in.
      
      llvm-svn: 186934
      ce7f52db
    • Shuxin Yang's avatar
      remove unnecessary space · ca76085a
      Shuxin Yang authored
      llvm-svn: 186931
      ca76085a
  10. Jul 22, 2013
    • Bill Wendling's avatar
      Recommit r186217 with testcase fix: · c02a0aab
      Bill Wendling authored
       Use the function attributes to pass along the stack protector buffer size.
      
       Now that we have robust function attributes, don't use a command line option to
       specify the stack protecto buffer size.
      
      llvm-svn: 186863
      c02a0aab
    • Shuxin Yang's avatar
      Initialize/Register LTO passes to enable flags like -print-after=<lto-pass> · 1e6d80e2
      Shuxin Yang authored
      There already have two "dead" functions, initialize{IPO|IPA}, defined for 
      similar purpose. I decide not to call these two functions for two reasons:
        o. they don't cover all LTO passes (which will soon be separated into IPO 
           and post-IPO passes)
        o. We have not yet figured out the right passes and the ordering for IPO 
           and post-IPO stages, meaning this change is only for the time being.
      
      Since LTO passes are registered, we are now able to print IR before and 
      after particular point.
      
      For OSX users:
      --------------
        "...-Wl,-mllvm -Wl,-print-after=<pass-name>" will print IR after the
        specified pass.
      
      For Other UNIX with GNU gold linker:
      ------------------------------------
        "-Wl,-plugin-opt=-print-after=<pass-name>" should work.
        (NOTE: no need for "-Wl,-mllvm")
      
        Strip "-Wl," if flags are fed directly to linker instead of clang/clang++.
      
      llvm-svn: 186853
      1e6d80e2
    • Rafael Espindola's avatar
      Replace archive members in the old position. · 623c3d84
      Rafael Espindola authored
      This matches gnu archive behavior and since archive member order can change
      which member is used, not changing the order on replacement looks like the
      right thing to do.
      
      This patch also refactors the logic for which archive member to keep and
      whether to move it to a helper function (computeInsertAction). The
      nesting in computeNewArchiveMembers was getting a bit confusing.
      
      llvm-svn: 186829
      623c3d84
  11. Jul 21, 2013
  12. Jul 20, 2013
  13. Jul 19, 2013
    • Rafael Espindola's avatar
      Fix inserting new elements in a specified location. · fcc3a1a9
      Rafael Espindola authored
      We were only handling the 'a' and 'b' options during moves before.
      
      llvm-svn: 186721
      fcc3a1a9
    • Tim Northover's avatar
      Improve llvm-mc disassembler mode and refactor ARM tests to use it · 48cf6cc4
      Tim Northover authored
      This allows "llvm-mc -disassemble" to accept two new features:
        + Using comma as a byte separator
        + Grouping bytes with '[' and ']' pairs.
      
      The behaviour outside a [...] group is unchanged. But within the group once
      llvm-mc encounters a true error, it stops rather than trying to resynchronise
      the stream at the next byte. This is more useful for disassembly tests, where
      we have an almost-instruction in mind and don't care what the misaligned
      interpretation would be. Particularly if it means llvm-mc won't actually see
      the next intended almost-instruction.
      
      As a side effect, this means llvm-mc can disassemble its own -show-encoding
      output if copy-pasted.
      
      llvm-svn: 186661
      48cf6cc4
    • Rui Ueyama's avatar
      Revert "COFFDumper: Dump data directory entries." · f3882430
      Rui Ueyama authored
      Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623.
      
      llvm-svn: 186627
      f3882430
    • Rui Ueyama's avatar
      COFFDumper: Dump data directory entries. · a20b9f52
      Rui Ueyama authored
      Summary:
      Dump optional data directory entries in the PE/COFF header, so that
      we can test the output of LLD linker. This patch updates the test binary
      file, but the source of the binary is the same. I just re-linked the file.
      I don't know how the previous file was linked, but the previous file did
      not have any data directory entries for some reason.
      
      Reviewers: rafael
      
      CC: llvm-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1148
      
      llvm-svn: 186623
      a20b9f52
  14. Jul 17, 2013
  15. Jul 16, 2013
  16. Jul 13, 2013
Loading