Skip to content
  1. May 08, 2012
    • Jakob Stoklund Olesen's avatar
      Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass(). · 3c52f028
      Jakob Stoklund Olesen authored
      The getPointerRegClass() hook can return register classes that depend on
      the calling convention of the current function (ptr_rc_tailcall).
      
      So far, we have been able to infer the calling convention from the
      subtarget alone, but as we add support for multiple calling conventions
      per target, that no longer works.
      
      Patch by Yiannis Tsiouris!
      
      llvm-svn: 156328
      3c52f028
  2. May 07, 2012
  3. May 06, 2012
  4. May 05, 2012
    • Chris Lattner's avatar
      refactor some code to expose column numbers more and make diagnostic printing... · cd60bc49
      Chris Lattner authored
      refactor some code to expose column numbers more and make diagnostic printing slightly more efficient.
      
      llvm-svn: 156243
      cd60bc49
    • Jim Grosbach's avatar
      Nuke a few dead remnants of the CBE. · 7ce12926
      Jim Grosbach authored
      llvm-svn: 156241
      7ce12926
    • Daniel Dunbar's avatar
      [Support] Add missing include. · d5f82d92
      Daniel Dunbar authored
      llvm-svn: 156240
      d5f82d92
    • Daniel Dunbar's avatar
      [Support] Fix up comments. · 58ed0c6c
      Daniel Dunbar authored
      llvm-svn: 156239
      58ed0c6c
    • Daniel Dunbar's avatar
      [Support] Rewrite sys::fs::unique_file to not be stupid with /dev/urandom. · 3f0fa19b
      Daniel Dunbar authored
       - Just use sys::Process::GetRandomNumber instead of having two poor
         implementations.
       - This is ~70 times (!) faster on my OS X machine.
      
      llvm-svn: 156238
      3f0fa19b
    • Daniel Dunbar's avatar
      [Support] Add sys::Process::GetRandomNumber(). · b57ddd4e
      Daniel Dunbar authored
       - Primitive API, but we rarely have need for random numbers.
      
      llvm-svn: 156237
      b57ddd4e
    • 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
Loading