Skip to content
  1. Feb 22, 2014
  2. Feb 19, 2014
    • Rafael Espindola's avatar
      Add back r201608, r201622, r201624 and r201625 · daeafb4c
      Rafael Espindola authored
      r201608 made llvm corretly handle private globals with MachO. r201622 fixed
      a bug in it and r201624 and r201625 were changes for using private linkage,
      assuming that llvm would do the right thing.
      
      They all got reverted because r201608 introduced a crash in LTO. This patch
      includes a fix for that. The issue was that TargetLoweringObjectFile now has
      to be initialized before we can mangle names of private globals. This is
      trivially true during the normal codegen pipeline (the asm printer does it),
      but LTO has to do it manually.
      
      llvm-svn: 201700
      daeafb4c
    • Daniel Jasper's avatar
      Revert r201622 and r201608. · 7e198ad8
      Daniel Jasper authored
      This causes the LLVMgold plugin to segfault. More information on the
      replies to r201608.
      
      llvm-svn: 201669
      7e198ad8
  3. Feb 18, 2014
    • Rafael Espindola's avatar
      Fix PR18743. · 09dcc6a5
      Rafael Espindola authored
      The IR
      @foo = private constant i32 42
      
      is valid, but before this patch we would produce an invalid MachO from it. It
      was invalid because it would use an L label in a section where the liker needs
      the labels in order to atomize it.
      
      One way of fixing it would be to just reject this IR in the backend, but that
      would not be very front end friendly.
      
      What this patch does is use an 'l' prefix in sections that we know the linker
      requires symbols for atomizing them. This allows frontends to just use
      private and not worry about which sections they go to or how the linker handles
      them.
      
      One small issue with this strategy is that now a symbol name depends on the
      section, which is not available before codegen. This is not a problem in
      practice. The reason is that it only happens with private linkage, which will
      be ignored by the non codegen users (llvm-nm and llvm-ar).
      
      llvm-svn: 201608
      09dcc6a5
  4. Feb 16, 2014
  5. Feb 14, 2014
    • Rafael Espindola's avatar
      Add extern template instantiations of llvm::Calculate. · 30616362
      Rafael Espindola authored
      This should be a small build time improvement in general and fixes
      the build on OS X with -DBUILD_SHARED_LIBS=ON.
      
      The issue is that not all users are including GenericDomTreeConstruction.h,
      causing undefined references when ld64 managed to hide the
      linkonce_odr symbols.
      
      llvm-svn: 201440
      30616362
  6. Feb 13, 2014
  7. Feb 10, 2014
  8. Feb 06, 2014
  9. Feb 05, 2014
  10. Feb 04, 2014
    • Justin Bogner's avatar
      llvm-cov: Fix include order in GCOV.cpp · df82c62f
      Justin Bogner authored
      llvm-svn: 200796
      df82c62f
    • Justin Bogner's avatar
      llvm-cov: Implement the preserve-paths flag · c6af3506
      Justin Bogner authored
      Until now, when a path in a gcno file included a directory, we would
      emit our .gcov file in that directory, whereas gcov always emits the
      file in the current directory. In doing so, this implements gcov's
      strange name-mangling -p flag, which is needed to avoid clobbering
      files when two with the same name exist in different directories.
      
      The path mangling is a bit ugly and only handles unix-like paths, but
      it's simple, and it doesn't make any guesses as to how it should
      behave outside of what gcov documents. If we decide this should be
      cross platform later, we can consider the compatibility implications
      then.
      
      llvm-svn: 200754
      c6af3506
    • David Blaikie's avatar
      DIBuilder: simplify array generation to produce true zero-length arrays · 2c7a2684
      David Blaikie authored
      For some anachronistic reason we were producing {i32 0} for zero-length
      debug info arrays.
      
      (this change is paired with a Clang change and may cause temporary
      buildbot noise)
      
      Let's not.
      
      llvm-svn: 200721
      2c7a2684
  11. Feb 01, 2014
  12. Jan 31, 2014
    • Reid Kleckner's avatar
      [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' · 1c843228
      Reid Kleckner authored
      MSVC always places the 'this' parameter for a method first.  The
      implicit 'sret' pointer for methods always comes second.  We already
      implement this for __thiscall by putting sret parameters on the stack,
      but __cdecl methods require putting both parameters on the stack in
      opposite order.
      
      Using a special calling convention allows frontends to keep the sret
      parameter first, which avoids breaking lots of assumptions in LLVM and
      Clang.
      
      Fixes PR15768 with the corresponding change in Clang.
      
      Reviewers: ributzka, majnemer
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2663
      
      llvm-svn: 200561
      1c843228
  13. Jan 30, 2014
  14. Jan 29, 2014
  15. Jan 28, 2014
  16. Jan 25, 2014
  17. Jan 22, 2014
    • Matt Arsenault's avatar
      Bug 18228 - Fix accepting bitcasts between vectors of pointers with a · fc3c91d0
      Matt Arsenault authored
      different number of elements.
      
      Bitcasts were passing with vectors of pointers with different number of
      elements since the number of elements was checking
      SrcTy->getVectorNumElements() == SrcTy->getVectorNumElements() which
      isn't helpful. The addrspacecast was also wrong, but that case at least
      is caught by the verifier. Refactor bitcast and addrspacecast handling
      in castIsValid to be more readable and fix this problem.
      
      llvm-svn: 199821
      fc3c91d0
  18. Jan 20, 2014
    • Chandler Carruth's avatar
      [PM] Wire up the Verifier for the new pass manager and connect it to the · 4d35631a
      Chandler Carruth authored
      various opt verifier commandline options.
      
      Mostly mechanical wiring of the verifier to the new pass manager.
      Exercises one of the more unusual aspects of it -- a pass can be either
      a module or function pass interchangably. If this is ever problematic,
      we can make things more constrained, but for things like the verifier
      where there is an "obvious" applicability at both levels, it seems
      convenient.
      
      This is the next-to-last piece of basic functionality left to make the
      opt commandline driving of the new pass manager minimally functional for
      testing and further development. There is still a lot to be done there
      (notably the factoring into .def files to kill the current boilerplate
      code) but it is relatively uninteresting. The only interesting bit left
      for minimal functionality is supporting the registration of analyses.
      I'm planning on doing that on top of the .def file switch mostly because
      the boilerplate for the analyses would be significantly worse.
      
      llvm-svn: 199646
      4d35631a
  19. Jan 19, 2014
    • Chandler Carruth's avatar
      [PM] Make the verifier work independently of any pass manager. · 043949d4
      Chandler Carruth authored
      This makes the 'verifyFunction' and 'verifyModule' functions totally
      independent operations on the LLVM IR. It also cleans up their API a bit
      by lifting the abort behavior into their clients and just using an
      optional raw_ostream parameter to control printing.
      
      The implementation of the verifier is now just an InstVisitor with no
      multiple inheritance. It also is significantly more const-correct, and
      hides the const violations internally. The two layers that force us to
      break const correctness are building a DomTree and dispatching through
      the InstVisitor.
      
      A new VerifierPass is used to implement the legacy pass manager
      interface in terms of the other pieces.
      
      The error messages produced may be slightly different now, and we may
      have slightly different short circuiting behavior with different usage
      models of the verifier, but generally everything works equivalently and
      this unblocks wiring the verifier up to the new pass manager.
      
      llvm-svn: 199569
      043949d4
    • Chandler Carruth's avatar
      Add a const lookup routine to get a BlockAddress constant if there is · 6a93692a
      Chandler Carruth authored
      one, but not create one. This is useful in the verifier when we want to
      query the constant if it exists but not create one. To be used in an
      upcoming commit.
      
      llvm-svn: 199568
      6a93692a
  20. Jan 18, 2014
  21. Jan 17, 2014
    • Juergen Ributzka's avatar
      Add two new calling conventions for runtime calls · e6250130
      Juergen Ributzka authored
      This patch adds two new target-independent calling conventions for runtime
      calls - PreserveMost and PreserveAll.
      The target-specific implementation for X86-64 is defined as following:
        - Arguments are passed as for the default C calling convention
        - The same applies for the return value(s)
        - PreserveMost preserves all GPRs - except R11
        - PreserveAll preserves all GPRs and all XMMs/YMMs - except R11
      
      Reviewed by Lang and Philip
      
      llvm-svn: 199508
      e6250130
    • Chandler Carruth's avatar
      [PM] [cleanup] Rename some of the Verifier's members, re-arrange them, · bf2b652c
      Chandler Carruth authored
      and tweak comments prior to more invasive surgery. Also clean up some
      other non-doxygen comments, and run clang-format over the parts that are
      going to change dramatically in subsequent commits so that those don't
      get cluttered with formatting changes.
      
      No functionality changed.
      
      llvm-svn: 199489
      bf2b652c
    • Chandler Carruth's avatar
      [PM] Remove the preverifier and directly compute the DominatorTree for · 7677760e
      Chandler Carruth authored
      the verifier after ensuring the CFG is at least usefully formed.
      
      This fixes a number of problems:
      1) The PreVerifier was missing the controls the Verifier provides over
         *how* an invalid module is handled -- it just aborted the program!
         Now it uses the same logic as the Verifier which is significantly
         more library-friendly.
      2) The DominatorTree used previously could have been cached and not
         updated due to bugs in prior passes and we would silently use the
         stale tree. This could cause dominance errors to not be as quickly
         diagnosed.
      3) We can now (in the next patch) pull the functionality of the verifier
         apart from the pass infrastructure so that you can verify IR without
         having any form of pass manager. This in turn frees the code to share
         logic between old and new pass manager variants.
      
      Along the way I fixed at least one annoying bug -- the state for
      'Broken' wasn't being cleared from run to run causing all functions
      visited after the first broken function to be marked as broken
      regardless of whether *they* were a problem. Fortunately, I don't really
      know much of a way to observe this peculiarity.
      
      In case folks are worried about the runtime cost, its negligible.
      I looked at running the entire regression test suite (which should be
      a relatively good use of the verifier) before and after but was unable
      to even measure the time spent on the verifier and there was no
      regresion from before to after. I checked both with debug builds and
      optimized builds.
      
      llvm-svn: 199487
      7677760e
  22. Jan 16, 2014
    • Reid Kleckner's avatar
      Change inalloca rules to make it only apply to the last parameter · 60d3a835
      Reid Kleckner authored
      This makes things a lot easier, because we can now talk about the
      "argument allocation", which allocates all the memory for the call in
      one shot.
      
      The only functional change is to the verifier for a feature that hasn't
      shipped yet.
      
      llvm-svn: 199434
      60d3a835
    • Quentin Colombet's avatar
      [opt][PassInfo] Allow opt to run passes that need target machine. · dc0b2ea2
      Quentin Colombet authored
      When registering a pass, a pass can now specify a second construct that takes as
      argument a pointer to TargetMachine.
      The PassInfo class has been updated to reflect that possibility.
      If such a constructor exists opt will use it instead of the default constructor
      when instantiating the pass.
      
      Since such IR passes are supposed to be rare, no specific support has been
      added to this commit to allow an easy registration of such a pass.
      In other words, for such pass, the initialization function has to be
      hand-written (see CodeGenPrepare for instance).
      
      Now, codegenprepare can be tested using opt:
      opt -codegenprepare -mtriple=mytriple input.ll
      
      llvm-svn: 199430
      dc0b2ea2
    • Manman Ren's avatar
      Report a warning when dropping outdated debug info metadata. · 2ebfb42f
      Manman Ren authored
      Use DiagnosticInfo to emit the warning.
      
      llvm-svn: 199346
      2ebfb42f
  23. Jan 15, 2014
Loading