Skip to content
  1. Dec 28, 2013
  2. Dec 12, 2013
  3. Dec 10, 2013
  4. Nov 19, 2013
  5. Nov 18, 2013
    • Alexey Samsonov's avatar
      Revert r194865 and r194874. · 49109a27
      Alexey Samsonov authored
      This change is incorrect. If you delete virtual destructor of both a base class
      and a subclass, then the following code:
        Base *foo = new Child();
        delete foo;
      will not cause the destructor for members of Child class. As a result, I observe
      plently of memory leaks. Notable examples I investigated are:
      ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.
      
      llvm-svn: 194997
      49109a27
  6. Nov 15, 2013
  7. Oct 22, 2013
  8. Oct 16, 2013
    • Rafael Espindola's avatar
      Assert on duplicate registration. Don't depend on function pointer equality. · 40a3d018
      Rafael Espindola authored
      Before this patch we would assert when building llvm as multiple shared
      libraries (cmake's BUILD_SHARED_LIBS). The problem was the line
      
      if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer)
      
      which returns false because of -fvisibility-inlines-hidden. It is easy
      to fix just this one case, but I decided to try to also make the
      registration more strict. It looks like the old logic for ignoring
      followup registration was just a temporary hack that outlived its
      usefulness.
      
      This patch converts the ifs to asserts, fixes the few cases that were
      registering twice and makes sure all the asserts compare with null.
      
      Thanks for Joerg for reporting the problem and reviewing the patch.
      
      llvm-svn: 192803
      40a3d018
  9. Oct 02, 2013
    • Tim Northover's avatar
      MCJIT: skip some more new multi-module tests on unsupported platforms. · 39ddb3f9
      Tim Northover authored
      This should fix the i386 Darwin build-bot.
      
      llvm-svn: 191840
      39ddb3f9
    • Filip Pizlo's avatar
      This threads SectionName through the allocateCodeSection/allocateDataSection... · 7aa695e0
      Filip Pizlo authored
      This threads SectionName through the allocateCodeSection/allocateDataSection APIs, both in C++ and C land.  
      It's useful for the memory managers that are allocating a section to know what the name of the section is.  
      At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what 
      memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about 
      what each allocation is for.  This allows clients that supply their own memory managers to do this.  
      Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM 
      client.
      
      This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM.  I'm assuming that 
      it's safe to change the C++ API because that API is allowed to change.  I'm assuming that it's safe to change 
      the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory 
      management C API).
      
      llvm-svn: 191804
      7aa695e0
  10. Oct 01, 2013
  11. Jul 27, 2013
  12. Jul 26, 2013
    • Bill Schmidt's avatar
      [PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc. · 419f7c23
      Bill Schmidt authored
      Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
      all PowerPC targets, whether 32- or 64-bit.  They will both implicitly
      define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
      for 32-bit targets.  We cannot be sure that all other possible
      compilers used to compile Clang/LLVM define both __ppc__ and
      __powerpc__, for example, so it is best to check for both when relying
      on either inside the Clang/LLVM code base.
      
      This patch makes sure we always check for both variants.  In addition,
      it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp.
      (At least one of __ppc__ and __powerpc__ should always be defined when
      compiling for a PowerPC target, no matter which compiler is used, so
      testing for them is unnecessary.)
      
      There are some places in the compiler that check for other variants,
      like __POWERPC__ and _POWER, and I have left those in place.  There is
      no need to add them elsewhere.  This seems to be in Apple-specific
      code, and I won't take a chance on breaking it.
      
      There is no intended change in behavior; thus, no test cases are
      added.
      
      llvm-svn: 187248
      419f7c23
  13. Jul 24, 2013
    • Akira Hatanaka's avatar
      [mips] Use pristine object file while processing relocations. · 2e236246
      Akira Hatanaka authored
          Similar to ARM change r182800, dynamic linker will read bits/addends from
          the original object rather than from the object that might have been patched
          previously. For the purpose of relocations for MCJIT stubs on MIPS, we
          internally use otherwise unused MIPS relocations.
          
          The change also enables MCJIT unit tests for MIPS (EL/BE), and the following
          two tests now pass:
          
          - MCJITTest.return_global and
          - MCJITTest.multiple_functions.
          
          These issues have been tracked as Bug 16250.
      
          Patch by Petar Jovanovic.
      
      llvm-svn: 187019
      2e236246
  14. Jul 14, 2013
  15. Jul 04, 2013
  16. Jul 02, 2013
  17. Jun 28, 2013
    • Andrew Kaylor's avatar
      Revising the MCJIT ObjectCache interface to allow subclasses to avoid... · b595f530
      Andrew Kaylor authored
      Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects
      
      llvm-svn: 185221
      b595f530
    • Daniel Malea's avatar
      Adding tests for DebugIR pass · 4146b040
      Daniel Malea authored
      - lit tests verify that each line of input LLVM IR gets a !dbg node and a
        corresponding entry of metadata that contains the line number 
      - unit tests verify that DebugIR works as advertised in the interface
      - refactored some useful IR generation functionality from the MCJIT unit tests
        so it can be reused
      
      llvm-svn: 185212
      4146b040
  18. Jun 20, 2013
    • Akira Hatanaka's avatar
      [mips] Remove Triple:mips from SupportedArchs in MCJIT unittests · f47db38a
      Akira Hatanaka authored
      MIPS does not handle multiple relocations correctly, so two tests from the
      unittests are expected to fail. These are:
       - MCJITTest.return_global and
       - MCJITTest.multiple_functions.
      
      Until the multiple relocations are fixed, XFAIL the MCJIT unittests for
      MIPS. This issue is tracked as Bug 16250.
      
      Patch by Petar Jovanovic.
      
      llvm-svn: 184461
      f47db38a
  19. May 30, 2013
  20. May 22, 2013
  21. May 21, 2013
    • Filip Pizlo's avatar
      Roll out r182407 and r182408 because they broke builds. · 5aefb133
      Filip Pizlo authored
      llvm-svn: 182409
      5aefb133
    • Filip Pizlo's avatar
      Expose the RTDyldMemoryManager through the C API. This allows clients of · e1e3f7cc
      Filip Pizlo authored
      the C API to provide their own way of allocating JIT memory (both code 
      and data) and finalizing memory permissions (page protections, cache 
      flush).
      
      llvm-svn: 182408
      e1e3f7cc
    • Ulrich Weigand's avatar
      · 7c81c7c6
      Ulrich Weigand authored
      Alternative fix for problem addressed in r182233
      
      Revision r182233 partially reverted the change in r181200 to simplify
      JIT unif test #ifdefs, because that change caused a link error on some
      host operating systems where the export list requires the following
      symbols to be defined:
      
       JITTest_AvailableExternallyFunction
       JITTest_AvailableExternallyGlobal
      
      As discussed on the list, the commit reverts r182233 (and re-installs
      the full r181200 change), and instead fixes the link problem by moving
      those two symbols to the top of the file and unconditionally defining
      them.
      
      llvm-svn: 182367
      7c81c7c6
  22. May 20, 2013
    • Bob Wilson's avatar
      Partially revert change in r181200 that tried to simplify JIT unit test #ifdefs. · 29699c63
      Bob Wilson authored
      The export list for this test requires the following symbols to be available:
        JITTest_AvailableExternallyFunction
        JITTest_AvailableExternallyGlobal
      The change in r181200 commented them out, which caused the test to fail to
      link, at least on Darwin. I have only reverted the change for arm, since I
      can't test the other targets and since it sounds like that change was fixing
      real problems for those other targets. It should be possible to rearrange the
      code to keep those definitions outside the #ifdefs, but that should be done by
      someone who can reproduce the problems that r181200 was trying to fix.
      
      llvm-svn: 182233
      29699c63
  23. May 19, 2013
  24. May 17, 2013
  25. May 15, 2013
    • David Blaikie's avatar
      Use only explicit bool conversion operators · 041f1aa3
      David Blaikie authored
      BitVector/SmallBitVector::reference::operator bool remain implicit since
      they model more exactly a bool, rather than something else that can be
      boolean tested.
      
      The most common (non-buggy) case are where such objects are used as
      return expressions in bool-returning functions or as boolean function
      arguments. In those cases I've used (& added if necessary) a named
      function to provide the equivalent (or sometimes negative, depending on
      convenient wording) test.
      
      One behavior change (YAMLParser) was made, though no test case is
      included as I'm not sure how to reach that code path. Essentially any
      comparison of llvm::yaml::document_iterators would be invalid if neither
      iterator was at the end.
      
      This helped uncover a couple of bugs in Clang - test cases provided for
      those in a separate commit along with similar changes to `operator bool`
      instances in Clang.
      
      llvm-svn: 181868
      041f1aa3
  26. May 14, 2013
    • Filip Pizlo's avatar
      SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the · 9bc53e84
      Filip Pizlo authored
      EngineBuilder interface required a JITMemoryManager even if it was being used 
      to construct an MCJIT. But the MCJIT actually wants a RTDyldMemoryManager. 
      Consequently, the SectionMemoryManager, which is meant for MCJIT, derived 
      from the JITMemoryManager and then stubbed out a bunch of JITMemoryManager 
      methods that weren't relevant to the MCJIT.
      
      This patch fixes the situation: it teaches the EngineBuilder that 
      RTDyldMemoryManager is a supertype of JITMemoryManager, and that it's 
      appropriate to pass a RTDyldMemoryManager instead of a JITMemoryManager if 
      we're using the MCJIT. This allows us to remove the stub methods from 
      SectionMemoryManager, and make SectionMemoryManager a direct subtype of 
      RTDyldMemoryManager.
      
      llvm-svn: 181820
      9bc53e84
  27. May 10, 2013
    • Andrew Kaylor's avatar
      Fix MCJITCAPITest.cpp unit test on Windows. · b3a25fa5
      Andrew Kaylor authored
      MCJIT on Windows requires an explicit target triple with "-elf" appended to generate objects in ELF format.  The common test framework was setting up this triple, but it wasn't passed to the C API in the test.
      
      llvm-svn: 181614
      b3a25fa5
  28. May 07, 2013
  29. May 06, 2013
    • Ulrich Weigand's avatar
      · 80435baa
      Ulrich Weigand authored
      [SystemZ] Set up JIT/MCJIT test cases
      
      This patch adds the necessary configuration bits and #ifdef's to set up
      the JIT/MCJIT test cases for SystemZ.  Like other recent targets, we do
      fully support MCJIT, but do not support the old JIT at all.  Set up the
      lit config files accordingly, and disable old-JIT unit tests.
      
      Patch by Richard Sandiford.
      
      llvm-svn: 181207
      80435baa
    • Ulrich Weigand's avatar
      · f1c30045
      Ulrich Weigand authored
      Simplify JIT unit test #ifdefs
      
      Several platforms need to disable all old-JIT unit tests, since they only
      support the new MCJIT.  This currently done via #ifdef'ing out those tests
      in the ExecutionEngine/JIT/*.cpp files.  As those #ifdef's have grown
      historically, we now have a number of repeated directives which -in total-
      cover nearly the whole file, but leave a couple of helper functions out.
      When building the tests with clang itself, those helper functions now
      cause spurious "unused function" warnings.
      
      To fix those warnings, and also to remove the duplicate #ifdef conditions
      and make it easier to disable the tests for a new target, this patch
      consolidates the #ifdefs into a single one per file, which covers all
      the tests including all helper routines.
      
      Tested on PowerPC and SystemZ.
      
      llvm-svn: 181200
      f1c30045
  30. May 02, 2013
    • Filip Pizlo's avatar
      This exposes more MCJIT options via the C API: · 85e0d273
      Filip Pizlo authored
      CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like.  Previously it was only possible to 
      create an MCJIT that used CodeModel::JITDefault.
      
      EnableFastISel: It's now possible to turn on the fast instruction selector.
      
      The CodeModel option required some trickery.  The problem is that previously, we were ensuring future binary compatibility in 
      the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the 
      bindings then bzero the remaining bits.  This works great but assumes that the bitwise zero equivalent of any field is a 
      sensible default value.
      
      But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model.  In both of those, the default 
      for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero.
      
      Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with
      defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp
      illustrates the change, as does the comment in ExecutionEngine.h.
      
      llvm-svn: 180893
      85e0d273
  31. May 01, 2013
Loading