Skip to content
  1. Apr 23, 2012
  2. Apr 22, 2012
  3. Apr 21, 2012
    • Nadav Rotem's avatar
    • Jakob Stoklund Olesen's avatar
      Fix PR12599. · d114da60
      Jakob Stoklund Olesen authored
      The X86 target is editing the selection DAG while isel is selecting
      nodes following a topological ordering. When the DAG hacking triggers
      CSE, nodes can be deleted and bad things happen.
      
      llvm-svn: 155257
      d114da60
    • Jakob Stoklund Olesen's avatar
      Make ISelPosition a local variable. · e3a891cf
      Jakob Stoklund Olesen authored
      Now that multiple DAGUpdateListeners can be active at the same time,
      ISelPosition can become a local variable in DoInstructionSelection.
      
      We simply register an ISelUpdater with CurDAG while ISelPosition exists.
      
      llvm-svn: 155249
      e3a891cf
    • Jakob Stoklund Olesen's avatar
      Register DAGUpdateListeners with SelectionDAG. · beb9469d
      Jakob Stoklund Olesen authored
      Instead of passing listener pointers to RAUW, let SelectionDAG itself
      keep a linked list of interested listeners.
      
      This makes it possible to have multiple listeners active at once, like
      RAUWUpdateListener was already doing. It also makes it possible to
      register listeners up the call stack without controlling all RAUW calls
      below.
      
      DAGUpdateListener uses an RAII pattern to add itself to the SelectionDAG
      list of active listeners.
      
      llvm-svn: 155248
      beb9469d
  4. Apr 20, 2012
    • Jakob Stoklund Olesen's avatar
      Print <def,read-undef> to avoid confusion. · 7111a630
      Jakob Stoklund Olesen authored
      The <undef> flag on a def operand only applies to partial register
      redefinitions. Only print the flag when relevant, and print it as
      <def,read-undef> to make it clearer what it means.
      
      llvm-svn: 155239
      7111a630
    • Andrew Trick's avatar
      New and improved comment. · 51ee9361
      Andrew Trick authored
      llvm-svn: 155229
      51ee9361
    • Andrew Trick's avatar
      SparseSet: Add support for key-derived indexes and arbitrary key types. · 1eb4a0da
      Andrew Trick authored
      This nicely handles the most common case of virtual register sets, but
      also handles anticipated cases where we will map pointers to IDs.
      
      The goal is not to develop a completely generic SparseSet
      template. Instead we want to handle the expected uses within llvm
      without any template antics in the client code. I'm adding a bit of
      template nastiness here, and some assumption about expected usage in
      order to make the client code very clean.
      
      The expected common uses cases I'm designing for:
      - integer keys that need to be reindexed, and may map to additional
        data
      - densely numbered objects where we want pointer keys because no
        number->object map exists.
      
      llvm-svn: 155227
      1eb4a0da
    • Andrew Trick's avatar
      misched: initialize BB · 7405c6d5
      Andrew Trick authored
      llvm-svn: 155226
      7405c6d5
  5. Apr 19, 2012
  6. Apr 18, 2012
    • Chandler Carruth's avatar
      This reverts a long string of commits to the Hexagon backend. These · b415bf98
      Chandler Carruth authored
      commits have had several major issues pointed out in review, and those
      issues are not being addressed in a timely fashion. Furthermore, this
      was all committed leading up to the v3.1 branch, and we don't need piles
      of code with outstanding issues in the branch.
      
      It is possible that not all of these commits were necessary to revert to
      get us back to a green state, but I'm going to let the Hexagon
      maintainer sort that out. They can recommit, in order, after addressing
      the feedback.
      
      Reverted commits, with some notes:
      
      Primary commit r154616: HexagonPacketizer
        - There are lots of review comments here. This is the primary reason
          for reverting. In particular, it introduced large amount of warnings
          due to a bad construct in tablegen.
        - Follow-up commits that should be folded back into this when
          reposting:
          - r154622: CMake fixes
          - r154660: Fix numerous build warnings in release builds.
        - Please don't resubmit this until the three commits above are
          included, and the issues in review addressed.
      
      Primary commit r154695: Pass to replace transfer/copy ...
        - Reverted to minimize merge conflicts. I'm not aware of specific
          issues with this patch.
      
      Primary commit r154703: New Value Jump.
        - Primarily reverted due to merge conflicts.
        - Follow-up commits that should be folded back into this when
          reposting:
          - r154703: Remove iostream usage
          - r154758: Fix CMake builds
          - r154759: Fix build warnings in release builds
        - Please incorporate these fixes and and review feedback before
          resubmitting.
      
      Primary commit r154829: Hexagon V5 (floating point) support.
        - Primarily reverted due to merge conflicts.
        - Follow-up commits that should be folded back into this when
          reposting:
          - r154841: Remove unused variable (fixing build warnings)
      
      There are also accompanying Clang commits that will be reverted for
      consistency.
      
      llvm-svn: 155047
      b415bf98
    • Pete Cooper's avatar
      LiveIntervalUpdate validators weren't recorded after the calls to... · 8998657c
      Pete Cooper authored
      LiveIntervalUpdate validators weren't recorded after the calls to std::for_each.  Turns out std::for_each doesn't update the variable passed in for the functor but instead copy constructs a new one.
      
      llvm-svn: 155041
      8998657c
    • Joel Jones's avatar
      Fixes a problem in instruction selection with testing whether or not the · 828531f7
      Joel Jones authored
      transformation:
      
      (X op C1) ^ C2 --> (X op C1) & ~C2 iff (C1&C2) == C2
      
      should be done.  
      
      This change has been tested:
       Using a debug+asserts build:
         on the specific test case that brought this bug to light
         make check-all
         lnt nt
         using this clang to build a release version of clang
       Using the release+asserts clang-with-clang build:
         on the specific test case that brought this bug to light
         make check-all
         lnt nt
      
      Checking in because Evan wants it checked in.  Test case forthcoming after
      scrubbing.
      
      llvm-svn: 154955
      828531f7
  7. Apr 17, 2012
    • Lang Hames's avatar
      SlotIndexes used to store the index list in a crufty custom linked-list. I can't · aef91783
      Lang Hames authored
      for the life of me remember why I wrote it this way, but I can't see any good
      reason for it now. This patch replaces the custom linked list with an ilist.
      
      This change should preserve the existing numberings exactly, so no generated code
      should change (if it does, file a bug!).
      
      llvm-svn: 154904
      aef91783
    • Eric Christopher's avatar
      Make comment here more clear. · a8caa739
      Eric Christopher authored
      llvm-svn: 154878
      a8caa739
    • Chandler Carruth's avatar
      Fix updateTerminator to be resiliant to degenerate terminators where · 1f5580b6
      Chandler Carruth authored
      both fallthrough and a conditional branch target the same successor.
      Gracefully delete the conditional branch and introduce any unconditional
      branch needed to reach the actual successor. This fixes memory
      corruption in 2009-06-15-RegScavengerAssert.ll and possibly other tests.
      
      Also, while I'm here fix a latent bug I spotted by inspection. I never
      applied the same fundamental fix to this fallthrough successor finding
      logic that I did to the logic used when there are no conditional
      branches. As a consequence it would have selected landing pads had they
      be aligned in just the right way here. I don't have a test case as
      I spotted this by inspection, and the previous time I found this
      required have of TableGen's source code to produce it. =/ I hate backend
      bugs. ;]
      
      Thanks to Jim Grosbach for helping me reason through this and reviewing
      the fix.
      
      llvm-svn: 154867
      1f5580b6
  8. Apr 16, 2012
    • Chandler Carruth's avatar
      Flip the new block-placement pass to be on by default. · 4190b507
      Chandler Carruth authored
      This is mostly to test the waters. I'd like to get results from FNT
      build bots and other bots running on non-x86 platforms.
      
      This feature has been pretty heavily tested over the last few months by
      me, and it fixes several of the execution time regressions caused by the
      inlining work by preventing inlining decisions from radically impacting
      block layout.
      
      I've seen very large improvements in yacr2 and ackermann benchmarks,
      along with the expected noise across all of the benchmark suite whenever
      code layout changes. I've analyzed all of the regressions and fixed
      them, or found them to be impossible to fix. See my email to llvmdev for
      more details.
      
      I'd like for this to be in 3.1 as it complements the inliner changes,
      but if any failures are showing up or anyone has concerns, it is just
      a flag flip and so can be easily turned off.
      
      I'm switching it on tonight to try and get at least one run through
      various folks' performance suites in case SPEC or something else has
      serious issues with it. I'll watch bots and revert if anything shows up.
      
      llvm-svn: 154816
      4190b507
    • Chandler Carruth's avatar
      Add a somewhat hacky heuristic to do something different from whole-loop · 8c0b41d6
      Chandler Carruth authored
      rotation. When there is a loop backedge which is an unconditional
      branch, we will end up with a branch somewhere no matter what. Try
      placing this backedge in a fallthrough position above the loop header as
      that will definitely remove at least one branch from the loop iteration,
      where whole loop rotation may not.
      
      I haven't seen any benchmarks where this is important but loop-blocks.ll
      tests for it, and so this will be covered when I flip the default.
      
      llvm-svn: 154812
      8c0b41d6
    • Chandler Carruth's avatar
      Tweak the loop rotation logic to check whether the loop is naturally · 8c74c7b1
      Chandler Carruth authored
      laid out in a form with a fallthrough into the header and a fallthrough
      out of the bottom. In that case, leave the loop alone because any
      rotation will introduce unnecessary branches. If either side looks like
      it will require an explicit branch, then the rotation won't add any, do
      it to ensure the branch occurs outside of the loop (if possible) and
      maximize the benefit of the fallthrough in the bottom.
      
      llvm-svn: 154806
      8c74c7b1
    • Hal Finkel's avatar
      Remove dead SD nodes after the combining pass. Fixes PR12201. · e0cf6397
      Hal Finkel authored
      llvm-svn: 154786
      e0cf6397
    • Chandler Carruth's avatar
      Rewrite how machine block placement handles loop rotation. · ccc7e42b
      Chandler Carruth authored
      This is a complex change that resulted from a great deal of
      experimentation with several different benchmarks. The one which proved
      the most useful is included as a test case, but I don't know that it
      captures all of the relevant changes, as I didn't have specific
      regression tests for each, they were more the result of reasoning about
      what the old algorithm would possibly do wrong. I'm also failing at the
      moment to craft more targeted regression tests for these changes, if
      anyone has ideas, it would be welcome.
      
      The first big thing broken with the old algorithm is the idea that we
      can take a basic block which has a loop-exiting successor and a looping
      successor and use the looping successor as the layout top in order to
      get that particular block to be the bottom of the loop after layout.
      This happens to work in many cases, but not in all.
      
      The second big thing broken was that we didn't try to select the exit
      which fell into the nearest enclosing loop (to which we exit at all). As
      a consequence, even if the rotation worked perfectly, it would result in
      one of two bad layouts. Either the bottom of the loop would get
      fallthrough, skipping across a nearer enclosing loop and thereby making
      it discontiguous, or it would be forced to take an explicit jump over
      the nearest enclosing loop to earch its successor. The point of the
      rotation is to get fallthrough, so we need it to fallthrough to the
      nearest loop it can.
      
      The fix to the first issue is to actually layout the loop from the loop
      header, and then rotate the loop such that the correct exiting edge can
      be a fallthrough edge. This is actually much easier than I anticipated
      because we can handle all the hard parts of finding a viable rotation
      before we do the layout. We just store that, and then rotate after
      layout is finished. No inner loops get split across the post-rotation
      backedge because we check for them when selecting the rotation.
      
      That fix exposed a latent problem with our exitting block selection --
      we should allow the backedge to point into the middle of some inner-loop
      chain as there is no real penalty to it, the whole point is that it
      *won't* be a fallthrough edge. This may have blocked the rotation at all
      in some cases, I have no idea and no test case as I've never seen it in
      practice, it was just noticed by inspection.
      
      Finally, all of these fixes, and studying the loops they produce,
      highlighted another problem: in rotating loops like this, we sometimes
      fail to align the destination of these backwards jumping edges. Fix this
      by actually walking the backwards edges rather than relying on loopinfo.
      
      This fixes regressions on heapsort if block placement is enabled as well
      as lots of other cases where the previous logic would introduce an
      abundance of unnecessary branches into the execution.
      
      llvm-svn: 154783
      ccc7e42b
  9. Apr 15, 2012
  10. Apr 14, 2012
    • Andrew Trick's avatar
      misched: Added CanHandleTerminators. · 97d5b9cc
      Andrew Trick authored
      This is a special flag for targets that really want their block
      terminators in the DAG. The default scheduler cannot handle this
      correctly, so it becomes the specialized scheduler's responsibility to
      schedule terminators.
      
      llvm-svn: 154712
      97d5b9cc
  11. Apr 13, 2012
    • Benjamin Kramer's avatar
      Reduce malloc traffic in DwarfAccelTable · 330970d6
      Benjamin Kramer authored
      - Don't copy offsets into HashData, the underlying vector won't change once the table is finalized.
      - Allocate HashData and HashDataContents in a BumpPtrAllocator.
      - Allocate string map entries in the same allocator.
      - Random cleanups.
      
      llvm-svn: 154694
      330970d6
  12. Apr 12, 2012
  13. Apr 11, 2012
  14. Apr 10, 2012
Loading