1. Aug 15, 2015
    • Davide Italiano's avatar
      [Sema] Be consistent about diagnostic wording: always use "cannot". · 32cbff78
      Davide Italiano authored
      Discussed with Richard Smith.
      
      llvm-svn: 245162
      32cbff78
    • Yaron Keren's avatar
      Silence VS2015 warning. · 8b2a031c
      Yaron Keren authored
      Patch by James Touton!
      
      http://reviews.llvm.org/D11890
      
      llvm-svn: 245161
      8b2a031c
    • Simon Pilgrim's avatar
      [DAGCombiner] Attempt to mask vectors before zero extension instead of after. · 0750c846
      Simon Pilgrim authored
      For cases where we TRUNCATE and then ZERO_EXTEND to a larger size (often from vector legalization), see if we can mask the source data and then ZERO_EXTEND (instead of after a ANY_EXTEND). This can help avoid having to generate a larger mask, and possibly applying it to several sub-vectors.
      
      (zext (truncate x)) -> (zext (and(x, m))
      
      Includes a minor patch to SystemZ to better recognise 8/16-bit zero extension patterns from RISBG bit-extraction code.
      
      This is the first of a number of minor patches to help improve the conversion of byte masks to clear mask shuffles.
      
      Differential Revision: http://reviews.llvm.org/D11764
      
      llvm-svn: 245160
      0750c846
    • Tobias Grosser's avatar
      AST Generation Paper published in TOPLAS · 234a4827
      Tobias Grosser authored
      The July issue of TOPLAS contains a 50 page discussion of the AST generation
      techniques used in Polly. This discussion gives not only an in-depth
      description of how we (re)generate an imperative AST from our polyhedral based
      mathematical program description, but also gives interesting insights about:
      
      - Schedule trees: A tree-based mathematical program description that enables us
      to perform loop transformations on an abstract level, while issues like the
      generation of the correct loop structure and loop bounds will be taken care of
      by our AST generator.
      
      - Polyhedral unrolling: We discuss techniques that allow the unrolling of
      non-trivial loops in the context of parameteric loop bounds, complex tile
      shapes and conditionally executed statements. Such unrolling support enables
      the generation of predicated code e.g. in the context of GPGPU computing.
      
      - Isolation for full/partial tile separation: We discuss native support for
      handling full/partial tile separation and -- in general -- native support for
      isolation of boundary cases to enable smooth code generation for core
      computations.
      
      - AST generation with modulo constraints: We discuss how modulo mappings are
      lowered to efficient C/LLVM code.
      
      - User-defined constraint sets for run-time checks We discuss how arbitrary
      sets of constraints can be used to automatically create run-time checks that
      ensure a set of constrainst actually hold. This feature is very useful to
      verify at run-time various assumptions that have been taken program
      optimization.
      
      Polyhedral AST generation is more than scanning polyhedra
      Tobias Grosser, Sven Verdoolaege, Albert Cohen
      ACM Transations on Programming Languages and Systems (TOPLAS), 37(4), July 2015
      
      llvm-svn: 245157
      234a4827
    • Tobias Grosser's avatar
      Update link to Polly paper · 4c455425
      Tobias Grosser authored
      By going through my personal website, people can go directly to the paper.
      
      llvm-svn: 245156
      4c455425
    • Chandler Carruth's avatar
      [PM/AA] Delete the LibCallAliasAnalysis and all the associated · e8824e30
      Chandler Carruth authored
      infrastructure.
      
      This AA was never used in tree. It's infrastructure also completely
      overlaps that of TargetLibraryInfo which is used heavily by BasicAA to
      achieve similar goals to those stated for this analysis.
      
      As has come up in several discussions, the use case here is still really
      important, but this code isn't helping move toward that use case. Any
      progress on better supporting rich AA information for runtime library
      environments would likely be better off starting from scratch or
      starting from TargetLibraryInfo than from this base.
      
      Differential Revision: http://reviews.llvm.org/D12028
      
      llvm-svn: 245155
      e8824e30
    • James Y Knight's avatar
      Tiny cleanup: move some Triple variables up to the top of the · 2db38f33
      James Y Knight authored
      function, and remove a duplicate var.
      
      llvm-svn: 245154
      2db38f33
    • David Majnemer's avatar
      [MS ABI] Switch catchpad/cleanuppad to use tokens · e888a2f6
      David Majnemer authored
      llvm-svn: 245153
      e888a2f6
    • David Majnemer's avatar
      [IR] Update CreateCatchRet to take a return value · ad28aaa1
      David Majnemer authored
      llvm-svn: 245152
      ad28aaa1
    • Jason Molenda's avatar
      Update DynamicRegisterInfo::SetRegisterInfo to accept eh_frame register · a3664138
      Jason Molenda authored
      numbers in the key name "ehframe" or "eh_frame" in addition to the deprecated
      "gcc" name (e.g. from a plugin.process.gdb-remote.target-definition-file
      python file).
      
      llvm-svn: 245151
      a3664138
    • Matt Arsenault's avatar
      AMDGPU/SI: Only look at live out SGPR defs · 588732bd
      Matt Arsenault authored
      When trying to fix SGPR live ranges, skip defs that are
      killed in the same block as the def. I don't think
      we need to worry about these cases as long as the
      live ranges of the SGPRs in dominating blocks are
      correct.
      
      This reduces the number of elements the second
      loop over the function needs to look at, and makes
      it generally easier to understand. The second loop
      also only considers if the live range is live
      in to a block, which logically means it
      must have been live out from another.
      
      llvm-svn: 245150
      588732bd
    • David Majnemer's avatar
      [IR] Give catchret an optional 'return value' operand · 0bc0eef7
      David Majnemer authored
      Some personality routines require funclet exit points to be clearly
      marked, this is done by producing a token at the funclet pad and
      consuming it at the corresponding ret instruction.  CleanupReturnInst
      already had a spot for this operand but CatchReturnInst did not.
      Other personality routines don't need to use this which is why it has
      been made optional.
      
      llvm-svn: 245149
      0bc0eef7
    • James Y Knight's avatar
      Remove redundant TargetFrameLowering::getFrameIndexOffset virtual · 5567bafe
      James Y Knight authored
      function.
      
      This was the same as getFrameIndexReference, but without the FrameReg
      output.
      
      Differential Revision: http://reviews.llvm.org/D12042
      
      llvm-svn: 245148
      5567bafe
    • NAKAMURA Takumi's avatar
    • NAKAMURA Takumi's avatar
      clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp: Appease... · 654c2bba
      NAKAMURA Takumi authored
      clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp: Appease targeting MS to give -fno-delayed-template-parsing.
      
      llvm-svn: 245146
      654c2bba
    • NAKAMURA Takumi's avatar
      clangStaticAnalyzerCheckers: Update libdesp. · a0d39dd8
      NAKAMURA Takumi authored
      llvm-svn: 245145
      a0d39dd8
    • NAKAMURA Takumi's avatar
      clangTidyModernizeModule: Update libdeps. · fe745cad
      NAKAMURA Takumi authored
      llvm-svn: 245144
      fe745cad
    • JF Bastien's avatar
      [WebAssembly] Add Relooper · d4698e1b
      JF Bastien authored
      This is just an initial checkin of an implementation of the Relooper algorithm, in preparation for WebAssembly codegen to utilize. It doesn't do anything yet by itself.
      
      The Relooper algorithm takes an arbitrary control flow graph and generates structured control flow from that, utilizing a helper variable when necessary to handle irreducibility. The WebAssembly backend will be able to use this in order to generate an AST for its binary format.
      
      Author: azakai
      
      Reviewers: jfb, sunfish
      
      Subscribers: jevinskie, arsenm, jroelofs, llvm-commits
      
      Differential revision: http://reviews.llvm.org/D11691
      
      llvm-svn: 245142
      d4698e1b
    • Jason Molenda's avatar
      A messy bit of cleanup: Move towards more descriptive names · a18f7071
      Jason Molenda authored
      for eh_frame and stabs register numberings.  This is not
      complete but it's a step in the right direction.  It's almost
      entirely mechanical.
      
      lldb informally uses "gcc register numbering" to mean eh_frame.
      Why?  Probably because there's a notorious bug with gcc on i386
      darwin where the register numbers in eh_frame were incorrect.
      In all other cases, eh_frame register numbering is identical to
      dwarf.
      
      lldb informally uses "gdb register numbering" to mean stabs.
      There are no official definitions of stabs register numbers
      for different architectures, so the implementations of gdb
      and gcc are the de facto reference source.
      
      There were some incorrect uses of these register number types
      in lldb already.  I fixed the ones that I saw as I made
      this change.
      
      This commit changes all references to "gcc" and "gdb" register
      numbers in lldb to "eh_frame" and "stabs" to make it clear 
      what is actually being represented.
      
      lldb cannot parse the stabs debug format, and given that no
      one is using stabs any more, it is unlikely that it ever will.
      A more comprehensive cleanup would remove the stabs register
      numbers altogether - it's unnecessary cruft / complication to
      all of our register structures.
      
      In ProcessGDBRemote, when we get register definitions from
      the gdb-remote stub, we expect to see "gcc:" (qRegisterInfo)
      or "gcc_regnum" (qXfer:features:read: packet to get xml payload).
      This patch changes ProcessGDBRemote to also accept "ehframe:"
      and "ehframe_regnum" from these remotes.
      
      I did not change GDBRemoteCommunicationServerLLGS or debugserver
      to send these new packets.  I don't know what kind of interoperability
      constraints we might be working under.  At some point in the future
      we should transition to using the more descriptive names.
      
      Throughout lldb we're still using enum names like "gcc_r0" and "gdb_r0",
      for eh_frame and stabs register numberings.  These should be cleaned
      up eventually too.
      
      The sources link cleanly on macosx native with xcode build.  I
      don't think we'll see problems on other platforms but please let
      me know if I broke anyone.
      
      llvm-svn: 245141
      a18f7071
    • JF Bastien's avatar
      Accelerate MergeFunctions with hashing · 5e4303dc
      JF Bastien authored
      This patch makes the Merge Functions pass faster by calculating and comparing
      a hash value which captures the essential structure of a function before
      performing a full function comparison.
      
      The hash is calculated by hashing the function signature, then walking the basic
      blocks of the function in the same order as the main comparison function. The
      opcode of each instruction is hashed in sequence, which means that different
      functions according to the existing total order cannot have the same hash, as
      the comparison requires the opcodes of the two functions to be the same order.
      
      The hash function is a static member of the FunctionComparator class because it
      is tightly coupled to the exact comparison function used. For example, functions
      which are equivalent modulo a single variant callsite might be merged by a more
      aggressive MergeFunctions, and the hash function would need to be insensitive to
      these differences in order to exploit this.
      
      The hashing function uses a utility class which accumulates the values into an
      internal state using a standard bit-mixing function. Note that this is a different interface
      than a regular hashing routine, because the values to be hashed are scattered
      amongst the properties of a llvm::Function, not linear in memory. This scheme is
      fast because only one word of state needs to be kept, and the mixing function is
      a few instructions.
      
      The main runOnModule function first computes the hash of each function, and only
      further processes functions which do not have a unique function hash. The hash
      is also used to order the sorted function set. If the hashes differ, their
      values are used to order the functions, otherwise the full comparison is done.
      
      Both of these are helpful in speeding up MergeFunctions. Together they result in
      speedups of 9% for mysqld (a mostly C application with little redundancy), 46%
      for libxul in Firefox, and 117% for Chromium. (These are all LTO builds.) In all
      three cases, the new speed of MergeFunctions is about half that of the module
      verifier, making it relatively inexpensive even for large LTO builds with
      hundreds of thousands of functions. The same functions are merged, so this
      change is free performance.
      
      Author: jrkoenig
      
      Reviewers: nlewycky, dschuff, jfb
      
      Subscribers: llvm-commits, aemerson
      
      Differential revision: http://reviews.llvm.org/D11923
      
      llvm-svn: 245140
      5e4303dc
    • Hans Wennborg's avatar
      Delay emitting members of dllexport classes until the class is fully parsed (PR23542) · 99000c24
      Hans Wennborg authored
      This enables Clang to correctly handle code such as:
      
        struct __declspec(dllexport) S {
          int x = 42;
        };
      
      where it would otherwise error due to trying to generate the default
      constructor before the in-class initializer for x has been parsed.
      
      Differential Revision: http://reviews.llvm.org/D11850
      
      llvm-svn: 245139
      99000c24
    • Alex Lorenz's avatar
      3a4a60cb
    • Matt Arsenault's avatar
      LoopStrengthReduce: Try to pass address space to isLegalAddressingMode · 427a0fd2
      Matt Arsenault authored
      This seems to only work some of the time. In some situations,
      this seems to use a nonsensical type and isn't actually aware of the
      memory being accessed. e.g. if branch condition is an icmp of a pointer,
      it checks the addressing mode of i1.
      
      llvm-svn: 245137
      427a0fd2
    • Richard Smith's avatar
      [modules] Stop dropping 'module.timestamp' files into the current directory · 3938f0c7
      Richard Smith authored
      when building with implicit modules disabled.
      
      llvm-svn: 245136
      3938f0c7
    • Matt Arsenault's avatar
      AMDGPU/SI: Fix printing useless info with amdhsa · 297ae311
      Matt Arsenault authored
      The comments at the bottom would all report 0 if
      amdhsa was used.
      
      llvm-svn: 245135
      297ae311
    • Matt Arsenault's avatar
      AMDGPU/SI: Update LiveVariables · 0259a7aa
      Matt Arsenault authored
      This is simple but won't work if/when this pass
      is moved to be post-SSA.
      
      llvm-svn: 245134
      0259a7aa
    • Matt Arsenault's avatar
      AMDGPU/SI: Update LiveIntervals during SIFixSGPRLiveRanges · 670ba46e
      Matt Arsenault authored
      Does not mark SlotIndexes as reserved, although I think
      that might be OK.
      
      LiveVariables still need to be handled.
      
      llvm-svn: 245133
      670ba46e
    • Matt Arsenault's avatar
      AMDGPU: Remove unnecessary assert · b7523323
      Matt Arsenault authored
      These shouldn't ever be null. The number of successors
      was already asserted to be 2.
      
      llvm-svn: 245132
      b7523323
    • Matt Arsenault's avatar
      AMDGPU/SI: Make comments more precise. · 4275c29a
      Matt Arsenault authored
      True branch instructions do behave as expected with liveness.
      
      Avoid the phrasing "branch decision is based on a value in an SGPR"
      because this could be misleading. A VALU compare instruction's
      result is still based on an SGPR, even though that condition
      may be divergent.
      
      llvm-svn: 245131
      4275c29a
    • Jason Molenda's avatar
      There is no such thing as gdb_arm_f8, this register set is f0-f7. · 650cc3df
      Jason Molenda authored
      Remove this entry and adjust the numbering for the rest of the arm
      register definitions.
      
      llvm-svn: 245130
      650cc3df
    • Oleksiy Vyalov's avatar
      Fix Android build. · c24da69e
      Oleksiy Vyalov authored
      llvm-svn: 245129
      c24da69e
    • Zachary Turner's avatar
      Enable settings test for i686 as well as i386. · 398f9ed9
      Zachary Turner authored
      llvm-svn: 245128
      398f9ed9
    • Zachary Turner's avatar
      Make skipUnlessArch decorator actually skip instead of XFAIL. · 793d9975
      Zachary Turner authored
      llvm-svn: 245127
      793d9975
    • Zachary Turner's avatar
      XFAIL some data formatter tests on Windows. · 6e19fe99
      Zachary Turner authored
      Fixing these bugs is tracked by http://llvm.org/pr24462.
      
      llvm-svn: 245126
      6e19fe99
    • Zachary Turner's avatar
      Disable libstdc++ and libcxx data formatter tests on Windows. · c714b074
      Zachary Turner authored
      Neither of these libraries has been ported to Windows.  Eventually
      if they are ever ported we can re-enable these tests.  But more
      immediately what we need to do is add new data formatters for
      MSVC's STL implementation.  This is tracked in
      http://llvm.org/pr24460.
      
      llvm-svn: 245125
      c714b074
    • Naomi Musgrave's avatar
      clarified test comment · b9b46f5a
      Naomi Musgrave authored
      llvm-svn: 245124
      b9b46f5a
    • Nathan Wilson's avatar
      [CONCEPTS] Add diagnostic; invalid tag when concept specified · b20ab924
      Nathan Wilson authored
      Summary: Adding check to emit diagnostic for invalid tag when concept is specified and associated tests.
      
      Reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman
      
      Subscribers: aaron.ballman, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D11916
      
      llvm-svn: 245123
      b20ab924
    • Greg Clayton's avatar
      Unbreak the windows and linux buildbots. · 56de8a4b
      Greg Clayton authored
      llvm-svn: 245122
      56de8a4b
    • Greg Clayton's avatar
      Don't crash if we don't have a type system for a language. · 360dac7d
      Greg Clayton authored
      llvm-svn: 245121
      360dac7d
    • Sanjay Patel's avatar
      7332e045