Skip to content
  1. Nov 06, 2012
  2. Nov 05, 2012
  3. Nov 03, 2012
  4. Nov 01, 2012
    • Chandler Carruth's avatar
      Revert the majority of the next patch in the address space series: · 5da3f051
      Chandler Carruth authored
      r165941: Resubmit the changes to llvm core to update the functions to
               support different pointer sizes on a per address space basis.
      
      Despite this commit log, this change primarily changed stuff outside of
      VMCore, and those changes do not carry any tests for correctness (or
      even plausibility), and we have consistently found questionable or flat
      out incorrect cases in these changes. Most of them are probably correct,
      but we need to devise a system that makes it more clear when we have
      handled the address space concerns correctly, and ideally each pass that
      gets updated would receive an accompanying test case that exercises that
      pass specificaly w.r.t. alternate address spaces.
      
      However, from this commit, I have retained the new C API entry points.
      Those were an orthogonal change that probably should have been split
      apart, but they seem entirely good.
      
      In several places the changes were very obvious cleanups with no actual
      multiple address space code added; these I have not reverted when
      I spotted them.
      
      In a few other places there were merge conflicts due to a cleaner
      solution being implemented later, often not using address spaces at all.
      In those cases, I've preserved the new code which isn't address space
      dependent.
      
      This is part of my ongoing effort to clean out the partial address space
      code which carries high risk and low test coverage, and not likely to be
      finished before the 3.2 release looms closer. Duncan and I would both
      like to see the above issues addressed before we return to these
      changes.
      
      llvm-svn: 167222
      5da3f051
    • Shuxin Yang's avatar
      (For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization. · 01efdd6c
      Shuxin Yang authored
        The adc/sbb optimization is to able to convert following expression
      into a single adc/sbb instruction:
        (ult) ... = x + 1 // where the ult is unsigned-less-than comparison
        (ult) ... = x - 1
      
        This change is to flip the "x >u y" (i.e. ugt comparison) in order 
      to expose the adc/sbb opportunity.
      
      llvm-svn: 167180
      01efdd6c
  5. Oct 31, 2012
  6. Oct 30, 2012
  7. Oct 29, 2012
  8. Oct 25, 2012
  9. Oct 24, 2012
  10. Oct 23, 2012
  11. Oct 19, 2012
    • Shuxin Yang's avatar
      This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap() · cdde059a
      Shuxin Yang authored
      which is supposed to consistently raise SIGTRAP across all systems. In contrast,
      __builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
      SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
      functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().
      
        The X86 backend is already able to handle debugtrap(). This patch is to:
        1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
        2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
           make the __builtin_debugtrap() "available" to all existing ports without the hassle of
           changing their code.
        3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
           __builtin_trap() will be expanded into the function call of the specified trap function.
          This behavior may need change in the future.
      
        The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
      already have a testing case for x86. 
      
      llvm-svn: 166300
      cdde059a
    • Michael Liao's avatar
      Lower BUILD_VECTOR to SHUFFLE + INSERT_VECTOR_ELT for X86 · 4b7ccfca
      Michael Liao authored
      - If INSERT_VECTOR_ELT is supported (above SSE2, either by custom
        sequence of legal insn), transform BUILD_VECTOR into SHUFFLE +
        INSERT_VECTOR_ELT if most of elements could be built from SHUFFLE with few
        (so far 1) elements being inserted.
      
      llvm-svn: 166288
      4b7ccfca
  12. Oct 17, 2012
  13. Oct 16, 2012
    • Michael Liao's avatar
      Support v8f32 to v8i8/vi816 conversion through custom lowering · 02ca3454
      Michael Liao authored
      - Add custom FP_TO_SINT on v8i16 (and v8i8 which is legalized as v8i16 due to
        vector element-wise widening) to reduce DAG combiner and its overhead added
        in X86 backend.
      
      llvm-svn: 166036
      02ca3454
    • NAKAMURA Takumi's avatar
      Reapply r165661, Patch by Shuxin Yang <shuxin.llvm@gmail.com>. · 1705a999
      NAKAMURA Takumi authored
      Original message:
      
      The attached is the fix to radar://11663049. The optimization can be outlined by following rules:
      
         (select (x != c), e, c) -> select (x != c), e, x),
         (select (x == c), c, e) -> select (x == c), x, e)
      where the <c> is an integer constant.
      
       The reason for this change is that : on x86, conditional-move-from-constant needs two instructions;
      however, conditional-move-from-register need only one instruction.
      
        While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase.
      
        The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource".
      
      Original message since r165661:
      
      My previous change has a bug: I negated the condition code of a CMOV, and go ahead creating a new CMOV using the *ORIGINAL* condition code.
      
      llvm-svn: 166017
      1705a999
    • Michael Liao's avatar
      Add __builtin_setjmp/_longjmp supprt in X86 backend · 97bf363a
      Michael Liao authored
      - Besides used in SjLj exception handling, __builtin_setjmp/__longjmp is also
        used as a light-weight replacement of setjmp/longjmp which are used to
        implementation continuation, user-level threading, and etc. The support added
        in this patch ONLY addresses this usage and is NOT intended to support SjLj
        exception handling as zero-cost DWARF exception handling is used by default
        in X86.
      
      llvm-svn: 165989
      97bf363a
  14. Oct 15, 2012
  15. Oct 13, 2012
  16. Oct 11, 2012
  17. Oct 10, 2012
    • Nadav Rotem's avatar
      Patch by Shuxin Yang <shuxin.llvm@gmail.com>. · 17418964
      Nadav Rotem authored
      Original message:
      
      The attached is the fix to radar://11663049. The optimization can be outlined by following rules:
      
         (select (x != c), e, c) -> select (x != c), e, x),
         (select (x == c), c, e) -> select (x == c), x, e)
      where the <c> is an integer constant.
      
       The reason for this change is that : on x86, conditional-move-from-constant needs two instructions;
      however, conditional-move-from-register need only one instruction.
      
        While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase.
      
        The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource".
      
      llvm-svn: 165661
      17418964
    • Michael Liao's avatar
      Add support for FP_ROUND from v2f64 to v2f32 · e999b865
      Michael Liao authored
      - Due to the current matching vector elements constraints in
        ISD::FP_ROUND, rounding from v2f64 to v4f32 (after legalization from
        v2f32) is scalarized. Add a customized v2f32 widening to convert it
        into a target-specific X86ISD::VFPROUND to work around this
        constraints.
      
      llvm-svn: 165631
      e999b865
Loading