Skip to content
  1. Nov 02, 2011
  2. Nov 01, 2011
  3. Oct 31, 2011
  4. Oct 30, 2011
  5. Oct 29, 2011
  6. Oct 28, 2011
    • Dan Gohman's avatar
      Reapply r143177 and r143179 (reverting r143188), with scheduler · 73057ad2
      Dan Gohman authored
      fixes: Use a separate register, instead of SP, as the
      calling-convention resource, to avoid spurious conflicts with
      actual uses of SP. Also, fix unscheduling of calling sequences,
      which can be triggered by pseudo-two-address dependencies.
      
      llvm-svn: 143206
      73057ad2
    • NAKAMURA Takumi's avatar
      Dwarf: [PR11022] Fix emitting DW_AT_const_value(>i64), to be host-endian-neutral. · 29ccdd82
      NAKAMURA Takumi authored
      Don't assume APInt::getRawData() would hold target-aware endianness nor host-compliant endianness. rawdata[0] holds most lower i64, even on big endian host.
      
      FIXME: Add a testcase for big endian target.
      
      FIXME: Ditto on CompileUnit::addConstantFPValue() ?
      llvm-svn: 143194
      29ccdd82
    • Benjamin Kramer's avatar
      Use BranchProbability compare operators. · 47c3f2d6
      Benjamin Kramer authored
      llvm-svn: 143190
      47c3f2d6
    • Duncan Sands's avatar
      Speculatively disable Dan's commits 143177 and 143179 to see if · 225a7037
      Duncan Sands authored
      it fixes the dragonegg self-host (it looks like gcc is miscompiled).
      Original commit messages:
      Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW
      on every node as it legalizes them. This makes it easier to use
      hasOneUse() heuristics, since unneeded nodes can be removed from the
      DAG earlier.
      
      Make LegalizeOps visit the DAG in an operands-last order. It previously
      used operands-first, because LegalizeTypes has to go operands-first, and
      LegalizeTypes used to be part of LegalizeOps, but they're now split.
      The operands-last order is more natural for several legalization tasks.
      For example, it allows lowering code for nodes with floating-point or
      vector constants to see those constants directly instead of seeing the
      lowered form (often constant-pool loads). This makes some things
      somewhat more complicated today, though it ought to allow things to be
      simpler in the future. It also fixes some bugs exposed by Legalizing
      using RAUW aggressively.
      
      Remove the part of LegalizeOps that attempted to patch up invalid chain
      operands on libcalls generated by LegalizeTypes, since it doesn't work
      with the new LegalizeOps traversal order. Instead, define what
      LegalizeTypes is doing to be correct, and transfer the responsibility
      of keeping calls from having overlapping calling sequences into the
      scheduler.
      
      Teach the scheduler to model callseq_begin/end pairs as having a
      physical register definition/use to prevent calls from having
      overlapping calling sequences. This is also somewhat complicated, though
      there are ways it might be simplified in the future.
      
      This addresses rdar://9816668, rdar://10043614, rdar://8434668, and others.
      Please direct high-level questions about this patch to management.
      
      Delete #if 0 code accidentally left in.
      
      llvm-svn: 143188
      225a7037
    • Nick Lewycky's avatar
      Always use the string pool, even when it makes the .o larger. This may help · cc64ae14
      Nick Lewycky authored
      tools that read the debug info in the .o files by making the DIE sizes more
      consistent.
      
      llvm-svn: 143186
      cc64ae14
    • Dan Gohman's avatar
      Delete #if 0 code accidentally left in. · 0e8d1454
      Dan Gohman authored
      llvm-svn: 143179
      0e8d1454
    • Dan Gohman's avatar
      Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW · 4db3f7dd
      Dan Gohman authored
      on every node as it legalizes them. This makes it easier to use
      hasOneUse() heuristics, since unneeded nodes can be removed from the
      DAG earlier.
      
      Make LegalizeOps visit the DAG in an operands-last order. It previously
      used operands-first, because LegalizeTypes has to go operands-first, and
      LegalizeTypes used to be part of LegalizeOps, but they're now split.
      The operands-last order is more natural for several legalization tasks.
      For example, it allows lowering code for nodes with floating-point or
      vector constants to see those constants directly instead of seeing the
      lowered form (often constant-pool loads). This makes some things
      somewhat more complicated today, though it ought to allow things to be
      simpler in the future. It also fixes some bugs exposed by Legalizing
      using RAUW aggressively.
      
      Remove the part of LegalizeOps that attempted to patch up invalid chain
      operands on libcalls generated by LegalizeTypes, since it doesn't work
      with the new LegalizeOps traversal order. Instead, define what
      LegalizeTypes is doing to be correct, and transfer the responsibility
      of keeping calls from having overlapping calling sequences into the
      scheduler.
      
      Teach the scheduler to model callseq_begin/end pairs as having a
      physical register definition/use to prevent calls from having
      overlapping calling sequences. This is also somewhat complicated, though
      there are ways it might be simplified in the future.
      
      This addresses rdar://9816668, rdar://10043614, rdar://8434668, and others.
      Please direct high-level questions about this patch to management.
      
      llvm-svn: 143177
      4db3f7dd
  7. Oct 27, 2011
  8. Oct 26, 2011
    • Duncan Sands's avatar
      Simplify SplitVecRes_UnaryOp by removing all the code that is · dce448c6
      Duncan Sands authored
      trying to legalize the operand types when only the result type
      is required to be legalized - the type legalization machinery
      will get round to the operands later if they need legalizing.
      There can be a point to legalizing operands in parallel with
      the result: when this saves compile time or results in better
      code.  There was only one case in which this was true: when
      the operand is also split, so keep the logic for that bit.
      As a result of this change, additional operand legalization
      methods may need to be introduced to handle nodes where the
      result and operand types can differ, like SIGN_EXTEND, but
      the testsuite doesn't contain any tests where this is the case.
      In any case, it seems better to require such methods (and die
      with an assert if they doesn't exist) than to quietly produce
      wrong code if we forgot to special case the node in
      SplitVecRes_UnaryOp.
      
      llvm-svn: 143026
      dce448c6
    • Jakob Stoklund Olesen's avatar
      Don't use floating point to do an integer's job. · e8261a22
      Jakob Stoklund Olesen authored
      This code makes different decisions when compiled into x87 instructions
      because of different rounding behavior.  That caused phase 2/3
      miscompares on 32-bit Linux when the phase 1 compiler was built with gcc
      (using x87), and the phase 2 compiler was built with clang (using SSE).
      
      This fixes PR11200.
      
      llvm-svn: 143006
      e8261a22
    • Evan Cheng's avatar
      Disable LICM speculation in high register pressure situation again now that... · 7313337c
      Evan Cheng authored
      Disable LICM speculation in high register pressure situation again now that Devang has fixed other issues.
      
      llvm-svn: 143003
      7313337c
    • Bill Wendling's avatar
      Reapply r142920 with fix: · 9b993222
      Bill Wendling authored
      An MBB which branches to an EH landing pad shouldn't be considered for tail merging.
      
      In SjLj EH, the jump to the landing pad is not done explicitly through a branch
      statement. The EH landing pad is added as a successor to the throwing
      BB. Because of that however, the branch folding pass could mistakenly think that
      it could merge the throwing BB with another BB. This isn't safe to do.
      <rdar://problem/10334833>
      
      llvm-svn: 143001
      9b993222
  9. Oct 25, 2011
  10. Oct 24, 2011
  11. Oct 23, 2011
    • Chandler Carruth's avatar
      Now that we have comparison on probabilities, add some static functions · fd7475e9
      Chandler Carruth authored
      to get important constant branch probabilities and use them for finding
      the best branch out of a set of possibilities.
      
      llvm-svn: 142762
      fd7475e9
    • Chandler Carruth's avatar
      Remove a commented out line of code that snuck by my auditing. · 446210b6
      Chandler Carruth authored
      llvm-svn: 142761
      446210b6
    • Chandler Carruth's avatar
      Completely re-write the algorithm behind MachineBlockPlacement based on · bd1be4d0
      Chandler Carruth authored
      discussions with Andy. Fundamentally, the previous algorithm is both
      counter productive on several fronts and prioritizing things which
      aren't necessarily the most important: static branch prediction.
      
      The new algorithm uses the existing loop CFG structure information to
      walk through the CFG itself to layout blocks. It coalesces adjacent
      blocks within the loop where the CFG allows based on the most likely
      path taken. Finally, it topologically orders the block chains that have
      been formed. This allows it to choose a (mostly) topologically valid
      ordering which still priorizes fallthrough within the structural
      constraints.
      
      As a final twist in the algorithm, it does violate the CFG when it
      discovers a "hot" edge, that is an edge that is more than 4x hotter than
      the competing edges in the CFG. These are forcibly merged into
      a fallthrough chain.
      
      Future transformations that need te be added are rotation of loop exit
      conditions to be fallthrough, and better isolation of cold block chains.
      I'm also planning on adding statistics to model how well the algorithm
      does at laying out blocks based on the probabilities it receives.
      
      The old tests mostly still pass, and I have some new tests to add, but
      the nested loops are still behaving very strangely. This almost seems
      like working-as-intended as it rotated the exit branch to be
      fallthrough, but I'm not convinced this is actually the best layout. It
      is well supported by the probabilities for loops we currently get, but
      those are pretty broken for nested loops, so this may change later.
      
      llvm-svn: 142743
      bd1be4d0
Loading