Skip to content
  1. Dec 18, 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
    • 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
    • Nadav Rotem's avatar
      Enable the loop vectorizer. · c0699854
      Nadav Rotem authored
      llvm-svn: 170416
      c0699854
    • Nadav Rotem's avatar
      Rename the test so that we can add additional vectors-of-pointers tests · cb233428
      Nadav Rotem authored
      into the same file in the future.
      
      llvm-svn: 170414
      cb233428
    • Nadav Rotem's avatar
      SROA: Replace calls to getScalarSizeInBits to DataLayout's API because · a5024fc3
      Nadav Rotem authored
      getScalarSizeInBits could not handle vectors of pointers.
      
      llvm-svn: 170412
      a5024fc3
    • NAKAMURA Takumi's avatar
      llvm/test/MC/ELF/comp-dir.s: Appease MSYS Bash. · ad0c80b8
      NAKAMURA Takumi authored
      llvm-svn: 170410
      ad0c80b8
    • Rafael Espindola's avatar
      Initialize NoRedZone and remove unused default values. · 46b9c8a2
      Rafael Espindola authored
      llvm-svn: 170404
      46b9c8a2
    • Eli Bendersky's avatar
      Cleanup comment and formatting · fede6b1d
      Eli Bendersky authored
      llvm-svn: 170398
      fede6b1d
    • Jakob Stoklund Olesen's avatar
      Repair bundles that were broken by removing and reinserting the first · 41bbf9c2
      Jakob Stoklund Olesen authored
      instruction.
      
      This isn't strictly necessary at the moment because Thumb2SizeReduction
      also copies all MI flags from the old instruction to the new. However, a
      future patch will make that kind of direct flag tampering illegal.
      
      llvm-svn: 170395
      41bbf9c2
    • Eric Christopher's avatar
      Formatting. · 79f16569
      Eric Christopher authored
      llvm-svn: 170394
      79f16569
    • Eric Christopher's avatar
      Add support for passing -main-file-name all the way through to · 906da232
      Eric Christopher authored
      the assembler.
      
      Part of PR14624
      
      llvm-svn: 170390
      906da232
    • Eric Christopher's avatar
      Cleanup formatting and whitespace. · a7c3273e
      Eric Christopher authored
      llvm-svn: 170389
      a7c3273e
    • Jakob Stoklund Olesen's avatar
      Extract a method, no functional change intended. · 43b1e133
      Jakob Stoklund Olesen authored
      Sadly, this costs us a perfectly good opportunity to use 'goto'.
      
      llvm-svn: 170385
      43b1e133
    • Jakob Stoklund Olesen's avatar
      Tighten up the erase/remove API for bundled instructions. · ccfb5fb4
      Jakob Stoklund Olesen authored
      Most code is oblivious to bundles and uses the MBB::iterator which only
      visits whole bundles. MBB::erase() operates on whole bundles at a time
      as before.
      
      MBB::remove() now refuses to remove bundled instructions. It is not safe
      to remove all instructions in a bundle without deleting them since there
      is no way of returning pointers to all the removed instructions.
      
      MBB::remove_instr() and MBB::erase_instr() will now update bundle flags
      correctly, lifting individual instructions out of bundles while leaving
      the remaining bundle intact.
      
      The MachineInstr convenience functions are updated so
      
        eraseFromParent() erases a whole bundle as before
        eraseFromBundle() erases a single instruction, leaving the rest of its bundle.
        removeFromParent() refuses to operate on bundled instructions, and
        removeFromBundle() lifts a single instruction out of its bundle.
      
      These functions will no longer accidentally split or coalesce bundles -
      bundle flags are updated to preserve the existing bundling, and explicit
      bundleWith* / unbundleFrom* functions should be used to change the
      instruction bundling.
      
      This API update is still a work in progress. I am going to update APIs
      first so they maintain bundle flags automatically when possible. Then
      I'll add stricter verification of the bundle flags.
      
      llvm-svn: 170384
      ccfb5fb4
    • Reed Kotler's avatar
      EmitDebugLabel should by default be the same as EmitLabel everywhere. · 0c1745e5
      Reed Kotler authored
      It must be explicity set in MCPureStreamer because otherwise it will
      inherit incorrectly from the parent.
      
      llvm-svn: 170383
      0c1745e5
  2. Dec 17, 2012
Loading