1. Sep 01, 2014
    • Benjamin Kramer's avatar
    • Matthew Gardiner's avatar
      Add an interface on ArchSpec to provide lldb client code · e77b2948
      Matthew Gardiner authored
      with a mechanism to query if the current target architecture
      has non 8-bit bytes.
      
      llvm-svn: 216867
      e77b2948
    • Hal Finkel's avatar
      Feed AA to the inliner and use AA->getModRefBehavior in AddAliasScopeMetadata · 0c083024
      Hal Finkel authored
      This feeds AA through the IFI structure into the inliner so that
      AddAliasScopeMetadata can use AA->getModRefBehavior to figure out which
      functions only access their arguments (instead of just hard-coding some
      knowledge of memory intrinsics). Most of the information is only available from
      BasicAA; this is important for preserving alias scoping information for
      target-specific intrinsics when doing the noalias parameter attribute to
      metadata conversion.
      
      llvm-svn: 216866
      0c083024
    • Nick Lewycky's avatar
      Ignore lifetime intrinsics in use list for MemCpyOptimizer. Patch by Luqman... · fc243d54
      Nick Lewycky authored
      Ignore lifetime intrinsics in use list for MemCpyOptimizer. Patch by Luqman Aden, review by Hal Finkel.
      
      llvm-svn: 216865
      fc243d54
    • Nick Lewycky's avatar
      Remove an errant outer loop that contains nothing but an inner loop over... · 97756409
      Nick Lewycky authored
      Remove an errant outer loop that contains nothing but an inner loop over exactly the same elements. While no functionality is change intended (and hence there are no changes to tests), you don't want to skip this revision if bisecting for errors.
      
      llvm-svn: 216864
      97756409
    • Hal Finkel's avatar
      Fix AddAliasScopeMetadata again - alias.scope must be a complete description · cbb85f24
      Hal Finkel authored
      I thought that I had fixed this problem in r216818, but I did not do a very
      good job. The underlying issue is that when we add alias.scope metadata we are
      asserting that this metadata completely describes the aliasing relationships
      within the current aliasing scope domain, and so in the context of translating
      noalias argument attributes, the pointers must all be based on noalias
      arguments (as underlying objects) and have no other kind of underlying object.
      In r216818 excluding appropriate accesses from getting alias.scope metadata is
      done by looking for underlying objects that are not identified function-local
      objects -- but that's wrong because allocas, etc. are also function-local
      objects and we need to explicitly check that all underlying objects are the
      noalias arguments for which we're adding metadata aliasing scopes.
      
      This fixes the underlying-object check for adding alias.scope metadata, and
      does some refactoring of the related capture-checking eligibility logic (and
      adds more comments; hopefully making everything a bit clearer).
      
      Fixes self-hosting on x86_64 with -mllvm -enable-noalias-to-md-conversion (the
      feature is still disabled by default).
      
      llvm-svn: 216863
      cbb85f24
    • Jingyue Wu's avatar
      [MachineSink] Use the real post dominator tree · 5208cc5d
      Jingyue Wu authored
      Summary:
      Fixes a FIXME in MachineSinking. Instead of using the simple heuristics
      in isPostDominatedBy, use the real MachinePostDominatorTree. The old
      heuristics caused instructions to sink unnecessarily, and might create
      register pressure.
      
      Test Plan:
      Added a NVPTX codegen test to verify that our change is in effect. It also
      shows the unnecessary register pressure caused by over-sinking. Updated
      affected tests in AArch64 and X86.
      
      Reviewers: eliben, meheff, Jiangning
      
      Reviewed By: Jiangning
      
      Subscribers: jholewinski, aemerson, mcrosier, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D4814
      
      llvm-svn: 216862
      5208cc5d
    • David Blaikie's avatar
      DebugInfo: Elide lexical scopes which only contain other (inline or lexical) scopes. · 6a150a87
      David Blaikie authored
      DW_TAG_lexical_scopes inform debuggers about the instruction range for
      which a given variable (or imported declaration/module/etc) is valid. If
      the scope doesn't itself contain any such entities, it's a waste of
      space and should be omitted.
      
      We were correctly doing this for entirely empty leaves, but not for
      intermediate nodes.
      
      Reduces total (not just debug sections) .o file size for a bootstrap
      -gmlt LLVM by 22% and bootstrap -gmlt clang executable by 13%. The wins
      for a full -g build will be less as a % (and in absolute terms), but
      should still be substantial - with some of that win being fewer
      relocations, thus more substantiall reducing link times than fewer bytes
      alone would have.
      
      llvm-svn: 216861
      6a150a87
    • Matt Arsenault's avatar
      Consider addrspaces in canLosslesslyBitCastTo() · a8efaf96
      Matt Arsenault authored
      Make this conservatively correct and report false for different
      address spaces, which might require a nontrivial translation.
      
      Based on the few uses of this, I don't think this currently
      breaks anything.
      
      llvm-svn: 216846
      a8efaf96
    • David Blaikie's avatar
      DebugInfo: Move argument creation up into the caller that's unambiguously... · 3fbf3b85
      David Blaikie authored
      DebugInfo: Move argument creation up into the caller that's unambiguously handling the subprogram scope (replacing a conditional with an assertion in the process)
      
      llvm-svn: 216845
      3fbf3b85
    • Tobias Grosser's avatar
      Fix formatting · 6a4d3f74
      Tobias Grosser authored
      llvm-svn: 216844
      6a4d3f74
    • Tobias Grosser's avatar
      Introduce a typedef for the IDToValue type · 566ad58f
      Tobias Grosser authored
      llvm-svn: 216843
      566ad58f
    • Tobias Grosser's avatar
      Use range based for loops · 1fee67d6
      Tobias Grosser authored
      llvm-svn: 216842
      1fee67d6
  2. Aug 31, 2014
  3. Aug 30, 2014
    • Brad Smith's avatar
      JIT support has been added awhile ago. · e98cdf9b
      Brad Smith authored
      llvm-svn: 216819
      e98cdf9b
    • Hal Finkel's avatar
      Fix AddAliasScopeMetadata to not add scopes when deriving from unknown pointers · a3708df4
      Hal Finkel authored
      The previous implementation of AddAliasScopeMetadata, which adds noalias
      metadata to preserve noalias parameter attribute information when inlining had
      a flaw: it would add alias.scope metadata to accesses which might have been
      derived from pointers other than noalias function parameters. This was
      incorrect because even some access known not to alias with all noalias function
      parameters could easily alias with an access derived from some other pointer.
      Instead, when deriving from some unknown pointer, we cannot add alias.scope
      metadata at all. This fixes a miscompile of the test-suite's tramp3d-v4.
      Furthermore, we cannot add alias.scope to functions unless we know they
      access only argument-derived pointers (currently, we know this only for
      memory intrinsics).
      
      Also, we fix a theoretical problem with using the NoCapture attribute to skip
      the capture check. This is incorrect (as explained in the comment added), but
      would not matter in any code generated by Clang because we get only inferred
      nocapture attributes in Clang-generated IR.
      
      This functionality is not yet enabled by default.
      
      llvm-svn: 216818
      a3708df4
    • David Majnemer's avatar
      InstCombine: Respect recursion depth in visitUDivOperand · 492e612e
      David Majnemer authored
      llvm-svn: 216817
      492e612e
    • Tobias Grosser's avatar
      Always pipe in test files · e7e33ba1
      Tobias Grosser authored
      In Polly we used to have a mix of test cases, some that used 'opt %s' and others
      that used 'opt < %s'. We now change all to use 'opt < %s'. Piping in test files
      is preferable as it does prevent temporary files to be written to disk. This
      brings us in line with what is usus in LLVM.
      
      llvm-svn: 216816
      e7e33ba1
    • Tobias Grosser's avatar
      Replace %defaultOpts with explicit pass names · 2faa569c
      Tobias Grosser authored
      This replaces the use of %defaultOpts = '-basicaa -polly-prepare' with the
      minimal set of passes necessary for a test to succeed. Of the test cases that
      previously used %defaultOpts 76 test cases require none of these passes, 42
      need -basicaa and only 2 need -polly-prepare. Our change makes this requirement
      explicit.
      
      In Polly many test cases have been using a macro '%defaultOpts' which run a
      couple of preparing passes before the actual Polly test case. This macro was
      introduced very early in the development of Polly and originally contained a
      large set of canonicalization passes.  However, as the need for additional
      canonicalization passes makes test cases harder to understand and also more
      fragile in terms of changes in such passes, we aim since a longer time to only
      include the minimal set of passes necessary. This patch removes the last
      leftovers from of %defaultOpts and brings our tests cases more in line to what
      is usus in LLVM itself.
      
      llvm-svn: 216815
      2faa569c
    • David Majnemer's avatar
      InstCombine: Try harder to combine icmp instructions · 5e96f1b4
      David Majnemer authored
      consider: (and (icmp X, Y), (and Z, (icmp A, B)))
      It may be possible to combine (icmp X, Y) with (icmp A, B).
      If we successfully combine, create an 'and' instruction with Z.
      
      This fixes PR20814.
      
      N.B. There is room for improvement after this change but I'm not
      convinced it's worth chasing yet.
      
      llvm-svn: 216814
      5e96f1b4
    • Juergen Ributzka's avatar
      Revert r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR." · 25816b0f
      Juergen Ributzka authored
      I think this broke the build bot. Reverting it for now until I have time to take a closer look.
      
      llvm-svn: 216813
      25816b0f
    • Sean Callanan's avatar
      Fixed a build problem when there were headers · 8c51173d
      Sean Callanan authored
      for a different LLVM present in the system header
      lookup path.
      
      llvm-svn: 216812
      8c51173d
    • Nick Kledzik's avatar
      Add missing const to StringRef.copy() · 38637fb5
      Nick Kledzik authored
      llvm-svn: 216811
      38637fb5