Skip to content
  1. Aug 17, 2015
    • James Molloy's avatar
      Rip out hand-rolled matching code for VMIN, VMAX, VMINNM and VMAXNM · c617be55
      James Molloy authored
      This is no longer needed - SDAGBuilder will do this for us.
      
      llvm-svn: 245197
      c617be55
    • James Molloy's avatar
      Generate FMINNAN/FMINNUM/FMAXNAN/FMAXNUM from SDAGBuilder. · ef183397
      James Molloy authored
      These only get generated if the target supports them. If one of the variants is not legal and the other is, and it is safe to do so, the other variant will be emitted.
      
      For example on AArch32 (V8), we have scalar fminnm but not fmin.
      
      Fix up a couple of tests while we're here - one now produces better code, and the other was just plain wrong to start with.
      
      llvm-svn: 245196
      ef183397
    • Karthik Bhat's avatar
      Fix PR24469 resulting from r245025 and re-enable dead store elimination across basicblocks. · 3af28945
      Karthik Bhat authored
      PR24469 resulted because DeleteDeadInstruction in handleNonLocalStoreDeletion was
      deleting the next basic block iterator. Fixed the same by resetting the basic block iterator
      post call to DeleteDeadInstruction.
      
      llvm-svn: 245195
      3af28945
    • David Majnemer's avatar
      Revert "[InstCombinePHI] Partial simplification of identity operations." · 8ed559ad
      David Majnemer authored
      This reverts commit r244887, it caused PR24470.
      
      llvm-svn: 245194
      8ed559ad
    • Chandler Carruth's avatar
      [PM] Port ScalarEvolution to the new pass manager. · 2f1fd165
      Chandler Carruth authored
      This change makes ScalarEvolution a stand-alone object and just produces
      one from a pass as needed. Making this work well requires making the
      object movable, using references instead of overwritten pointers in
      a number of places, and other refactorings.
      
      I've also wired it up to the new pass manager and added a RUN line to
      a test to exercise it under the new pass manager. This includes basic
      printing support much like with other analyses.
      
      But there is a big and somewhat scary change here. Prior to this patch
      ScalarEvolution was never *actually* invalidated!!! Re-running the pass
      just re-wired up the various other analyses and didn't remove any of the
      existing entries in the SCEV caches or clear out anything at all. This
      might seem OK as everything in SCEV that can uses ValueHandles to track
      updates to the values that serve as SCEV keys. However, this still means
      that as we ran SCEV over each function in the module, we kept
      accumulating more and more SCEVs into the cache. At the end, we would
      have a SCEV cache with every value that we ever needed a SCEV for in the
      entire module!!! Yowzers. The releaseMemory routine would dump all of
      this, but that isn't realy called during normal runs of the pipeline as
      far as I can see.
      
      To make matters worse, there *is* actually a key that we don't update
      with value handles -- there is a map keyed off of Loop*s. Because
      LoopInfo *does* release its memory from run to run, it is entirely
      possible to run SCEV over one function, then over another function, and
      then lookup a Loop* from the second function but find an entry inserted
      for the first function! Ouch.
      
      To make matters still worse, there are plenty of updates that *don't*
      trip a value handle. It seems incredibly unlikely that today GVN or
      another pass that invalidates SCEV can update values in *just* such
      a way that a subsequent run of SCEV will incorrectly find lookups in
      a cache, but it is theoretically possible and would be a nightmare to
      debug.
      
      With this refactoring, I've fixed all this by actually destroying and
      recreating the ScalarEvolution object from run to run. Technically, this
      could increase the amount of malloc traffic we see, but then again it is
      also technically correct. ;] I don't actually think we're suffering from
      tons of malloc traffic from SCEV because if we were, the fact that we
      never clear the memory would seem more likely to have come up as an
      actual problem before now. So, I've made the simple fix here. If in fact
      there are serious issues with too much allocation and deallocation,
      I can work on a clever fix that preserves the allocations (while
      clearing the data) between each run, but I'd prefer to do that kind of
      optimization with a test case / benchmark that shows why we need such
      cleverness (and that can test that we actually make it faster). It's
      possible that this will make some things faster by making the SCEV
      caches have higher locality (due to being significantly smaller) so
      until there is a clear benchmark, I think the simple change is best.
      
      Differential Revision: http://reviews.llvm.org/D12063
      
      llvm-svn: 245193
      2f1fd165
    • Chandler Carruth's avatar
      [ADT] Teach FoldingSet to be movable. · b596ba23
      Chandler Carruth authored
      This is a very minimal move support - it leaves the moved-from object in
      a zombie state that is only valid for destruction and move assignment.
      This seems fine to me, and leaving it in the default constructed state
      would require adding more state to the object and potentially allocating
      memory (!!!) and so seems like a Bad Idea.
      
      llvm-svn: 245192
      b596ba23
  2. Aug 16, 2015
  3. Aug 15, 2015
    • Yaron Keren's avatar
      Try to appease VS 2015 warnings from http://reviews.llvm.org/D11890 · dfb655fe
      Yaron Keren authored
      ByteSize and BitSize should not be size_t but unsigned, considering
      
      1) They are at most 2^16 and 2^19, respectively.
      2) BitSize is an argument to Type::getIntNTy which takes unsigned.
      
      Also, use the correct utostr instead itostr and cache the string result.
      
      Thanks to James Touton for reporting this!
      
      llvm-svn: 245167
      dfb655fe
    • Sanjay Patel's avatar
    • Simon Pilgrim's avatar
      d65ace84
    • Sanjay Patel's avatar
      fix typos; NFC · 3b7e3677
      Sanjay Patel authored
      llvm-svn: 245164
      3b7e3677
    • Sanjay Patel's avatar
      add test case to show current codegen · 9f6c7ddd
      Sanjay Patel authored
      llvm-svn: 245163
      9f6c7ddd
    • 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
Loading