Skip to content
  1. Jul 09, 2013
    • Adrian Prantl's avatar
      Reapply an improved version of r180816/180817. · 418d1d1e
      Adrian Prantl authored
      Change the informal convention of DBG_VALUE machine instructions so that
      we can express a register-indirect address with an offset of 0.
      The old convention was that a DBG_VALUE is a register-indirect value if
      the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
      is register-indirect if the first operand is a register and the second
      operand is an immediate. For plain register values the combination reg,
      reg is used. MachineInstrBuilder::BuildMI knows how to build the new
      DBG_VALUES.
      
      rdar://problem/13658587
      
      llvm-svn: 185966
      418d1d1e
    • Hal Finkel's avatar
      WidenVecRes_BUILD_VECTOR must use the first operand's type · e4dd5c29
      Hal Finkel authored
      Because integer BUILD_VECTOR operands may have a larger type than the result's
      vector element type, and all operands must have the same type, when widening a
      BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
      rather must use the type of the existing operands.
      
      Another bug found by llvm-stress.
      
      llvm-svn: 185960
      e4dd5c29
    • Stephen Lin's avatar
      AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all · 73de7bf5
      Stephen Lin authored
      in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
      order to resolve the following issues with fmuladd (i.e. optional FMA)
      intrinsics:
      
      1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
      intrinsics even if the subtarget does not support FMA instructions, leading
      to laughably bad code generation in some situations.
      
      2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
      resulting in a call to a software fp128 FMA implementation.
      
      3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
      like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
      etc. to types that support hardware FMAs.
      
      The function has also been slightly renamed for consistency and to force a
      merge/build conflict for any out-of-tree target implementing it. To resolve,
      see comments and fixed in-tree examples.
      
      llvm-svn: 185956
      73de7bf5
    • Hal Finkel's avatar
      DAGCombine tryFoldToZero cannot create illegal types after type legalization · 6c29bd90
      Hal Finkel authored
      When folding sub x, x (and other similar constructs), where x is a vector, the
      result is a vector of zeros. After type legalization, make sure that the input
      zero elements have a legal type. This type may be larger than the result's
      vector element type.
      
      This was another bug found by llvm-stress.
      
      llvm-svn: 185949
      6c29bd90
    • Alexander Potapenko's avatar
      Revert r185872 - "Stop emitting weak symbols into the "coal" sections" · 8d2d79d0
      Alexander Potapenko authored
      This patch broke `make check-asan` on Mac, causing ld warnings like the following one:
      
      ld: warning: direct access in __GLOBAL__I_a to global weak symbol
      ___asan_mapping_scale means the weak symbol cannot be overridden at
      runtime. This was likely caused by different translation units being
      compiled with different visibility settings.
      
      The resulting test binaries crashed with incorrect ASan warnings.
      
      llvm-svn: 185923
      8d2d79d0
    • Stephen Lin's avatar
      Style fixes: remove unnecessary braces for one-statement if blocks, no else... · 8e8424eb
      Stephen Lin authored
      Style fixes: remove unnecessary braces for one-statement if blocks, no else after return, etc. No funcionality change.
      
      llvm-svn: 185893
      8e8424eb
  2. Jul 08, 2013
  3. Jul 06, 2013
  4. Jul 05, 2013
    • Richard Sandiford's avatar
      [SystemZ] Remove no-op MVCs · c40f27b5
      Richard Sandiford authored
      The stack coloring pass has code to delete stores and loads that become
      trivially dead after coloring.  Extend it to cope with single instructions
      that copy from one frame index to another.
      
      The testcase happens to show an example of this kicking in at the moment.
      It did occur in Real Code too though.
      
      llvm-svn: 185705
      c40f27b5
    • Richard Sandiford's avatar
      Fix double renaming bug in stack coloring pass · b5d9bd6f
      Richard Sandiford authored
      The stack coloring pass renumbered frame indexes with a loop of the form:
      
        for each frame index FI
          for each instruction I that uses FI
            for each use of FI in I
              rename FI to FI'
      
      This caused problems if an instruction used two frame indexes F0 and F1
      and if F0 was renamed to F1 and F1 to F2.  The first time we visited the
      instruction we changed F0 to F1, then we changed both F1s to F2.
      
      In other words, the problem was that SSRefs recorded which instructions
      used an FI, but not which MachineOperands and MachineMemOperands within
      that instruction used it.
      
      This is easily fixed for MachineOperands by walking the instructions
      once and processing each operand in turn.  There's already a loop to
      do that for dead store elimination, so it seemed more efficient to
      fuse the two at the block level.
      
      MachineMemOperands are more tricky because they can be shared between
      instructions.  The patch handles them by making SSRefs an array of
      MachineMemOperands rather than an array of MachineInstrs.  We might end
      up processing the same MachineMemOperand twice, but that's OK because
      we always know from the SSRefs index what the original frame index was.
      
      llvm-svn: 185703
      b5d9bd6f
    • Richard Sandiford's avatar
      [SystemZ] Clean up register scavenging code · 5dd52f8c
      Richard Sandiford authored
      SystemZ wants normal register scavenging slots, as close to the stack or
      frame pointer as possible.  The only reason it was using custom code was
      because PrologEpilogInserter assumed an x86-like layout, where the frame
      pointer is at the opposite end of the frame from the stack pointer.
      This meant that when frame pointer elimination was disabled,
      the slots ended up being as close as possible to the incoming
      stack pointer, which is the opposite of what we want on SystemZ.
      
      This patch adds a new knob to say which layout is used and converts
      SystemZ to use target-independent scavenging slots.  It's one of the pieces
      needed to support frame-to-frame MVCs, where two slots might be required.
      
      The ABI requires us to allocate 160 bytes for calls, so one approach
      would be to use that area as temporary spill space instead.  It would need
      some surgery to make sure that the slot isn't live across a call though.
      
      I stuck to the "isFPCloseToIncomingSP - ..." style comment on the
      "do what the surrounding code does" principle.  The FP case is already
      covered by several Systemz/frame-* tests, which fail without the
      PrologueEpilogueInserter change, so no new ones are needed.
      
      No behavioural change intended.
      
      llvm-svn: 185696
      5dd52f8c
    • Benjamin Kramer's avatar
      Simplify code. No functionality change. · 5dbec7d9
      Benjamin Kramer authored
      llvm-svn: 185689
      5dbec7d9
  5. Jul 04, 2013
    • Nico Rieck's avatar
      Initialize object file info before output streamer · 316c3740
      Nico Rieck authored
      r179494 switched to using the object file info to retrieve the default text
      section for some MC streamers. It is possible that initializing an MC
      streamer can request sections before the object file info is initialized
      when the AutoInitSections flag is set on the streamer.
      
      llvm-svn: 185670
      316c3740
    • Jakob Stoklund Olesen's avatar
      Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes. · db429d94
      Jakob Stoklund Olesen authored
      These exception-related opcodes are not used any longer.
      
      llvm-svn: 185625
      db429d94
    • Jakob Stoklund Olesen's avatar
      Typo. · 6a7d6834
      Jakob Stoklund Olesen authored
      llvm-svn: 185618
      6a7d6834
    • Jakob Stoklund Olesen's avatar
      Simplify landing pad lowering. · fee2a202
      Jakob Stoklund Olesen authored
      Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
      landing pad arguments. These nodes were previously legalized into
      CopyFromReg nodes, but that never worked properly because the
      CopyFromReg node weren't guaranteed to be  scheduled at the top of the
      basic block.
      
      This meant the exception pointer and selector registers could be
      clobbered before being copied to a virtual register.
      
      This patch copies the two physical registers to virtual registers at
      the beginning of the basic block, and lowers the landingpad instruction
      directly to two CopyFromReg nodes reading the *virtual* registers. This
      is safe because virtual registers don't get clobbered.
      
      A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
      nodes.
      
      llvm-svn: 185617
      fee2a202
    • Jakob Stoklund Olesen's avatar
      FastISel can only apend to basic blocks. · 3d8560c3
      Jakob Stoklund Olesen authored
      Compute the insertion point from the end of the basic block instead of
      skipping labels from the front.
      
      This caused failures in landing pads when live-in copies where inserted
      before instruction selection.
      
      llvm-svn: 185616
      3d8560c3
    • Jakob Stoklund Olesen's avatar
      Live-in copies go *after* EH_LABELs. · bbbb5326
      Jakob Stoklund Olesen authored
      This will soon be tested by exception handling working at all.
      
      llvm-svn: 185615
      bbbb5326
    • Jakob Stoklund Olesen's avatar
      Revert r185595-185596 which broke buildbots. · a1f5b901
      Jakob Stoklund Olesen authored
      Revert "Simplify landing pad lowering."
      Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes."
      
      llvm-svn: 185600
      a1f5b901
    • Jakob Stoklund Olesen's avatar
      Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes. · f33ec531
      Jakob Stoklund Olesen authored
      These exception-related opcodes are not used any longer.
      
      llvm-svn: 185596
      f33ec531
    • Jakob Stoklund Olesen's avatar
      Simplify landing pad lowering. · fa6a7b9b
      Jakob Stoklund Olesen authored
      Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
      landing pad arguments. These nodes were previously legalized into
      CopyFromReg nodes, but that never worked properly because the
      CopyFromReg node weren't guaranteed to be  scheduled at the top of the
      basic block.
      
      This meant the exception pointer and selector registers could be
      clobbered before being copied to a virtual register.
      
      This patch copies the two physical registers to virtual registers at
      the beginning of the basic block, and lowers the landingpad instruction
      directly to two CopyFromReg nodes reading the *virtual* registers. This
      is safe because virtual registers don't get clobbered.
      
      A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
      nodes.
      
      llvm-svn: 185595
      fa6a7b9b
    • Jakob Stoklund Olesen's avatar
      Add MachineBasicBlock::addLiveIn(). · 533c3bf2
      Jakob Stoklund Olesen authored
      This function adds a live-in physical register to an MBB and ensures
      that it is copied to a virtual register immediately.
      
      llvm-svn: 185594
      533c3bf2
    • Eric Christopher's avatar
      Hoist all of the Entry.getLoc() calls int a single variable. · 614a89f5
      Eric Christopher authored
      llvm-svn: 185589
      614a89f5
    • Eric Christopher's avatar
      Make DotDebugLocEntry a class, reorder the members along with comments · 25f0642a
      Eric Christopher authored
      for them and update all uses.
      
      llvm-svn: 185588
      25f0642a
  6. Jul 03, 2013
Loading