Skip to content
  1. May 05, 2012
    • Benjamin Kramer's avatar
      Update all outdated autoconf files in the sample project. · 6764af97
      Benjamin Kramer authored
      We might just use symlinks here, but I'm afraid of possible portability issues.
      
      llvm-svn: 156235
      6764af97
    • Benjamin Kramer's avatar
      CodeGenPrepare: Add a transform to turn selects into branches in some cases. · 047d7ca0
      Benjamin Kramer authored
      This came up when a change in block placement formed a cmov and slowed down a
      hot loop by 50%:
      
      	ucomisd	(%rdi), %xmm0
      	cmovbel	%edx, %esi
      
      cmov is a really bad choice in this context because it doesn't get branch
      prediction. If we emit it as a branch, an out-of-order CPU can do a better job
      (if the branch is predicted right) and avoid waiting for the slow load+compare
      instruction to finish. Of course it won't help if the branch is unpredictable,
      but those are really rare in practice.
      
      This patch uses a dumb conservative heuristic, it turns all cmovs that have one
      use and a direct memory operand into branches. cmovs usually save some code
      size, so we disable the transform in -Os mode. In-Order architectures are
      unlikely to benefit as well, those are included in the
      "predictableSelectIsExpensive" flag.
      
      It would be better to reuse branch probability info here, but BPI doesn't
      support select instructions currently. It would make sense to use the same
      heuristics as the if-converter pass, which does the opposite direction of this
      transform.
      
      
      Test suite shows a small improvement here and there on corei7-level machines,
      but the actual results depend a lot on the used microarchitecture. The
      transformation is currently disabled by default and available by passing the
      -enable-cgp-select2branch flag to the code generator.
      
      Thanks to Chandler for the initial test case to him and Evan Cheng for providing
      me with comments and test-suite numbers that were more stable than mine :)
      
      llvm-svn: 156234
      047d7ca0
    • Benjamin Kramer's avatar
      Add a new target hook "predictableSelectIsExpensive". · e31f31e5
      Benjamin Kramer authored
      This will be used to determine whether it's profitable to turn a select into a
      branch when the branch is likely to be predicted.
      
      Currently enabled for everything but Atom on X86 and Cortex-A9 devices on ARM.
      
      I'm not entirely happy with the name of this flag, suggestions welcome ;)
      
      llvm-svn: 156233
      e31f31e5
    • Benjamin Kramer's avatar
      NVPTX: Initialize the UseF32FTZ flag. · a25a61b9
      Benjamin Kramer authored
      llvm-svn: 156232
      a25a61b9
    • Stepan Dyatkovskiy's avatar
      Small fix in InstCombineCasts.cpp. Restored "alloca + bitcast" reducing for... · cb2a1a34
      Stepan Dyatkovskiy authored
      Small fix in InstCombineCasts.cpp. Restored "alloca + bitcast" reducing for case when alloca's size is calculated within the "add/sub/... nsw".
      Also added fix to 2011-06-13-nsw-alloca.ll test.
      
      llvm-svn: 156231
      cb2a1a34
    • Eric Christopher's avatar
      Typo. · de9e92ed
      Eric Christopher authored
      llvm-svn: 156226
      de9e92ed
    • Jakob Stoklund Olesen's avatar
      Order register classes by spill size first, members last. · 4fd600b6
      Jakob Stoklund Olesen authored
      This is still a topological ordering such that every register class gets
      a smaller enum value than its sub-classes.
      
      Placing the smaller spill sizes first makes a difference for the
      super-register class bit masks. When looking for a super-register class,
      we usually want the smallest possible kind of super-register. That is
      now available as the first bit set in the bit mask.
      
      llvm-svn: 156222
      4fd600b6
    • Jakob Stoklund Olesen's avatar
      Make sure findRepresentativeClass picks the widest super-register. · e326ed33
      Jakob Stoklund Olesen authored
      We want the representative register class to contain the largest
      super-registers available. This makes the function less sensitive to the
      register class numbering.
      
      llvm-svn: 156220
      e326ed33
    • Jakob Stoklund Olesen's avatar
      Remove extra comma in debug output. · e89496fe
      Jakob Stoklund Olesen authored
      llvm-svn: 156219
      e89496fe
    • David Blaikie's avatar
      Fix warnings in release build. · 891d0a3d
      David Blaikie authored
      This fixes a couple of Clang warnings in release builds of LLVM:
      
      * Missing return in ISelLowering
      * Unused variable in NVPTXutil.cpp
      
      llvm-svn: 156216
      891d0a3d
    • Kevin Enderby's avatar
      Tweak to the fix in r156212, as with the change in removing the shift the · cabbae65
      Kevin Enderby authored
      SignExtend32<22>(Val<<1) also needs to change to SignExtend32<21>(Val) .
      
      llvm-svn: 156213
      cabbae65
    • Kevin Enderby's avatar
      Fix a bug in the ARM disassembler for wide branch conditional instructions · 8ce1ada1
      Kevin Enderby authored
      where the symbolic operand's displacement was incorrectly shifted left by 1.
      rdar://11387046
      
      llvm-svn: 156212
      8ce1ada1
  2. May 04, 2012
Loading