oota-llvm.git
9 years agoAMDGPU: Remove dead code
Matt Arsenault [Sat, 19 Sep 2015 06:41:10 +0000 (06:41 +0000)]
AMDGPU: Remove dead code

getCFGStructurizerRegClass is not used for SI, so
move it into R600 specific stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248087 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNFC: Fix indentation and add braces to clarify nested of else-statement.
Bob Wilson [Sat, 19 Sep 2015 06:20:59 +0000 (06:20 +0000)]
NFC: Fix indentation and add braces to clarify nested of else-statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248086 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PrologEpilogInserter] Minor refactoring.
Maksim Panchenko [Sat, 19 Sep 2015 04:42:15 +0000 (04:42 +0000)]
[PrologEpilogInserter] Minor refactoring.

Differential Revision: http://reviews.llvm.org/D12924

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248084 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit. Fix comment. NFC.
Maksim Panchenko [Sat, 19 Sep 2015 04:01:19 +0000 (04:01 +0000)]
Test commit. Fix comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248082 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] FoldICmpCstShrCst failed for ashr when comparing against -1
David Majnemer [Sat, 19 Sep 2015 00:48:31 +0000 (00:48 +0000)]
[InstCombine] FoldICmpCstShrCst failed for ashr when comparing against -1

(icmp eq (ashr C1, %V) -1) may have multiple answers if C1 is not a
power of two and has the sign bit set.

This fixes PR24873.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248074 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] FoldICmpCstShrCst didn't handle icmps of -1 in the ashr case correctly
David Majnemer [Sat, 19 Sep 2015 00:48:26 +0000 (00:48 +0000)]
[InstCombine] FoldICmpCstShrCst didn't handle icmps of -1 in the ashr case correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248073 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Add failing testcase for live interval construction
Matt Arsenault [Sat, 19 Sep 2015 00:03:56 +0000 (00:03 +0000)]
AMDGPU: Add failing testcase for live interval construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248067 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IndVars] Widen more comparisons for non-negative induction vars
Sanjoy Das [Fri, 18 Sep 2015 21:21:02 +0000 (21:21 +0000)]
[IndVars] Widen more comparisons for non-negative induction vars

Summary:
If an induction variable is provably non-negative, its sign extension is
equal to its zero extension.  This means narrow uses like

  icmp slt iNarrow %indvar, %rhs

can be widened into

  icmp slt iWide zext(%indvar), sext(%rhs)

Reviewers: atrick, mcrosier, hfinkel

Subscribers: hfinkel, reames, llvm-commits

Differential Revision: http://reviews.llvm.org/D12745

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248045 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo and test commit
Luke Larson [Fri, 18 Sep 2015 21:15:45 +0000 (21:15 +0000)]
Fix typo and test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248042 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis code never uses r_addend, so it can just use Elf_Rel.
Rafael Espindola [Fri, 18 Sep 2015 21:12:38 +0000 (21:12 +0000)]
This code never uses r_addend, so it can just use Elf_Rel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248040 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Adding ALWAYS_GENERATE option to symlink utility functions.
Chris Bieneman [Fri, 18 Sep 2015 21:08:32 +0000 (21:08 +0000)]
[CMake] Adding ALWAYS_GENERATE option to symlink utility functions.

This implements the behavior required for clang symlinks which should be always generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248039 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object/ELF] Change comment to reflect reality.
Davide Italiano [Fri, 18 Sep 2015 20:41:15 +0000 (20:41 +0000)]
[Object/ELF] Change comment to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248032 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate edge weights properly when merging blocks in if-conversion.
Cong Hou [Fri, 18 Sep 2015 20:22:41 +0000 (20:22 +0000)]
Update edge weights properly when merging blocks in if-conversion.

In if-conversion, there is a utility function MergeBlocks() that is used to merge blocks. However, when new edges are built in this function the edge weight is either not provided or not updated properly, leading to a modified CFG with incorrect edge weights. This patch corrects this issue.

Differential Revision: http://reviews.llvm.org/D12513

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248030 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLimit the range of processors supported by ARM fast isel to v6 or
Eric Christopher [Fri, 18 Sep 2015 20:08:18 +0000 (20:08 +0000)]
Limit the range of processors supported by ARM fast isel to v6 or
later as that's all that is tested right now.

Fixes PR24858.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248027 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove couple of new Bitcode enum vals that snuck in via r247927 (NFC)
Teresa Johnson [Fri, 18 Sep 2015 19:38:53 +0000 (19:38 +0000)]
Remove couple of new Bitcode enum vals that snuck in via r247927 (NFC)

These are meant to be part of the follow on patch I am sending for
review shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248023 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoClean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s param...
Larisse Voufo [Fri, 18 Sep 2015 19:14:35 +0000 (19:14 +0000)]
Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan. (Complete version of r247497. See D12886)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248022 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake MachineScheduler debug output less confusing.
James Y Knight [Fri, 18 Sep 2015 18:52:20 +0000 (18:52 +0000)]
Make MachineScheduler debug output less confusing.

At least...a little bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248020 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoScaling up values in ARMBaseInstrInfo::isProfitableToIfCvt() before they are scaled...
Cong Hou [Fri, 18 Sep 2015 18:19:40 +0000 (18:19 +0000)]
Scaling up values in ARMBaseInstrInfo::isProfitableToIfCvt() before they are scaled by a probability to avoid precision issue.

In ARMBaseInstrInfo::isProfitableToIfCvt(), there is a simple cost model in which the number of cycles is scaled by a probability to estimate the cost. However, when the number of cycles is small (which is usually the case), there is a precision issue after the computation. To avoid this issue, this patch scales those cycles by 1024 (chosen to make the multiplication a litter faster) before they are scaled by the probability. Other variables are also scaled up for the final comparison.

Differential Revision: http://reviews.llvm.org/D12742

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248018 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSelectionDAGDumper: Leave out the <multiple use> markers
Matthias Braun [Fri, 18 Sep 2015 17:57:33 +0000 (17:57 +0000)]
SelectionDAGDumper: Leave out the <multiple use> markers

They mostly clutter the output while it is still possible to see which
node has multiple users without them.

Differential Revision: http://reviews.llvm.org/D12569

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248013 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSelectionDAGDumper: Avoid unnecessary newlines
Matthias Braun [Fri, 18 Sep 2015 17:57:31 +0000 (17:57 +0000)]
SelectionDAGDumper: Avoid unnecessary newlines

Before:
  t0 = EntryToken:ch

    t0: <multiple use>
        t0: <multiple use>
      t1 = CopyFromReg:v4f32,ch t0, Register:v4f32  %vreg0

      t25 = IMPLICIT_DEF:v4f32

    t26 = HADDPSrr:v4f32 t1, t25

  t23 = CopyToReg:ch,glue t0, Register:v4f32  %XMM0, t26

    t23: <multiple use>
    t23: <multiple use>
  t24 = RETQ:ch Register:v4f32  %XMM0, t23, t23:1

After:
    t0: <multiple use>
        t0: <multiple use>
      t1 = CopyFromReg:v4f32,ch t0, Register:v4f32  %vreg0
    t26 = X86ISD::FHADD:v4f32 t1, undef:v4f32
  t23 = CopyToReg:ch,glue t0, Register:v4f32  %XMM0, t26
    t23: <multiple use>
    t21 = TargetConstant:i16<0>
    t23: <multiple use>
  t24 = X86ISD::RET_FLAG:ch t23, t21, Register:v4f32  %XMM0, t23:1

Differential Revision: http://reviews.llvm.org/D12568

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248012 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSelectionDAGDumper: Hide [ID=X], [ORD=X] and source locations by default.
Matthias Braun [Fri, 18 Sep 2015 17:57:28 +0000 (17:57 +0000)]
SelectionDAGDumper: Hide [ID=X], [ORD=X] and source locations by default.

You can show them with the new -dag-dump-verbose switch.

Differential Revision: http://reviews.llvm.org/D12566

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248011 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSelectionDAG: Introduce PersistentID to SDNode for assert builds.
Matthias Braun [Fri, 18 Sep 2015 17:41:00 +0000 (17:41 +0000)]
SelectionDAG: Introduce PersistentID to SDNode for assert builds.

This gives us more human readable numbers to identify nodes in debug
dumps.

Before:
  0x7fcbd9700160: ch = EntryToken

  0x7fcbd985c7c8: i64 = Register %RAX

   ...

      0x7fcbd9700160: <multiple use>
    0x7fcbd985c578: i64,ch = MOV64rm 0x7fcbd985c6a0, 0x7fcbd985cc68, 0x7fcbd985c200, 0x7fcbd985cd90, 0x7fcbd985ceb8, 0x7fcbd9700160<Mem:LD8[@foo]> [ORD=2]

  0x7fcbd985c8f0: ch,glue = CopyToReg 0x7fcbd9700160, 0x7fcbd985c7c8, 0x7fcbd985c578 [ORD=3]

    0x7fcbd985c7c8: <multiple use>
    0x7fcbd985c8f0: <multiple use>
    0x7fcbd985c8f0: <multiple use>
  0x7fcbd985ca18: ch = RETQ 0x7fcbd985c7c8, 0x7fcbd985c8f0, 0x7fcbd985c8f0:1 [ORD=3]

Now:
  t0: ch = EntryToken

  t5: i64 = Register %RAX

    ...

      t0: <multiple use>
    t3: i64,ch = MOV64rm t10, t12, t11, t13, t14, t0<Mem:LD8[@foo]> [ORD=2]

  t6: ch,glue = CopyToReg t0, t5, t3 [ORD=3]

    t5: <multiple use>
    t6: <multiple use>
    t6: <multiple use>
  t7: ch = RETQ t5, t6, t6:1 [ORD=3]

Differential Revision: http://reviews.llvm.org/D12564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248010 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] More cleanup of installing symlinks.
Chris Bieneman [Fri, 18 Sep 2015 17:39:58 +0000 (17:39 +0000)]
[CMake] More cleanup of installing symlinks.

In order to support building clang out-of-tree the install_symlink script needs to be installed, and it needs to be found by searching the CMAKE_MODULE_PATH.

This change renames install_symlink -> LLVMInstallSymlink so it doesn't conflict with naming from other projects, and adds searching behavior in AddLLVM.cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248009 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Improved bitfield instruction selection.
Geoff Berry [Fri, 18 Sep 2015 17:11:53 +0000 (17:11 +0000)]
[AArch64] Improved bitfield instruction selection.

Summary:
For bitfield insert OR matching, check both operands for larger pattern
first before checking for smaller pattern.

Add pattern for unsigned bitfield insert-in-zero done with SHL+AND.

Resolves PR21631.

Reviewers: jmolloy, t.p.northover

Subscribers: aemerson, rengolin, llvm-commits, mcrosier

Differential Revision: http://reviews.llvm.org/D12908

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248006 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove temporary file on signal.
Rafael Espindola [Fri, 18 Sep 2015 15:17:53 +0000 (15:17 +0000)]
Remove temporary file on signal.

Without this lld leaves temporary files behind when it crashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247994 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit...
Yaron Keren [Fri, 18 Sep 2015 15:08:24 +0000 (15:08 +0000)]
Simplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit builds
and assert when mask is too large to apply in the small case,
previously the extra words were silently ignored.
clang-format the entire function to match current code standards.

This is a rewrite of r247972 which was reverted in r247983 due to
warning and possible UB on 32-bits hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247993 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Fix an invalid read for lwm32 and reserved reglist values.
Daniel Sanders [Fri, 18 Sep 2015 14:20:54 +0000 (14:20 +0000)]
[mips][microMIPS] Fix an invalid read for lwm32 and reserved reglist values.

Summary:
Some values of 'reglist' are reserved and cause the disassembler to read past
the end of the Regs array. Treat lwm32's containing reserved values as invalid
instructions.

Reviewers: zoran.jovanovic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12959

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247990 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Reorder cases to improve readability. NFC.
Chad Rosier [Fri, 18 Sep 2015 14:15:19 +0000 (14:15 +0000)]
[AArch64] Reorder cases to improve readability. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247989 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Remove some redundant cases. NFC.
Chad Rosier [Fri, 18 Sep 2015 14:13:18 +0000 (14:13 +0000)]
[AArch64] Remove some redundant cases. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247988 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSilencing a -Wsign-compare warning; NFC.
Aaron Ballman [Fri, 18 Sep 2015 13:31:42 +0000 (13:31 +0000)]
Silencing a -Wsign-compare warning; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247986 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LazyValueInfo] Report nonnull range for nonnull pointers
Igor Laevsky [Fri, 18 Sep 2015 13:01:48 +0000 (13:01 +0000)]
[LazyValueInfo] Report nonnull range for nonnull pointers

Currently LazyValueInfo will report only alloca's as having nonnull range.
For loads with !nonnull metadata it will bailout with no additional information.
Same is true for calls returning nonnull pointers.

This change extends LazyValueInfo to handle additional nonnull instructions.

Differential Revision: http://reviews.llvm.org/D12932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247985 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport align attribute for return values
Artur Pilipenko [Fri, 18 Sep 2015 12:33:31 +0000 (12:33 +0000)]
Support align attribute for return values

Reviewed By: reames

Differential Revision: http://reviews.llvm.org/D12844

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247984 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReverting r247972 (and subordinate commit r247972) as the 32-bit left-shift is undefi...
Aaron Ballman [Fri, 18 Sep 2015 12:18:41 +0000 (12:18 +0000)]
Reverting r247972 (and subordinate commit r247972) as the 32-bit left-shift is undefined behavior on implementations where uinptr_t is 32-bits. One such platform is Windows, MSVC, x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247983 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNit cleanup in LangRef about dereferenceable metadata
Artur Pilipenko [Fri, 18 Sep 2015 12:07:10 +0000 (12:07 +0000)]
Nit cleanup in LangRef about dereferenceable metadata

Reviewed By: vsk

Differential Revision: http://reviews.llvm.org/D12847

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247982 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Support] Reapply r245289 "Always wait for GraphViz before opening the viewer"
Michael Kruse [Fri, 18 Sep 2015 10:56:30 +0000 (10:56 +0000)]
[Support] Reapply r245289 "Always wait for GraphViz before opening the viewer"

The change was accidentally undone by r245290.

Original log message:
When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always wait for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer.

This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux.

Differential Revision: http://reviews.llvm.org/D11876

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247980 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-mc-fuzzer] Document llvm-mc-fuzzer in LibFuzzer.rst.
Daniel Sanders [Fri, 18 Sep 2015 10:47:45 +0000 (10:47 +0000)]
[llvm-mc-fuzzer] Document llvm-mc-fuzzer in LibFuzzer.rst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247979 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Moved funclet pads should be in relative order
David Majnemer [Fri, 18 Sep 2015 08:18:07 +0000 (08:18 +0000)]
[WinEH] Moved funclet pads should be in relative order

We shifted the MachineBasicBlocks to the end of the MachineFunction in
DFS order.  This will not ensure that MachineBasicBlocks which fell
through to one another will remain contiguous.  Instead, implement
a stable sort algorithm for iplist.

This partially reverts commit r214150.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247978 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix BitVectorTest on 32-bit hosts after r247972.
Yaron Keren [Fri, 18 Sep 2015 07:24:35 +0000 (07:24 +0000)]
Fix BitVectorTest on 32-bit hosts after r247972.
We can't apply two words of 32-bit mask in the small case
where the internal storage is just one 32-bit word.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247974 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64...
Yaron Keren [Fri, 18 Sep 2015 06:35:12 +0000 (06:35 +0000)]
Simplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64-bit builds.
Extend mask value to 64 bits before taking its complement and assert when mask is
too large to apply in the small case (previously the extra words were silently ignored).

http://reviews.llvm.org/D11890

Patch by James Touton!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247972 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove trailing whitespace from the old Orc Kaleidoscope examples.
Lang Hames [Fri, 18 Sep 2015 06:16:49 +0000 (06:16 +0000)]
Remove trailing whitespace from the old Orc Kaleidoscope examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247971 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhitespace. Indent with spaces instead of a tab.
Bob Wilson [Fri, 18 Sep 2015 05:36:13 +0000 (05:36 +0000)]
Whitespace. Indent with spaces instead of a tab.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247969 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ShrinkWrap] Refactor the handling of infinite loop in the analysis.
Quentin Colombet [Thu, 17 Sep 2015 23:21:34 +0000 (23:21 +0000)]
[ShrinkWrap] Refactor the handling of infinite loop in the analysis.
- Strenghten the logic to be sure we hoist the restore point out of the current
  loop. (The fixes a bug with infinite loop, added as part of the patch.)
- Walk over the exit blocks of the current loop to conver to the desired restore
  point in one iteration of the update loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247958 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-readobj] Fix another "time of check to time of use bug".
Davide Italiano [Thu, 17 Sep 2015 22:29:58 +0000 (22:29 +0000)]
[llvm-readobj] Fix another "time of check to time of use bug".

It seems there's more copy-paste between tools than needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247954 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer types] Add an explicit pointee type to alias records in the IR
David Blaikie [Thu, 17 Sep 2015 22:18:59 +0000 (22:18 +0000)]
[opaque pointer types] Add an explicit pointee type to alias records in the IR

Since aliases actually use and verify their explicit type already, no
further invalid testing is required here. The
invalid.test:ALIAS-TYPE-MISMATCH case catches errors due to emitting a
non-pointee type in the new format or a non-pointer type in the old
format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247952 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[bpf] expand indirect branches
Alexei Starovoitov [Thu, 17 Sep 2015 22:18:08 +0000 (22:18 +0000)]
[bpf] expand indirect branches

BPF instruction set doesn't have indirect branches. Expand them.

Reported by John Fastabend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247951 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "(HEAD -> master, origin/master, origin/HEAD) RegisterPressure: Move LiveInReg...
Matthias Braun [Thu, 17 Sep 2015 21:12:24 +0000 (21:12 +0000)]
Revert "(HEAD -> master, origin/master, origin/HEAD) RegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker"

This reverts commit r247943.

Accidental commit, code review was not finished yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247945 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Fix tests broken by funclet-layout
David Majnemer [Thu, 17 Sep 2015 21:11:12 +0000 (21:11 +0000)]
[WinEH] Fix tests broken by funclet-layout

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247944 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker
Matthias Braun [Thu, 17 Sep 2015 21:10:06 +0000 (21:10 +0000)]
RegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker

Differential Revision: http://reviews.llvm.org/D12814

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247943 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMachineScheduler: Provide an option for node hiding cutoff and disable it by default
Matthias Braun [Thu, 17 Sep 2015 21:09:59 +0000 (21:09 +0000)]
MachineScheduler: Provide an option for node hiding cutoff and disable it by default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247942 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARC] Add mulscc.
Joerg Sonnenberger [Thu, 17 Sep 2015 20:54:26 +0000 (20:54 +0000)]
[SPARC] Add mulscc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247940 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typo; NFC
Sanjay Patel [Thu, 17 Sep 2015 20:51:50 +0000 (20:51 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247938 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Add a funclet layout pass
David Majnemer [Thu, 17 Sep 2015 20:45:18 +0000 (20:45 +0000)]
[WinEH] Add a funclet layout pass

Windows EH funclets need to be contiguous.  The FuncletLayout pass will
ensure that the funclets are together and begin with a funclet entry MBB.

Differential Revision: http://reviews.llvm.org/D12943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247937 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Make funclet return instrs pseudo instrs
Reid Kleckner [Thu, 17 Sep 2015 20:43:47 +0000 (20:43 +0000)]
[WinEH] Make funclet return instrs pseudo instrs

This makes catchret look more like a branch, and less like a weird use
of BlockAddress. It also lets us get away from
llvm.x86.seh.restoreframe, which relies on the old parentfpoffset label
arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247936 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agogvn small fix
Piotr Padlewski [Thu, 17 Sep 2015 20:34:22 +0000 (20:34 +0000)]
gvn small fix

http://reviews.llvm.org/D12928

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247935 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Added vector demanded bits support for SSE4A EXTRQ/INSERTQ instructions
Simon Pilgrim [Thu, 17 Sep 2015 20:32:45 +0000 (20:32 +0000)]
[InstCombine] Added vector demanded bits support for SSE4A EXTRQ/INSERTQ instructions

The SSE4A instructions EXTRQ/INSERTQ only use the lower 64-bits (or less) for many of their input vector operands and all of them have undefined upper 64-bits results.

Differential Revision: http://reviews.llvm.org/D12680

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247934 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdded MD_invariant_group to LLVMContext
Piotr Padlewski [Thu, 17 Sep 2015 20:25:07 +0000 (20:25 +0000)]
Added MD_invariant_group to LLVMContext

http://reviews.llvm.org/D12926

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247931 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRestore "Function bitcode index in Value Symbol Table and lazy reading support"
Teresa Johnson [Thu, 17 Sep 2015 20:12:00 +0000 (20:12 +0000)]
Restore "Function bitcode index in Value Symbol Table and lazy reading support"

This reverts commit r247898 (which reverted r247894).

Patch fixed to address two issues exposed by buildbots:
- unused variable warning in NDEBUG mode
- std::initializer_list lifetime issue causing test failures

Original Summary:
Support for including the function bitcode indices in the Value Symbol
Table. This requires writing the VST after the function blocks, which in
turn requires a new VST forward declaration record encoding the offset of
the full VST (which is backpatched to contain the offset after the VST
is written).

This patch also enables the lazy function reader to use the new function
indices out of the VST. This support will be used by ThinLTO as well, which
will be in a follow on patch. Backwards compatibility with older bitcode
files is maintained.

A new test is also included.

The bitcode format (used for the lazy reader as well as the upcoming
ThinLTO patches) came out of discussions with Duncan and others and is
described here:
https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view

Reviewers: dexonsmith, davidxl, joker.eph

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12536

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247927 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTemporarily fix gcov failures in big-endian hosts.
Diego Novillo [Thu, 17 Sep 2015 19:05:48 +0000 (19:05 +0000)]
Temporarily fix gcov failures in big-endian hosts.

This test uses a gcov file generated in a little-endian host. The gcov
reader does not allow different endianness, so the test fails on big
endian hosts.

XFAILing for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247920 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SCEV] Use auto instead of full iterator type; NFCI.
Sanjoy Das [Thu, 17 Sep 2015 19:04:09 +0000 (19:04 +0000)]
[SCEV] Use auto instead of full iterator type; NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247919 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SCEV] Don't repeat method/field names in comment in header; NFC.
Sanjoy Das [Thu, 17 Sep 2015 19:04:03 +0000 (19:04 +0000)]
[SCEV] Don't repeat method/field names in comment in header; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247918 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the test case I just committed
Reid Kleckner [Thu, 17 Sep 2015 17:21:45 +0000 (17:21 +0000)]
Fix the test case I just committed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247905 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Add and use hasEHPadSuccessor instead of getLandingPadSuccessor
Reid Kleckner [Thu, 17 Sep 2015 17:19:40 +0000 (17:19 +0000)]
[WinEH] Add and use hasEHPadSuccessor instead of getLandingPadSuccessor

getLandingPadSuccessor assumes that each invoke can have at most one EH
pad successor, but WinEH invokes can have more than one. Two out of
three callers of getLandingPadSuccessor don't use the returned
landingpad, so we can make them use this simple predicate instead.

Eventually we'll have to circle back and fix SplitKit.cpp so that
register allocation works. Baby steps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247904 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit.
Zia Ansari [Thu, 17 Sep 2015 16:51:27 +0000 (16:51 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247901 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Function bitcode index in Value Symbol Table and lazy reading support"
Teresa Johnson [Thu, 17 Sep 2015 16:19:10 +0000 (16:19 +0000)]
Revert "Function bitcode index in Value Symbol Table and lazy reading support"

Temporarily revert to fix some buildbot issues. One is a minor issue
with a variable unused in NDEBUG mode. More concerning are some test
failures on win7 that I need to dig into.

This reverts commit 4e66a74543459832cfd571db42b4543580ae1d1d.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247898 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Add assembler support for the .cprestore directive.
Daniel Sanders [Thu, 17 Sep 2015 16:08:39 +0000 (16:08 +0000)]
[mips] Add assembler support for the .cprestore directive.

Summary:
This assembler directive is used in O32 PIC to restore the current function's $gp after executing JAL's. The $gp is first stored on the stack at a user-specified offset.
It has the following format: ".cprestore 8" (where 8 is the offset).

This fixes llvm.org/PR20967.

Patch by Toma Tabacu.

Reviewers: seanbruno, tomatabacu

Subscribers: brooks, seanbruno, emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D6267

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247897 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix doc build: sublists require a blank line before/after.
Mehdi Amini [Thu, 17 Sep 2015 15:59:52 +0000 (15:59 +0000)]
Fix doc build: sublists require a blank line before/after.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247896 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFunction bitcode index in Value Symbol Table and lazy reading support
Teresa Johnson [Thu, 17 Sep 2015 15:52:30 +0000 (15:52 +0000)]
Function bitcode index in Value Symbol Table and lazy reading support

Summary:
Support for including the function bitcode indices in the Value Symbol
Table. This requires writing the VST after the function blocks, which in
turn requires a new VST forward declaration record encoding the offset of
the full VST (which is backpatched to contain the offset after the VST
is written).

This patch also enables the lazy function reader to use the new function
indices out of the VST. This support will be used by ThinLTO as well, which
will be in a follow on patch. Backwards compatibility with older bitcode
files is maintained.

A new test is also included.

The bitcode format (used for the lazy reader as well as the upcoming
ThinLTO patches) came out of discussions with Duncan and others and is
described here:
https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view

Reviewers: dexonsmith, davidxl, joker.eph

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12536

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247894 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactor string encoding checks in BitcodeWriter (NFC)
Teresa Johnson [Thu, 17 Sep 2015 14:37:35 +0000 (14:37 +0000)]
Refactor string encoding checks in BitcodeWriter (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247891 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTypos. NFC.
Chad Rosier [Thu, 17 Sep 2015 13:10:27 +0000 (13:10 +0000)]
Typos. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247884 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement TEQ, TGE, TGEU, TLT, TLTU and TNE instructions
Zoran Jovanovic [Thu, 17 Sep 2015 10:14:09 +0000 (10:14 +0000)]
[mips][microMIPS] Implement TEQ, TGE, TGEU, TLT, TLTU and TNE instructions
Differential Revision: http://reviews.llvm.org/D9658

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247880 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: shufflevector for i1 vectors <2 x i1> .. <64 x i1>
Elena Demikhovsky [Thu, 17 Sep 2015 06:53:12 +0000 (06:53 +0000)]
AVX-512: shufflevector for i1 vectors <2 x i1> .. <64 x i1>
AVX-512 does not provide an instruction that shuffles mask register. So I do the following way:

mask-2-simd , shuffle simd , simd-2-mask

Differential Revision: http://reviews.llvm.org/D12727

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247876 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGCC AutoFDO profile reader - Initial support.
Diego Novillo [Thu, 17 Sep 2015 00:17:24 +0000 (00:17 +0000)]
GCC AutoFDO profile reader - Initial support.

This adds enough machinery to support reading simple GCC AutoFDO
profiles. It now supports reading flat profiles (no function calls).
Subsequent patches will add support for:

- Inlined calls (in particular, the inline call stack is not traversed
  to accumulate samples).

- Working sets and modules. These are used mostly for GCC's LIPO
  optimizations, so they're not needed in LLVM atm. I'm not sure that
  we will ever need them. For now, I've if0'd around the calls.

The patch also adds support in GCOV.h for gcov version V704 (generated
by GCC's profile conversion tool).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247874 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCheck for errors after reading a sample profile in llvm-profdata.
Diego Novillo [Thu, 17 Sep 2015 00:17:21 +0000 (00:17 +0000)]
Check for errors after reading a sample profile in llvm-profdata.

After reading the profile, check if the reader returned any errors
before showing the profile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247873 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry to fix WebAssembly build after r247864
Hans Wennborg [Wed, 16 Sep 2015 23:59:57 +0000 (23:59 +0000)]
Try to fix WebAssembly build after r247864

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247870 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoScalarEvolution: added tmp to avoid use-after-dtor in for loop.
Naomi Musgrave [Wed, 16 Sep 2015 23:46:40 +0000 (23:46 +0000)]
ScalarEvolution: added tmp to avoid use-after-dtor in for loop.

Summary:
For loop destroyed current instance before invoking next.
Temporary variable added to prevent use-after-dtor when invoke
destructor on current instance.

Reviewers: eugenis

Subscribers: llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D12912

Rename temp var.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247867 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake sure we're negating the assembler predicate - no testcase
Eric Christopher [Wed, 16 Sep 2015 23:38:18 +0000 (23:38 +0000)]
Make sure we're negating the assembler predicate - no testcase
because it isn't being used on anything via the assembler right
now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247866 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse the cached TargetInstrInfo instead of looking it up again.
Eric Christopher [Wed, 16 Sep 2015 23:38:16 +0000 (23:38 +0000)]
Use the cached TargetInstrInfo instead of looking it up again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247865 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoconstify the Function parameter to the TTI creation callback and
Eric Christopher [Wed, 16 Sep 2015 23:38:13 +0000 (23:38 +0000)]
constify the Function parameter to the TTI creation callback and
propagate to all callers/users/etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247864 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Rip out the landingpad-based C++ EH state numbering code
Reid Kleckner [Wed, 16 Sep 2015 22:14:46 +0000 (22:14 +0000)]
[WinEH] Rip out the landingpad-based C++ EH state numbering code

It never really worked, and the new code is working better every day.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247860 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] More refactoring of symlink creation.
Chris Bieneman [Wed, 16 Sep 2015 20:49:59 +0000 (20:49 +0000)]
[CMake] More refactoring of symlink creation.

This refactoring is to enable clang to re-use this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247850 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEHPrepare] Turn terminatepad into a cleanuppad + call + cleanupret
David Majnemer [Wed, 16 Sep 2015 20:42:16 +0000 (20:42 +0000)]
[WinEHPrepare] Turn terminatepad into a cleanuppad + call + cleanupret

The MSVC doesn't really support exception specifications so let's just
turn these into cleanuppads.  Later, we might use terminatepad to more
efficiently encode the "noexcept"-ness of a function body.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247848 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAllow BackpatchWord to be called for non-32-bit aligned words, and
Teresa Johnson [Wed, 16 Sep 2015 20:41:43 +0000 (20:41 +0000)]
Allow BackpatchWord to be called for non-32-bit aligned words, and
from outside the BitstreamWriter.

Split out of patch D12536 (Function bitcode index in Value Symbol Table
and lazy reading support), which will use it to patch in the VST offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247847 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Optimize icmp slt signum(x), 1 --> icmp slt x, 1
Sanjoy Das [Wed, 16 Sep 2015 20:41:29 +0000 (20:41 +0000)]
[InstCombine] Optimize icmp slt signum(x), 1 --> icmp slt x, 1

Summary:
`signum(x)` is sometimes implemented as `(x >> 63) | (-x >>> 63)` (for
an `i64` `x`).  This change adds a matcher for that pattern, and an
instcombine rule to optimize `signum(x) s< 1`.

Later, we can also consider optimizing:

  icmp slt signum(x), 0 --> icmp slt x, 0
  icmp sle signum(x), 1 --> true

etc.

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12703

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247846 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Pull Adjectives and CatchObj out of the catchpad arg list
Reid Kleckner [Wed, 16 Sep 2015 20:16:27 +0000 (20:16 +0000)]
[WinEH] Pull Adjectives and CatchObj out of the catchpad arg list

Clang now passes the adjectives as an argument to catchpad.

Getting the CatchObj working is simply a matter of threading another
static alloca through codegen, first as an alloca, then as a frame
index, and finally as a frame offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247844 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEHPrepare] Provide a cloning mode which doesn't demote
David Majnemer [Wed, 16 Sep 2015 18:40:37 +0000 (18:40 +0000)]
[WinEHPrepare] Provide a cloning mode which doesn't demote

We are experimenting with a new approach to saving and restoring SSA
values used across funclets: let the register allocator do the dirty
work for us.

However, this means that we need to be able to clone commoned blocks
without relying on demotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247835 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEHPrepare] Refactor explicit EH preparation
David Majnemer [Wed, 16 Sep 2015 18:40:24 +0000 (18:40 +0000)]
[WinEHPrepare] Refactor explicit EH preparation

Split the preparation machinery into several functions, we will want to
selectively enable/disable different parts of it for an alternative
mechanism for dealing with cross-funclet uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247834 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisable the second verification run when performing LTO through
Teresa Johnson [Wed, 16 Sep 2015 18:06:45 +0000 (18:06 +0000)]
Disable the second verification run when performing LTO through
gold in NDEBUG mode.
Follow on patch for r247729 - LTO: Disable extra verify runs in release
builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247824 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Skip state numbering when no EH pads are present
Reid Kleckner [Wed, 16 Sep 2015 17:19:44 +0000 (17:19 +0000)]
[WinEH] Skip state numbering when no EH pads are present

Otherwise we'd try to emit the thunk that passes the LSDA to
__CxxFrameHandler3. We don't emit the LSDA if there were no landingpads,
so we'd end up with an assembler error when trying to write the COFF
object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247820 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImprove "default_triple" specification: make it at the directory level for test/tools...
Mehdi Amini [Wed, 16 Sep 2015 17:03:12 +0000 (17:03 +0000)]
Improve "default_triple" specification: make it at the directory level for test/tools/llvm-mc

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247819 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Check in an initial CFG Stackifier pass
Dan Gohman [Wed, 16 Sep 2015 16:51:30 +0000 (16:51 +0000)]
[WebAssembly] Check in an initial CFG Stackifier pass

This pass implements a simple algorithm for conversion from CFG to
wasm's structured control flow. It doesn't yet handle multiple-entry
loops; that will be added in a future patch.

It also adds initial support for switch statements.

Differential Revision: http://reviews.llvm.org/D12735

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247818 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agopropagate fast-math-flags on DAG nodes
Sanjay Patel [Wed, 16 Sep 2015 16:31:21 +0000 (16:31 +0000)]
propagate fast-math-flags on DAG nodes

After D10403, we had FMF in the DAG but disabled by default. Nick reported no crashing errors after some stress testing,
so I enabled them at r243687. However, Escha soon notified us of a bug not covered by any in-tree regression tests:
if we don't propagate the flags, we may fail to CSE DAG nodes because differing FMF causes them to not match. There is
one test case in this patch to prove that point.

This patch hopes to fix or leave a 'TODO' for all of the in-tree places where we create nodes that are FMF-capable. I
did this by putting an assert in SelectionDAG.getNode() to find any FMF-capable node that was being created without FMF
( D11807 ). I then ran all regression tests and test-suite and confirmed that everything passes.

This patch exposes remaining work to get DAG FMF to be fully functional: (1) add the flags to non-binary nodes such as
FCMP, FMA and FNEG; (2) add the flags to intrinsics; (3) use the flags as conditions for transforms rather than the
current global settings.

Differential Revision: http://reviews.llvm.org/D12095

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247815 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd assembler fatal error for undefined assembler labels in COFF writer
Reid Kleckner [Wed, 16 Sep 2015 16:26:29 +0000 (16:26 +0000)]
Add assembler fatal error for undefined assembler labels in COFF writer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247814 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 16 Sep 2015 16:21:08 +0000 (16:21 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247813 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[sanitizer] Add MSan support for AArch64
Adhemerval Zanella [Wed, 16 Sep 2015 15:10:27 +0000 (15:10 +0000)]
[sanitizer] Add MSan support for AArch64

This patch adds support for msan on aarch64-linux for both 39 and
42-bit VMA.  The support is enabled by defining the
SANITIZER_AARCH64_VMA compiler flag to either 39 or 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247807 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARC] Both GNU and Solaris as support eq as condition code for integer ops.
Joerg Sonnenberger [Wed, 16 Sep 2015 14:41:36 +0000 (14:41 +0000)]
[SPARC] Both GNU and Solaris as support eq as condition code for integer ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247804 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SPARC] Recognize st/stx operations with %fsr argument too.
Joerg Sonnenberger [Wed, 16 Sep 2015 13:30:54 +0000 (13:30 +0000)]
[SPARC] Recognize st/stx operations with %fsr argument too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247794 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit: Fixed a few typos in the comments.
David L Kreitzer [Wed, 16 Sep 2015 13:27:30 +0000 (13:27 +0000)]
Test commit: Fixed a few typos in the comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247793 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Register ARMPreAllocLoadStoreOpt pass with LLVM pass manager.
Chad Rosier [Wed, 16 Sep 2015 13:11:31 +0000 (13:11 +0000)]
[ARM] Register ARMPreAllocLoadStoreOpt pass with LLVM pass manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247791 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-mc-fuzzer: A fuzzing tool for the MC layer.
Daniel Sanders [Wed, 16 Sep 2015 11:49:49 +0000 (11:49 +0000)]
llvm-mc-fuzzer: A fuzzing tool for the MC layer.

Summary:
Only the disassembler is supported in this patch but it has already found a few
issues in the Mips disassembler (mostly invalid instructions being successfully
disassembled).

Reviewers: kcc

Subscribers: russell.gallop, silvas, kcc, llvm-commits

Differential Revision: http://reviews.llvm.org/D12723

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247786 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Do not generate 64-bit pops of 32-bit GPRs.
Michael Kuperstein [Wed, 16 Sep 2015 11:27:20 +0000 (11:27 +0000)]
[X86] Do not generate 64-bit pops of 32-bit GPRs.

When trying emit a stack adjustments using pops, frame lowering selects an
arbitrary free GPR. It should always select one from an appropriate class...
This fixes PR24649.

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D12609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247785 91177308-0d34-0410-b5e6-96231b3b80d8