Skip to content
  1. Apr 06, 2017
    • Mehdi Amini's avatar
      Turn some C-style vararg into variadic templates · 579540a8
      Mehdi Amini authored
      Module::getOrInsertFunction is using C-style vararg instead of
      variadic templates.
      
      From a user prospective, it forces the use of an annoying nullptr
      to mark the end of the vararg, and there's not type checking on the
      arguments. The variadic template is an obvious solution to both
      issues.
      
      Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>
      
      Differential Revision: https://reviews.llvm.org/D31070
      
      llvm-svn: 299699
      579540a8
    • Bryant Wong's avatar
      [Bugpoint] Use `unique_ptr` correctly. · 77b14505
      Bryant Wong authored
      Moving Modules into `testMergedProgram` is incorrect (and causes segmentation
      faults) since all callers expect to retain ownership. This is evidenced by the
      later calls to `unique_ptr<Module>::get` in the same function.
      
      Differential Revision: https://reviews.llvm.org/D31727
      
      llvm-svn: 299596
      77b14505
  2. Apr 05, 2017
  3. Apr 04, 2017
    • Reid Kleckner's avatar
      [PDB] Save one type record copy · 13fc411e
      Reid Kleckner authored
      Summary:
      The TypeTableBuilder provides stable storage for type records. We don't
      need to copy all of the bytes into a flat vector before adding it to the
      TpiStreamBuilder.
      
      This makes addTypeRecord take an ArrayRef<uint8_t> and a hash code to go
      with it, which seems like a simplification.
      
      Reviewers: ruiu, zturner, inglorion
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D31634
      
      llvm-svn: 299406
      13fc411e
    • Reid Kleckner's avatar
      [codeview] Cope with unsorted streams in type merging · c4b5d794
      Reid Kleckner authored
      Summary:
      MASM can produce type streams that are not topologically sorted. It can
      even produce type streams with circular references, but those are not
      common in practice.
      
      Reviewers: inglorion, ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D31629
      
      llvm-svn: 299403
      c4b5d794
  4. Apr 03, 2017
  5. Apr 01, 2017
  6. Mar 31, 2017
  7. Mar 30, 2017
  8. Mar 29, 2017
  9. Mar 28, 2017
  10. Mar 26, 2017
    • Shoaib Meenai's avatar
      [llvm-readobj] Prefer ILT to IAT for reading COFF imports · 73754488
      Shoaib Meenai authored
      We're seeing binutils ld produce binaries where the import address
      table's NameRVA entry is actually a VA instead (i.e. it's already base
      relocated), which llvm-readobj then chokes on. Both dumpbin and the
      Windows loader are able to handle these binaries correctly, however, and
      we can make llvm-readobj handle them correctly too by iterating the
      import lookup table (which doesn't have a relocated NameRVA) rather than
      the import address table.
      
      The import lookup table and the import address table are supposed to be
      identical on disk, and prior to r277298 the import lookup table would be
      used by `llvm-readobj -coff-imports` anyway, so this shouldn't have any
      functional change (except in the case of our malformed binaries). The
      import lookup table can apparently be missing when using old Borland
      linkers, so fall back to the import address table in that case.
      
      Resolves PR31766.
      
      Differential Revision: https://reviews.llvm.org/D31362
      
      llvm-svn: 298812
      73754488
    • Andrew Wilkins's avatar
      Add check for BSD when setting LIB_NAMES for GNU ld · ebfe3a9d
      Andrew Wilkins authored
      Patch by Koop Mast and Alex Arslan!
      
      Differential Revision: https://reviews.llvm.org/D28215
      
      llvm-svn: 298798
      ebfe3a9d
  11. Mar 24, 2017
  12. Mar 23, 2017
    • Reid Kleckner's avatar
      [PDB] Use two DBs when dumping the IPI stream · a5d187b0
      Reid Kleckner authored
      Summary:
      When dumping these records from an object file section, we should use
      only one type database. However, when dumping from a PDB, we should use
      two: one for the type stream and one for the IPI stream.
      
      Certain type records that normally live in the .debug$T object file
      section get moved over to the IPI stream of the PDB file and they get
      new indices.
      
      So far, I've noticed that the MSVC linker always moves these records
      into IPI:
      - LF_FUNC_ID
      - LF_MFUNC_ID
      - LF_STRING_ID
      - LF_SUBSTR_LIST
      - LF_BUILDINFO
      - LF_UDT_MOD_SRC_LINE
      
      These records have index fields that can point into TPI or IPI. In
      particular, LF_SUBSTR_LIST and LF_BUILDINFO point to LF_STRING_ID
      records to describe compilation command lines.
      
      I've modified the dumper to have an optional pointer to the item DB, and
      to do type name lookup of these fields in that DB. See printItemIndex.
      The result is that our pdbdump-headers.test is more faithful to the PDB
      contents and the output is less confusing.
      
      Reviewers: ruiu
      
      Subscribers: amccarth, zturner, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D31309
      
      llvm-svn: 298649
      a5d187b0
    • Teresa Johnson's avatar
      [ThinLTO] Add support for emitting minimized bitcode for thin link · 0c6a4ff8
      Teresa Johnson authored
      Summary:
      The cumulative size of the bitcode files for a very large application
      can be huge, particularly with -g. In a distributed build environment,
      all of these files must be sent to the remote build node that performs
      the thin link step, and this can exceed size limits.
      
      The thin link actually only needs the summary along with a bitcode
      symbol table. Until we have a proper bitcode symbol table, simply
      stripping the debug metadata results in significant size reduction.
      
      Add support for an option to additionally emit minimized bitcode
      modules, just for use in the thin link step, which for now just strips
      all debug metadata. I plan to add a cc1 option so this can be invoked
      easily during the compile step.
      
      However, care must be taken to ensure that these minimized thin link
      bitcode files produce the same index as with the original bitcode files,
      as these original bitcode files will be used in the backends.
      
      Specifically:
      1) The module hash used for caching is typically produced by hashing the
      written bitcode, and we want to include the hash that would correspond
      to the original bitcode file. This is because we want to ensure that
      changes in the stripped portions affect caching. Added plumbing to emit
      the same module hash in the minimized thin link bitcode file.
      2) The module paths in the index are constructed from the module ID of
      each thin linked bitcode, and typically is automatically generated from
      the input file path. This is the path used for finding the modules to
      import from, and obviously we need this to point to the original bitcode
      files. Added gold-plugin support to take a suffix replacement during the
      thin link that is used to override the identifier on the MemoryBufferRef
      constructed from the loaded thin link bitcode file. The assumption is
      that the build system can specify that the minimized bitcode file has a
      name that is similar but uses a different suffix (e.g. out.thinlink.bc
      instead of out.o).
      
      Added various tests to ensure that we get identical index files out of
      the thin link step.
      
      Reviewers: mehdi_amini, pcc
      
      Subscribers: Prazek, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D31027
      
      llvm-svn: 298638
      0c6a4ff8
    • Adrian McCarthy's avatar
      Add option to control whether llvm-pdbdump outputs in color · 1aa207d4
      Adrian McCarthy authored
      Adds -color-output option to llvm-pdbdump pretty commands that lets the user
      specify whether the output should have color. The default depends on whether
      the output is going to a TTY (per prior discussion in
      https://reviews.llvm.org/D31246).
      
      This will enable tests that pipe llvm-pdbdump output to FileCheck to work
      across platforms without regard to the differences in ANSI codes.
      
      Differential Revision: https://reviews.llvm.org/D31263
      
      llvm-svn: 298610
      1aa207d4
  13. Mar 22, 2017
  14. Mar 21, 2017
    • Dehao Chen's avatar
      Do not inline hot callsites for samplepgo in thinlto compile phase. · 9907e9d8
      Dehao Chen authored
      Summary: Because SamplePGO passes will be invoked twice in ThinLTO build: once at compile phase, the other at backend. We want to make sure the IR at the 2nd phase matches the hot part in profile, thus we do not want to inline hot callsites in the first phase.
      
      Reviewers: tejohnson, eraman
      
      Reviewed By: tejohnson
      
      Subscribers: mehdi_amini, llvm-commits, Prazek
      
      Differential Revision: https://reviews.llvm.org/D31201
      
      llvm-svn: 298428
      9907e9d8
    • Serge Pavlov's avatar
      Fix evaluation of LLVM_DEFINITIONS · 23be9459
      Serge Pavlov authored
      CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided
      for host compiler that builds llvm components. A function
      add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep
      track of these definitions and was intended to be a replacement for CMake
      command add_definitions. Actually in many cases add_definitions is still
      used and the content of LLVM_DEFINITIONS is not actual now. On the other
      hand the current version of CMake allows getting set of definitions in a
      more convenient way. This fix implements evaluation of the variable by
      reading corresponding cmake property.
      
      Differential Revision: https://reviews.llvm.org/D31125
      
      llvm-svn: 298336
      23be9459
  15. Mar 20, 2017
    • Kevin Enderby's avatar
      Add the rest of the error checking for Mach-O dyld compact bind entry errors · a8d256cb
      Kevin Enderby authored
      and test cases for each of the error checks.
      
      To do this more plumbing was needed so that the segment indexes and
      segment offsets can be checked.  Basically what was done was the SegInfo
      from llvm-objdump’s MachODump.cpp was moved into libObject for Mach-O
      objects as BindRebaseSegInfo and it is only created when an iterator for
      bind or rebase entries are created.
      
      This commit really only adds the error checking and test cases for the
      bind table entires and the checking for the lazy bind and weak bind entries
      are still to be fully done as well as the rebase entires.  Though some of
      the plumbing for those are added with this commit.  Those other error
      checks and test cases will be added in follow on commits.
      
      Note, the two llvm_unreachable() calls should now actually be unreachable
      with the error checks in place and would take a logic bug in the error
      checking code to be reached if the segment indexes and segment
      offsets are used from a checked bind entry.  Comments have been added
      to the methods that require the arguments to have been checked
      prior to calling.
      
      llvm-svn: 298292
      a8d256cb
    • Maxim Ostapenko's avatar
      [sancov] Fix broken links and displaced coloring in coverage-report-server.py · a525a2ba
      Maxim Ostapenko authored
      This patch fixes two issues:
      
      * Fixed relative links to source files
      * Enumeration of lines in source files starts from 1 instead of 0 to
        align with .symcov files generated by sancov -symbolize
      
      Patch by Dmitiriy Nikiforov.
      
      Differential Revision: https://reviews.llvm.org/D31038
      
      llvm-svn: 298250
      a525a2ba
Loading