Skip to content
  1. May 07, 2016
  2. Apr 26, 2016
  3. Apr 25, 2016
    • Lang Hames's avatar
      [ORC] Thread Error/Expected through the RPC library. · ef5a0ee2
      Lang Hames authored
      This replaces use of std::error_code and ErrorOr in the ORC RPC support library
      with Error and Expected. This required updating the OrcRemoteTarget API, Client,
      and server code, as well as updating the Orc C API.
      
      This patch also fixes several instances where Errors were dropped.
      
      llvm-svn: 267457
      ef5a0ee2
  4. Apr 18, 2016
    • Lang Hames's avatar
      [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups. · 3fde652e
      Lang Hames authored
      Fixes:
      
      (1) Removes constexpr (unsupported in MSVC)
      (2) Move constructors (remove explicitly defaulted ones)
      (3) <future> - Add warning suppression for MSVC.
      
      llvm-svn: 266663
      3fde652e
    • 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
    • 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
  5. Apr 15, 2016
  6. Apr 14, 2016
  7. Apr 07, 2016
    • 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
  8. Feb 10, 2016
    • Lang Hames's avatar
      [Orc] Add lazy-JITting support for i386. · 4f8194e8
      Lang Hames authored
      This patch adds a new class, OrcI386, which contains the hooks needed to
      support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT
      re-entry code uses the FXSAVE/FXRSTOR instructions).
      
      Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and
      regression and unit tests are enabled for this architecture.
      
      llvm-svn: 260338
      4f8194e8
  9. Jan 26, 2016
    • Chris Bieneman's avatar
      Remove autoconf support · e49730d4
      Chris Bieneman authored
      Summary:
      This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
      
      "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
      - Obi Wan Kenobi
      
      Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark
      
      Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D16471
      
      llvm-svn: 258861
      e49730d4
  10. Jan 17, 2016
  11. Jan 15, 2016
  12. Jan 14, 2016
  13. Jan 12, 2016
  14. Jan 11, 2016
  15. Jan 09, 2016
  16. Dec 18, 2015
    • Rafael Espindola's avatar
      Drop materializeAllPermanently. · c4a03483
      Rafael Espindola authored
      This inlines materializeAll into the only caller
      (materializeAllPermanently) and renames materializeAllPermanently to
      just materializeAll.
      
      llvm-svn: 256024
      c4a03483
  17. Dec 06, 2015
  18. Dec 04, 2015
  19. Nov 04, 2015
  20. Nov 03, 2015
  21. Oct 19, 2015
    • Lang Hames's avatar
      [Orc] Add support for emitting indirect stubs directly into the JIT target's · 98c2ac13
      Lang Hames authored
      memory, rather than representing the stubs in IR. Update the CompileOnDemand
      layer to use this functionality.
      
      Directly emitting stubs is much cheaper than building them in IR and codegen'ing
      them (see below). It also plays well with remote JITing - stubs can be emitted
      directly in the target process, rather than having to send them over the wire.
      
      The downsides are:
      
      (1) Care must be taken when resolving symbols, as stub symbols are held in a
          separate symbol table. This is only a problem for layer writers and other
          people using this API directly. The CompileOnDemand layer hides this detail.
      
      (2) Aliases of function stubs can't be symbolic any more (since there's no
          symbol definition in IR), but must be converted into a constant pointer
          expression. This means that modules containing aliases of stubs cannot be
          cached. In practice this is unlikely to be a problem: There's no benefit to
          caching such a module anyway.
      
      On balance I think the extra performance is more than worth the trade-offs: In a
      simple stress test with 10000 dummy functions requiring stubs and a single
      executed "hello world" main function, directly emitting stubs reduced user time
      for JITing / executing by over 90% (1.5s for IR stubs vs 0.1s for direct
      emission).
      
      llvm-svn: 250712
      98c2ac13
  22. Oct 07, 2015
  23. Jul 30, 2015
  24. Jul 24, 2015
    • Mehdi Amini's avatar
      Remove access to the DataLayout in the TargetMachine · 26d48131
      Mehdi Amini authored
      Summary:
      Replace getDataLayout() with a createDataLayout() method to make
      explicit that it is intended to create a DataLayout only and not
      accessing it for other purpose.
      
      This change is the last of a series of commits dedicated to have a
      single DataLayout during compilation by using always the one owned
      by the module.
      
      Reviewers: echristo
      
      Subscribers: jholewinski, llvm-commits, rafael, yaron.keren
      
      Differential Revision: http://reviews.llvm.org/D11103
      
      (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea)
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 243114
      26d48131
    • Mehdi Amini's avatar
      Revert "Remove access to the DataLayout in the TargetMachine" · 5d8e5699
      Mehdi Amini authored
      This reverts commit 0f720d984f419c747709462f7476dff962c0bc41.
      
      It breaks clang too badly, I need to prepare a proper patch for clang
      first.
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 243089
      5d8e5699
    • Mehdi Amini's avatar
      Remove access to the DataLayout in the TargetMachine · b4bc424c
      Mehdi Amini authored
      Summary:
      Replace getDataLayout() with a createDataLayout() method to make
      explicit that it is intended to create a DataLayout only and not
      accessing it for other purpose.
      
      This change is the last of a series of commits dedicated to have a
      single DataLayout during compilation by using always the one owned
      by the module.
      
      Reviewers: echristo
      
      Subscribers: jholewinski, llvm-commits, rafael, yaron.keren
      
      Differential Revision: http://reviews.llvm.org/D11103
      
      (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea)
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 243083
      b4bc424c
  25. Jul 15, 2015
  26. Jun 23, 2015
Loading