1. Dec 19, 2012
    • Jakob Stoklund Olesen's avatar
      Add an assertion for a likely ilist::splice() contract violation. · b8d29bf2
      Jakob Stoklund Olesen authored
      The single-element ilist::splice() function supports a noop move:
      
        List.splice(I, List, I);
      
      The corresponding std::list function doesn't allow that, so add a unit
      test to document that behavior.
      
      This also means that
      
        List.splice(I, List, F);
      
      is somewhat surprisingly not equivalent to
      
        List.splice(I, List, F, next(F));
      
      This patch adds an assertion to catch the illegal case I == F above.
      Alternatively, we could make I == F a legal noop, but that would make
      ilist differ even more from std::list.
      
      llvm-svn: 170443
      b8d29bf2
    • Enrico Granata's avatar
      Tweaking a comment in the NSURL formatter for correctness - the code was doing... · 0126132e
      Enrico Granata authored
      Tweaking a comment in the NSURL formatter for correctness - the code was doing the right thing, but the comment was highly misleading
      
      llvm-svn: 170441
      0126132e
    • Eli Bendersky's avatar
      Fix a compilation warning with gcc 4.6 · 76bd3d85
      Eli Bendersky authored
      llvm-svn: 170440
      76bd3d85
    • Benjamin Kramer's avatar
      LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops... · f0e5d2f0
      Benjamin Kramer authored
      LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops instead of scalar operations.
      
      For example on x86 with SSE4.2 a <8 x i8> add reduction becomes
      	movdqa	%xmm0, %xmm1
      	movhlps	%xmm1, %xmm1            ## xmm1 = xmm1[1,1]
      	paddw	%xmm0, %xmm1
      	pshufd	$1, %xmm1, %xmm0        ## xmm0 = xmm1[1,0,0,0]
      	paddw	%xmm1, %xmm0
      	phaddw	%xmm0, %xmm0
      	pextrb	$0, %xmm0, %edx
      
      instead of
      	pextrb	$2, %xmm0, %esi
      	pextrb	$0, %xmm0, %edx
      	addb	%sil, %dl
      	pextrb	$4, %xmm0, %esi
      	addb	%dl, %sil
      	pextrb	$6, %xmm0, %edx
      	addb	%sil, %dl
      	pextrb	$8, %xmm0, %esi
      	addb	%dl, %sil
      	pextrb	$10, %xmm0, %edi
      	pextrb	$14, %xmm0, %edx
      	addb	%sil, %dil
      	pextrb	$12, %xmm0, %esi
      	addb	%dil, %sil
      	addb	%sil, %dl
      
      llvm-svn: 170439
      f0e5d2f0
    • Eli Bendersky's avatar
      39e7c6e3
    • Jakob Stoklund Olesen's avatar
      Tighten the insert() API for bundled instructions. · 422e07b0
      Jakob Stoklund Olesen authored
      The normal insert() function takes an MBB::iterator position, and
      inserts a stand-alone MachineInstr as before.
      
      The insert() function that takes an MBB::instr_iterator position can
      insert instructions inside a bundle, and will now update the bundle
      flags correctly when that happens.
      
      When the insert position is between two bundles, it is unclear whether
      the instruction should be appended to the previous bundle, prepended to
      the next bundle, or stand on its own. The MBB::insert() function doesn't
      bundle the instruction in that case, use the MIBundleBuilder class for
      that.
      
      llvm-svn: 170437
      422e07b0
    • Hal Finkel's avatar
      Check multiple register classes for inline asm tied registers · 943f76d1
      Hal Finkel authored
      A register can be associated with several distinct register classes.
      For example, on PPC, the floating point registers are each associated with
      both F4RC (which holds f32) and F8RC (which holds f64). As a result, this code
      would fail when provided with a floating point register and an f64 operand
      because it would happen to find the register in the F4RC class first and
      return that. From the F4RC class, SDAG would extract f32 as the register
      type and then assert because of the invalid implied conversion between
      the f64 value and the f32 register.
      
      Instead, search all register classes. If a register class containing the
      the requested register has the requested type, then return that register
      class. Otherwise, as before, return the first register class found that
      contains the requested register.
      
      llvm-svn: 170436
      943f76d1
    • Marshall Clow's avatar
  2. Dec 18, 2012