Skip to content
  1. Jan 21, 2014
    • Daniel Sanders's avatar
      [mips][sched] Split IIFmulDouble into II_MUL_D, II_MADD_D, II_MSUB_D, II_NMADD_D, and II_NMSUB_S · 2ce72b06
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199737
      2ce72b06
    • Daniel Sanders's avatar
      [mips][sched] Split IIFmulSingle into II_MUL_S, II_MADD_S, II_MSUB_S, II_NMADD_S, and II_NMSUB_S · 47b4b6dd
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199734
      47b4b6dd
    • Daniel Sanders's avatar
      [mips][sched] Split IIFadd into II_ADD_[DS], II_SUB_[DS] · 4bf60788
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199732
      4bf60788
    • Daniel Sanders's avatar
      [mips][sched] Split IIFcmp into II_C_CC_[SD] · b8013baf
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199728
      b8013baf
    • Daniel Sanders's avatar
      [mips][sched] Split IIFmove into II_C[FT]C1, II_MOV[FNTZ]_[SD], II_MOV_[SD] · f5fb3413
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199727
      f5fb3413
    • Daniel Sanders's avatar
      [mips][sched] Split IIFcvt into II_(ROUND|TRUNC|CEIL|FLOOR|CVT), II_ABS, II_NEG · 555f4c56
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199722
      555f4c56
    • Daniel Sanders's avatar
      [mips][sched] Split IIslt into II_SLT_SLTU, II_SLTI_SLTIU · 298ad0f2
      Daniel Sanders authored
      No functional change since the InstrItinData's have been duplicated.
      
      llvm-svn: 199719
      298ad0f2
    • Tim Northover's avatar
      MIPS: mark intrinsics IntrNoMem so all patterns using them are consistent. · 228becf3
      Tim Northover authored
      This is apparently a bit of a white lie (they can affect DSPControl for
      overflow etc) but similar to how we currently handle floating-point operations.
      When it becomes relevant the whole lot can be reviewed properly.
      
      llvm-svn: 199718
      228becf3
    • Renato Golin's avatar
      Checked return warning from coverity · e195f9ce
      Renato Golin authored
      llvm-svn: 199716
      e195f9ce
    • Evgeniy Stepanov's avatar
      Fix libstdc++4.7 test on Android. · 131585a6
      Evgeniy Stepanov authored
      llvm-svn: 199714
      131585a6
    • Craig Topper's avatar
      Use ArrayRef to simplify some code. · a2c60197
      Craig Topper authored
      llvm-svn: 199712
      a2c60197
    • Saleem Abdulrasool's avatar
      tools: use 64-bit print specifier · b28cec4d
      Saleem Abdulrasool authored
      Try to repair the ARM Cortex-A15 buildbot by using a more appropriate conversion
      specifier.
      
      llvm-svn: 199711
      b28cec4d
    • Saleem Abdulrasool's avatar
      tools: support decoding ARM EHABI opcodes in readobj · 9f0a21ef
      Saleem Abdulrasool authored
      Add support to llvm-readobj to decode the actual opcodes.  The ARM EHABI opcodes
      are a variable length instruction set that describe the operations required for
      properly unwinding stack frames.
      
      The primary motivation for this change is to ease the creation of tests for the
      ARM EHABI object emission as well as the unwinding directive handling in the ARM
      IAS.
      
      Thanks to Logan Chien for an extra test case!
      
      llvm-svn: 199708
      9f0a21ef
    • Saleem Abdulrasool's avatar
      ARM IAS: add support for .unwind_raw directive · d9f08603
      Saleem Abdulrasool authored
      This implements the unwind_raw directive for the ARM IAS.  The unwind_raw
      directive takes the form of a stack offset value followed by one or more bytes
      representing the opcodes to be emitted.  The opcode emitted will interpreted as
      if it were assembled by the opcode assembler via the standard unwinding
      directives.
      
      Thanks to Logan Chien for an extra test!
      
      llvm-svn: 199707
      d9f08603
    • Saleem Abdulrasool's avatar
      ARM IAS: support .personalityindex · 662f5c1a
      Saleem Abdulrasool authored
      The .personalityindex directive is equivalent to the .personality directive with
      the ARM EABI personality with the specific index (0, 1, 2).  Both of these
      directives indicate personality routines, so enhance the personality directive
      handling to take into account personalityindex.
      
      Bonus fix: flush the UnwindContext at the beginning of a new function.
      
      Thanks to Logan Chien for additional tests!
      
      llvm-svn: 199706
      662f5c1a
    • Kevin Qin's avatar
      [AArch64 NEON] Fix a bug caused by undef lane when generating VEXT. · 6d379abd
      Kevin Qin authored
      It was commited as r199628 but reverted in r199628 as causing
      regression test failed. It's because of old vervsion of patch
      I used to commit. Sorry for mistake.
      
      llvm-svn: 199704
      6d379abd
    • Nick Lewycky's avatar
      Add operator!= for FoldingSetNodeID and FoldingSetNodeIDRef. Implementation in · 47a79816
      Nick Lewycky authored
      the header forwards to operator== which is not in the header.
      
      llvm-svn: 199702
      47a79816
    • Kevin Enderby's avatar
      Tweak the MCExternalSymbolizer to not use the SymbolLookUp() call back · c030848f
      Kevin Enderby authored
      to not guess at a symbol name in some cases.
      
      The problem is that in object files assembled starting at address 0, when
      trying to symbolicate something that starts like this:
      
      % cat x.s
      _t1:
      	vpshufd	$0x0, %xmm1, %xmm0
      
      the symbolic disassembly can end up like this:
      
      % otool -tV x.o 
      x.o:
      (__TEXT,__text) section
      _t1:
      0000000000000000	vpshufd	$_t1, %xmm1, %xmm0
      
      Which is in this case produced incorrect symbolication.
      
      But it is useful in some cases to use the SymbolLookUp() call back
      to guess at some immediate values.  For example one like this
      that does not have an external relocation entry:
      
      % cat y.s
      _t1:
      	movl	$_d1, %eax
      .data
      _d1:	.long	0
      
      % clang -c -arch i386 y.s
      
      % otool -tV y.o 
      y.o:
      (__TEXT,__text) section
      _t1:
      0000000000000000	movl	$_d1, %eax
      
      % otool -rv y.o 
      y.o:
      Relocation information (__TEXT,__text) 1 entries
      address  pcrel length extern type    scattered symbolnum/value
      00000001 False long   False  VANILLA False     2 (__DATA,__data)
      
      So the change is based on it is not likely that an immediate Value
      coming from an instruction field of a width of 1 byte, other than branches
      and items with relocation, are not likely symbol addresses.
      
      With the change the first case above simply becomes:
      
      % otool -tV x.o 
      x.o:
      (__TEXT,__text) section
      _t1:
      0000000000000000	vpshufd	$0x0, %xmm1, %xmm0
      
      and the second case continues to work as expected.
      
      rdar://14863405
      
      llvm-svn: 199698
      c030848f
    • Kevin Enderby's avatar
      To allow the X86 verbose assembly to print its informative comments · debfea62
      Kevin Enderby authored
      when used with symbolic disassembly, add a check that the operand
      is an immediate and has not been symbolicated to MCExpr operand.
      
      I’m trying to enable the ‘C’ disassembly API option
      LLVMDisassembler_Option_SetInstrComments for darwin’s
      otool(1) that uses the llvm disassembler API.  The problem is
      that the disassembler API can change an immediate operand to
      an MCExpr operand if it symbolicates it with the call backs.
      And if it does the code in llvm::EmitAnyX86InstComments()
      will crash when it assumes these operands are immediates.
      
      The fix for this is very straight forward to just protect the call
      to getImm() with a check of isImm().  So if the immediate for
      an instruction is symbolicated it simply doesn’t get the X86
      verbose assembly comments:
      
      % otool -tV test_asm.o
      test_asm.o:
      (__TEXT,__text) section
      _t1:
      0000000000000000	vpshufd	$_t1, %xmm1, %xmm0
      0000000000000005	retq
      0000000000000006	nopw	%cs:_t1(%rax,%rax)
      _t2:
      0000000000000010	vpshufd	$-0x1, %xmm0, %xmm0     ## xmm0 = xmm0[3,3,3,3]
      0000000000000015	retq
      0000000000000016	nopw	%cs:_t1(%rax,%rax)
      _t3:
      0000000000000020	vpshufd	$_t1, %xmm1, %xmm0
      0000000000000025	retq
      0000000000000026	nopw	%cs:_t1(%rax,%rax)
      _t4:
      0000000000000030	vpshufd	$0x2d, %xmm0, %xmm0     ## xmm0 = xmm0[1,3,2,0]
      0000000000000035	retq
      
      The fact that the immediate $0x0 is being symbolicated at
      all in this case is a different problem which my next patch
      will address.
      
      rdar://10989286
      
      llvm-svn: 199697
      debfea62
  2. Jan 20, 2014
    • Hal Finkel's avatar
      Update StackProtector when coloring merges stack slots · a69e5b8b
      Hal Finkel authored
      StackProtector keeps a ValueMap of alloca instructions to layout kind tags for
      use by PEI and other later passes. When stack coloring replaces one alloca with
      a bitcast to another one, the key replacement in this map does not work.
      Instead, provide an interface to manage this updating directly. This seems like
      an improvement over the old behavior, where the layout map would not get
      updated at all when the stack slots were merged. In practice, however, there is
      likely no observable difference because PEI only did anything special with
      'large array' kinds, and if one large array is merged with another, than the
      replacement should already have been a large array.
      
      This is an attempt to unbreak the clang-x86_64-darwin11-RA builder.
      
      llvm-svn: 199684
      a69e5b8b
    • Andrea Di Biagio's avatar
      [X86] Teach how to combine a vselect into a movss/movsd · 450d1661
      Andrea Di Biagio authored
      Add target specific rules for combining vselect dag nodes into movss/movsd
      when possible.
      
      If the vector type of the vselect dag node in input is either MVT::v4i13 or
      MVT::v4f32, then try to fold according to rules:
      
        1) fold (vselect (build_vector (0, -1, -1, -1)), A, B) -> (movss A, B)
        2) fold (vselect (build_vector (-1, 0, 0, 0)), A, B) -> (movss B, A)
      
      If the vector type of the vselect dag node in input is either MVT::v2i64 or
      MVT::v2f64 (and we have SSE2), then try to fold according to rules:
      
        3) fold (vselect (build_vector (0, -1)), A, B) -> (movsd A, B)
        4) fold (vselect (build_vector (-1, 0)), A, B) -> (movsd B, A)
      
      llvm-svn: 199683
      450d1661
    • Adrian Prantl's avatar
      Debug info: On ARM ensure that all __TEXT sections come before the · 671af5ca
      Adrian Prantl authored
      optional DWARF sections, so compiling with -g does not result in
      different code being generated for PC-relative loads.
      
      This is reapplying a diet r197922 (__TEXT-only).
      
      llvm-svn: 199681
      671af5ca
    • Adrian Prantl's avatar
      Revert "Debug info: On ARM ensure that the data sections come before the" · 1a89924d
      Adrian Prantl authored
      Cut back on the cargo cult. The order of __DATA sections doesn't affect
      generated code.
      
      This reverts commit r197922.
      
      llvm-svn: 199680
      1a89924d
    • Owen Anderson's avatar
      Allow SMUL_LOHI and UMUL_LOHI to be narrow to MUL on targets where MUL is... · fb00d5bc
      Owen Anderson authored
      Allow SMUL_LOHI and UMUL_LOHI to be narrow to MUL on targets where MUL is Custom rather than Legal.  Even if the target is doing some kind of expansion for MUL, it's pretty much guaranteed to be more efficent than whatever it does for SMUL_LOHI or UMUL_LOHI!
      
      llvm-svn: 199678
      fb00d5bc
    • James Molloy's avatar
      Remove the useless pseudo instructions VDUPfdf and VDUPfqf, replacing them... · 43ccae1b
      James Molloy authored
      Remove the useless pseudo instructions VDUPfdf and VDUPfqf, replacing them with patterns to match VDUPLN.
      
      llvm-svn: 199675
      43ccae1b
    • NAKAMURA Takumi's avatar
      [CMake] LLVMProcessSources.cmake: Add include(CMakeParseArguments). · db2a4af3
      NAKAMURA Takumi authored
      I didn't realize that cmake_parse_arguments() would require explicit inclusion.
      
      llvm-svn: 199674
      db2a4af3
    • NAKAMURA Takumi's avatar
      Whitespace. · 6515aef0
      NAKAMURA Takumi authored
      llvm-svn: 199667
      6515aef0
    • Hal Finkel's avatar
      Fix misched-aa-colored.ll to require asserts (trying again) · 9ff54e1f
      Hal Finkel authored
      Perhaps it needs to be in caps.
      
      llvm-svn: 199661
      9ff54e1f
    • Hal Finkel's avatar
      Fix misched-aa-colored.ll to require asserts. · a6bcadeb
      Hal Finkel authored
      -misched=shuffle is NDEBUG only. Maybe we should change that.
      
      llvm-svn: 199659
      a6bcadeb
    • Hal Finkel's avatar
      Update IR when merging slots in stack coloring · cd9569c1
      Hal Finkel authored
      The way that stack coloring updated MMOs when merging stack slots, while
      correct, is suboptimal, and is incompatible with the use of AA during
      instruction scheduling. The solution, which involves the use of const_cast (and
      more importantly, updating the IR from within an MI-level pass), obviously
      requires some explanation:
      
      When the stack coloring pass was originally committed, the code in
      ScheduleDAGInstrs::buildSchedGraph tracked possible alias sets by using
      GetUnderlyingObject, and all load/store and store/store memory control
      dependencies where added between SUs at the object level (where only one
      object, that returned by GetUnderlyingObject, was used to identify the object
      associated with each MMO). When stack coloring merged stack slots, it would
      replace MMOs derived from the remapped alloca with the alloca with which the
      remapped alloca was being replaced. Because ScheduleDAGInstrs only used single
      objects, and tracked alias sets at the object level, this was a fine solution.
      
      In r169744, (Andy and) I updated the code in ScheduleDAGInstrs to use
      GetUnderlyingObjects, and track alias sets using, potentially, multiple
      underlying objects for each MMO. This was done, primarily, to provide the
      ability to look through PHIs, and provide better scheduling for
      induction-variable-dependent loads and stores inside loops. At this point, the
      MMO-updating code in stack coloring became suboptimal, because it would clear
      the MMOs for (i.e. completely pessimize) all instructions for which r169744
      might help in scheduling. Updating the IR directly is the simplest fix for this
      (and the one with, by far, the least compile-time impact), but others are
      possible (we could give each MMO a small vector of potential values, or make
      use of a remapping table, constructed from MFI, inside ScheduleDAGInstrs).
      
      Unfortunately, replacing all MMO values derived from the remapped alloca with
      the base replacement alloca fundamentally breaks our ability to use AA during
      instruction scheduling (which is critical to performance on some targets). The
      reason is that the original MMO might have had an offset (either constant or
      dynamic) from the base remapped alloca, and that offset is not present in the
      updated MMO. One possible way around this would be to use
      GetPointerBaseWithConstantOffset, and update not only the MMO's value, but also
      its offset based on the original offset. Unfortunately, this solution would
      only handle constant offsets, and for safety (because AA is not completely
      restricted to deducing relationships with constant offsets), we would need to
      clear all MMOs without constant offsets over the entire function. This would be
      an even worse pessimization than the current single-object restriction. Any
      other solution would involve passing around a vector of remapped allocas, and
      teaching AA to use it, introducing additional complexity and overhead into AA.
      
      Instead, when remapping an alloca, we replace all IR uses of that alloca as
      well (optionally inserting a bitcast as necessary). This is even more efficient
      that the old MMO-updating code in the stack coloring pass (because it removes
      the need to call GetUnderlyingObject on all MMO values), removes the
      single-object pessimization in the default configuration, and enables the
      correct use of AA during instruction scheduling (all without any additional
      overhead).
      
      LLVM now no longer miscompiles itself on x86_64 when using -enable-misched
      -enable-aa-sched-mi -misched-bottomup=0 -misched-topdown=0 -misched=shuffle!
      Fixed PR18497.
      
      Because the alloca replacement is now done at the IR level, unless the MMO
      directly refers to the remapped alloca, the change cannot be seen at the MI
      level. As a result, there is no good way to fix test/CodeGen/X86/pr14090.ll.
      
      llvm-svn: 199658
      cd9569c1
    • Hal Finkel's avatar
      Track multiple stores per object when using AA in ScheduleDAGInstrs · a228a818
      Hal Finkel authored
      When using AA to break false chain dependencies, we need to track multiple
      stores per object in ScheduleDAGInstrs. Historically, we tracked potential alias
      chains at the object level, and so all loads of an object would retain
      dependencies on any store to that object. With AA, however, this is not
      sufficient: non-overlapping stores and loads to the same object all need to be
      tested for dependencies separately, we cannot only test all loads to an object
      against only the last store (see PR18497 for an explicit example).
      
      To mitigate any unwelcome compile-time impact when not using AA, only one store
      is kept in the list per object when not using AA.
      
      This, along with a stack coloring change to come shortly, will provide a test
      case, fix PR18497 (and allow LLVM to compile itself using -enable-aa-sched-mi
      on x86-64).
      
      llvm-svn: 199657
      a228a818
    • David Woodhouse's avatar
      [x86] Fix disassembly of MOV16ao16 et al. · caaa2850
      David Woodhouse authored
      The addition of IC_OPSIZE_ADSIZE in r198759 wasn't quite complete. It
      also turns out to have been unnecessary. The disassembler handles the
      AdSize prefix for itself, and doesn't care about the difference between
      (e.g.) MOV8ao8 and MOB8ao8_16 definitions. So just let them coexist and
      don't worry about it.
      
      llvm-svn: 199654
      caaa2850
    • David Woodhouse's avatar
      [x86] Fix 16-bit disassembly of JCXZ/JECXZ · 9c74fdb8
      David Woodhouse authored
      llvm-svn: 199653
      9c74fdb8
    • David Woodhouse's avatar
      [x86] Rename MOVSD/STOSD/LODSD/OUTSD to MOVSL/STOSL/LODSL/OUTSL · 3442f342
      David Woodhouse authored
      The disassembler has a special case for 'L' vs. 'W' in its heuristic for
      checking for 32-bit and 16-bit equivalents. We could expand the heuristic,
      but better just to be consistent in using the 'L' suffix.
      
      llvm-svn: 199652
      3442f342
    • David Woodhouse's avatar
      [x86] Fix disassembly of callw instruction · 70ced3e0
      David Woodhouse authored
      Not quite sure why this was marked isAsmParserOnly, but it means that the
      disassembler can't see it either.
      
      llvm-svn: 199651
      70ced3e0
    • David Woodhouse's avatar
      [x86] Fix 16-bit handling of OpSize bit · 5cf4c675
      David Woodhouse authored
      When disassembling in 16-bit mode the meaning of the OpSize bit is
      inverted. Instructions found in the IC_OPSIZE context will actually
      *not* have the 0x66 prefix, and instructions in the IC context will
      have the 0x66 prefix. Make use of the existing special-case handling
      for the 0x66 prefix being in the wrong place, to cope with this.
      
      llvm-svn: 199650
      5cf4c675
    • David Woodhouse's avatar
      [x86] Infer disassembler mode from SubtargetInfo feature bits · 7dd21824
      David Woodhouse authored
      Aside from cleaning up the code, this also adds support for the -code16
      environment and actually enables the MODE_16BIT mode that was previously
      not accessible.
      
      There is no point adding any testing for 16-bit yet though; basically
      nothing will work because we aren't handling the OpSize prefix correctly
      for 16-bit mode.
      
      llvm-svn: 199649
      7dd21824
    • David Woodhouse's avatar
      [x86] Support i386-*-*-code16 triple for emitting 16-bit code · 71d15eda
      David Woodhouse authored
      llvm-svn: 199648
      71d15eda
    • Chandler Carruth's avatar
      [PM] Wire up the Verifier for the new pass manager and connect it to the · 4d35631a
      Chandler Carruth authored
      various opt verifier commandline options.
      
      Mostly mechanical wiring of the verifier to the new pass manager.
      Exercises one of the more unusual aspects of it -- a pass can be either
      a module or function pass interchangably. If this is ever problematic,
      we can make things more constrained, but for things like the verifier
      where there is an "obvious" applicability at both levels, it seems
      convenient.
      
      This is the next-to-last piece of basic functionality left to make the
      opt commandline driving of the new pass manager minimally functional for
      testing and further development. There is still a lot to be done there
      (notably the factoring into .def files to kill the current boilerplate
      code) but it is relatively uninteresting. The only interesting bit left
      for minimal functionality is supporting the registration of analyses.
      I'm planning on doing that on top of the .def file switch mostly because
      the boilerplate for the analyses would be significantly worse.
      
      llvm-svn: 199646
      4d35631a
    • Kai Nacke's avatar
      ARM: add tlsldo relocation · e51c8138
      Kai Nacke authored
      Add support for the symbol(tlsldo) relocation. This is required in order to 
      solve PR18554.
      
      Reviewed by R. Golin, A. Korobeynikov.
      
      llvm-svn: 199644
      e51c8138
Loading