Skip to content
  1. Apr 18, 2016
    • Mehdi Amini's avatar
      lli: avoid global variables, use a local unique_ptr instead · a7de820a
      Mehdi Amini authored
      There was issue with order of destruction in some cases.
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266652
      a7de820a
    • Nico Weber's avatar
      Revert 266581 (and follow-up 266588), it doesn't build on Windows. · ca94d0ec
      Nico Weber authored
      Three problems:
      1. <future> can't be easily used.  If you must use it, see
         include/Support/ThreadPool.h for how.
      2. constexpr problems, even after 266588.
      3. Move assignment operators can't be defaulted in MSVC2013.
      
      llvm-svn: 266615
      ca94d0ec
    • Mehdi Amini's avatar
      [NFC] Header cleanup · b550cb17
      Mehdi Amini authored
      Removed some unused headers, replaced some headers with forward class declarations.
      
      Found using simple scripts like this one:
      clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'
      
      Patch by Eugene Kosov <claprix@yandex.ru>
      
      Differential Revision: http://reviews.llvm.org/D19219
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266595
      b550cb17
    • Lang Hames's avatar
      [ORC] Generalize the ORC RPC utils to support RPC function return values and · 236cea74
      Lang Hames authored
      asynchronous call/handle. Also updates the ORC remote JIT API to use the new
      scheme.
      
      The previous version of the RPC tools only supported void functions, and
      required the user to manually call a paired function to return results. This
      patch replaces the Procedure typedef (which only supported void functions) with
      the Function typedef which supports return values, e.g.:
      
        Function<FooId, int32_t(std::string)> Foo;
      
      The RPC primitives and channel operations are also expanded. RPC channels must
      support four new operations: startSendMessage, endSendMessage,
      startRecieveMessage and endRecieveMessage, to handle channel locking. In
      addition, serialization support for tuples to RPCChannels is added to enable
      multiple return values.
      
      The RPC primitives are expanded from callAppend, call, expect and handle, to:
      
      appendCallAsync - Make an asynchronous call to the given function.
      
      callAsync - The same as appendCallAsync, but calls send on the channel when
                  done.
      
      callSTHandling - Blocking call for single-threaded code. Wraps a call to
                       callAsync then waits on the result, using a user-supplied
                       handler to handle any callbacks from the remote.
      
      callST - The same as callSTHandling, except that it doesn't handle
               callbacks - it expects the result to be the first return.
      
      expect and handle - as before.
      
      handleResponse - Handle a response from the remote.
      
      waitForResult - Wait for the response with the given sequence number to arrive.
      
      llvm-svn: 266581
      236cea74
  2. Apr 17, 2016
    • Rafael Espindola's avatar
      Fix a use after move. · 197871d5
      Rafael Espindola authored
      llvm-svn: 266566
      197871d5
    • Rafael Espindola's avatar
      Keep only the splitCodegen version that takes a factory. · 3c1c9875
      Rafael Espindola authored
      This makes it much easier to see that all created TargetMachines are
      equivalent.
      
      llvm-svn: 266564
      3c1c9875
    • Duncan P. N. Exon Smith's avatar
      IR: Use an explicit map for debug info type uniquing · 5ab2be09
      Duncan P. N. Exon Smith authored
      Rather than relying on the structural equivalence of DICompositeType to
      merge type definitions, use an explicit map on the LLVMContext that
      LLParser and BitcodeReader consult when constructing new nodes.
      Each non-forward-declaration DICompositeType with a non-empty
      'identifier:' field is stored/loaded from the type map, and the first
      definiton will "win".
      
      This map is opt-in: clients that expect ODR types from different modules
      to be merged must call LLVMContext::ensureDITypeMap.
      
        - Clients that just happen to load more than one Module in the same
          LLVMContext won't magically merge types.
      
        - Clients (like LTO) that want to continue to merge types based on ODR
          identifiers should opt-in immediately.
      
      I have updated LTOCodeGenerator.cpp, the two "linking" spots in
      gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to
      set this.
      
      With this in place, it will be straightforward to remove the DITypeRef
      concept (i.e., referencing types by their 'identifier:' string rather
      than pointing at them directly).
      
      llvm-svn: 266549
      5ab2be09
    • Duncan P. N. Exon Smith's avatar
      LTO: Use a common LibLTOCodeGenerator::init, NFC · 247e636d
      Duncan P. N. Exon Smith authored
      llvm-svn: 266538
      247e636d
  3. Apr 16, 2016
  4. Apr 15, 2016
  5. Apr 14, 2016
  6. Apr 13, 2016
  7. Apr 12, 2016
    • Mehdi Amini's avatar
      Move summary creation out of llvm-as into opt · 68da426e
      Mehdi Amini authored
      Summary:
      Let keep llvm-as "dumb": it converts textual IR to bitcode. This
      commit removes the dependency from llvm-as to libLLVMAnalysis.
      We'll add back summary in llvm-as if we get to a textual
      representation for it at some point. In the meantime, opt seems
      like a better place for that.
      
      Reviewers: tejohnson
      
      Subscribers: joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19032
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266131
      68da426e
  8. Apr 11, 2016
    • Zachary Turner's avatar
      Fix some display bugs in llvm-pdbdump. · 4d5535a7
      Zachary Turner authored
      We were incorrectly reporting all non-64 bit integers as int64s.
      This is most evident when trying to print the "short" type, but
      in theory could happen with chars too (although usually chars use
      a different builtin type).
      
      Additionally, we were using the wrong check when deciding whether
      to print an enum definition as a global enum.  We were checking
      whether or not the enum was "nested", and if so saving it until
      we print the class definition that it was nested in.  But this is
      not correct in rare situations where the enum is nested, but the
      class that it's nested in does not have type information in the PDB.
      So instead we check if there is a class definition for the parent
      in the PDB.  If so we save it for later, otherwise we print it.
      
      llvm-svn: 265993
      4d5535a7
    • Hans Wennborg's avatar
      Fix repeated conditional expression (PR20711) · aebe45b3
      Hans Wennborg authored
      llvm-svn: 265990
      aebe45b3
    • Hemant Kulkarni's avatar
      [llvm-readobj] Add ELF hash histogram printing · 9b1b7f08
      Hemant Kulkarni authored
      Differential Revision: http://reviews.llvm.org/D18907
      
      llvm-svn: 265967
      9b1b7f08
    • Teresa Johnson's avatar
      [ThinLTO] Move summary computation from BitcodeWriter to new pass · 2d5487cf
      Teresa Johnson authored
      Summary:
      This is the first step in also serializing the index out to LLVM
      assembly.
      
      The per-module summary written to bitcode is moved out of the bitcode
      writer and to a new analysis pass (ModuleSummaryIndexWrapperPass).
      The pass itself uses a new builder class to compute index, and the
      builder class is used directly in places where we don't have a pass
      manager (e.g. llvm-as).
      
      Because we are computing summaries outside of the bitcode writer, we no
      longer can use value ids created by the bitcode writer's
      ValueEnumerator. This required changing the reference graph edge type
      to use a new ValueInfo class holding a union between a GUID (combined
      index) and Value* (permodule index). The Value* are converted to the
      appropriate value ID during bitcode writing.
      
      Also, this enables removal of the BitWriter library's dependence on the
      Analysis library that was previously required for the summary computation.
      
      Reviewers: joker.eph
      
      Subscribers: joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D18763
      
      llvm-svn: 265941
      2d5487cf
  9. Apr 09, 2016
    • Adrian Prantl's avatar
      Support the Nodebug emission kind for DICompileUnits. · 5992a72b
      Adrian Prantl authored
      Sample-based profiling and optimization remarks currently remove
      DICompileUnits from llvm.dbg.cu to suppress the emission of debug info
      from them. This is somewhat of a hack and only borderline legal IR.
      
      This patch uses the recently introduced NoDebug emission kind in
      DICompileUnit to achieve the same result without breaking the Verifier.
      A nice side-effect of this change is that it is now possible to combine
      NoDebug and regular compile units under LTO.
      
      http://reviews.llvm.org/D18808
      <rdar://problem/25427165>
      
      llvm-svn: 265861
      5992a72b
  10. Apr 08, 2016
  11. Apr 07, 2016
    • Valery Pykhtin's avatar
      fix r265645: target dependent printf formatting flags. · 8e79f5be
      Valery Pykhtin authored
      llvm-svn: 265649
      8e79f5be
    • Valery Pykhtin's avatar
      [AMDGPU] llvm-objdump: Minimal HSA Code Object disassembler support. · de04805e
      Valery Pykhtin authored
      Reenable reverted r265550 with endianness issue fixed. Variables of
      endian-aware types such as ulittle32_t should be explicitly casted
      to their natural equivalent types before passing it as vararg to
      printf like functions (format in my case). Added lit config file
      depending on AMDGPU target as the testcase uses assembler.
      
      Differential revision: http://reviews.llvm.org/D16998
      
      llvm-svn: 265645
      de04805e
    • Amaury Sechet's avatar
      49491310
    • Peter Zotov's avatar
      [llvm-c] Add LLVMGetValueKind. · 3e4561ce
      Peter Zotov authored
      Patch by Nicole Mazzuca <npmazzuca@gmail.com>.
      
      Differential Revision: http://reviews.llvm.org/D18729
      
      llvm-svn: 265608
      3e4561ce
    • Kevin Enderby's avatar
      Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to... · 3fcdf6ae
      Kevin Enderby authored
      Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message
      
      Produce the first specific error message for a malformed Mach-O file describing
      the problem instead of the generic message for object_error::parse_failed of
      "Invalid data was encountered while parsing the file”.  Many more good error
      messages will follow after this first one.
      
      This is built on Lang Hames’ great work of adding the ’Error' class for
      structured error handling and threading Error through MachOObjectFile
      construction.  And making createMachOObjectFile return Expected<...> .
      
      So to to get the error to the llvm-obdump tool, I changed the stack of
      these methods to also return Expected<...> :
      
        object::ObjectFile::createObjectFile()
        object::SymbolicFile::createSymbolicFile()
        object::createBinary()
      
      Then finally in ParseInputMachO() in MachODump.cpp the error can
      be reported and the specific error message can be printed in llvm-objdump
      and can be seen in the existing test case for the existing malformed binary
      but with the updated error message.
      
      Converting these interfaces to Expected<> from ErrorOr<> does involve
      touching a number of places. To contain the changes for now use of
      errorToErrorCode() and errorOrToExpected() are used where the callers
      are yet to be converted.
      
      Also there some were bugs in the existing code that did not deal with the
      old ErrorOr<> return values.  So now with Expected<> since they must be
      checked and the error handled, I added a TODO and a comment:
      “// TODO: Actually report errors helpfully” and a call something like
      consumeError(ObjOrErr.takeError()) so the buggy code will not crash
      since needed to deal with the Error.
      
      Note there is one fix also needed to lld/COFF/InputFiles.cpp that goes along
      with this that I will commit right after this.  So expect lld not to built
      after this commit and before the next one.
      
      llvm-svn: 265606
      3fcdf6ae
  12. Apr 06, 2016
  13. Apr 05, 2016
Loading