133903 Commits

Author SHA1 Message Date
George Burgess IV
6e4ee4f333 Attempt to make MSVC buildbots happy.
Broken by r273219.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 23:20:49 +00:00
George Burgess IV
4ac871846d [CFLAA] Add interprocedural function summaries.
This patch adds function summaries, so that we don't need to recompute
various properties about function parameters/return values at each
callsite of a function. It also adds many interprocedural tests for
CFLAA.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21475#inline-182390


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 23:10:56 +00:00
Simon Pilgrim
06026c4ca3 [X86][SSE] Add cost model for BSWAP of vectors
The BSWAP of vector types is quite efficiently implemented using vector shuffles on SSE/AVX targets, we should reflect the typical cost of this to encourage vectorization.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 23:08:21 +00:00
Simon Pilgrim
bf57e9c14c [X86][X87] Fix issue with sitofp i64 -> fp128 on 32-bit targets
Fix for PR27726 - sitofp i64 to fp128 was loading the merged load i64 to a x87 register preventing legalization for conversion to fp128.

Added 32-bit tests for fp128 cast/conversions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 22:41:17 +00:00
Sanjay Patel
46137a4c2c don't repeat function names in documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 22:40:35 +00:00
Kevin Enderby
9b90e7e263 Forgot to svn add one of my test files for the change in r273207.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273208 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 22:27:49 +00:00
Kevin Enderby
f5d5db71df Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects.
Darwin added support in its Xcode 8.0 tools (released in the beta) for universal
files where offsets and sizes for the objects are 64-bits to allow support for
objects contained in universal files to be larger then 4gb.  The change is very
straight forward.  There is a new magic number that differs by one bit, much
like the 64-bit Mach-O files.  Then there is a new structure that follow the
fat_header that has the same layout but with the offset and size fields using
64-bit values instead of 32-bit values.

rdar://26899493


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 22:16:18 +00:00
Rafael Espindola
ad097a448b Delete dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 22:08:35 +00:00
Easwaran Raman
7be6f15432 Remove interface to get/set MaxFunctionCount
Differential revision: http://reviews.llvm.org/D19185


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 21:36:38 +00:00
Vedant Kumar
bdba755f85 [tsan] Do not instrument accesses to the gcov counters array
There is a known intended race here. This is a follow-up to r264805,
which disabled tsan instrumentation for updates to instrprof counters.
For more background on this please see the discussion in D18164.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 21:24:26 +00:00
Sanjay Patel
832e25415d [InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic (PR27869)
By moving this transform to InstSimplify from InstCombine, we sidestep the problem/question
raised by PR27869:
https://llvm.org/bugs/show_bug.cgi?id=27869
...where InstCombine turns an icmp+zext into a shift causing us to miss the fold.

Credit to David Majnemer for a draft patch of the changes to InstructionSimplify.cpp.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:59:59 +00:00
Dehao Chen
8122c25a1a Pass AssumptionCacheTracker from SampleProfileLoader to Inliner
Summary: Inliner needs ACT when calling InlineFunction. Instead of nullptr, we need to pass it in from SampleProfileLoader

Reviewers: davidxl

Subscribers: eraman, vsk, danielcdh, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:53:40 +00:00
Thomas Jablin
920d0ae595 test commit: remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:43:26 +00:00
Aaron Ballman
0e65d2f433 Fix a relatively nasty bug with fs::getPathFromOpenFD() on Windows. The GetFinalPathNameByHandle API does not behave as documented; if given a buffer that has enough space for the path but not the null terminator, the call will return the number of characters required *without* the null terminator (despite being documented otherwise) and it will not set GetLastError(). The result was that this function would return a bogus path and no error. Instead, ensure there is sufficient space for a null terminator (we already strip it off manually for compatibility with older versions of Windows).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:28:49 +00:00
Daniel Berlin
50d58070c0 Rename to be consistent with other type names. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:21:33 +00:00
George Burgess IV
4c758ff487 [MemorySSA] Clean up unit tests a tiny bit. NFC.
We recently made MemorySSA own the walker it creates. As a part of this,
the MSSA test fixture was changed to have a `Walker*` instead of a
`unique_ptr<Walker>`. So, we no longer need to do `&*Walker` in order to
get a `Walker*`.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 19:13:07 +00:00
Matt Arsenault
d158fa7c9d InstCombine: Don't strip convergent from intrinsic callsites
Specific instances of intrinsic calls may want to be convergent, such
as certain register reads but the intrinsic declaration is not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 19:04:44 +00:00
Rafael Espindola
1408d40489 Add a isPositionIndependent helper to ARMFastISel. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 19:00:05 +00:00
Sanjay Patel
889cd9b90a [InstCombine] consolidate some icmp+logic tests and improve checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:40:37 +00:00
Evandro Menezes
8ff4f4ad5b [AArch64] Adjust the loop buffer size for Exynos M1 (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:39:41 +00:00
Lang Hames
6c2d562b4c [Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:37:52 +00:00
Lang Hames
4cf102de04 [Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:34:46 +00:00
Matt Arsenault
b2902b2eb0 AMDGPU: Preserve undef flag on vcc when shrinking v_cndmask_b32
The implicit operand is added by the initial instruction construction,
so this was adding an additional vcc use. The original one
was missing the undef flag the original condition had,
so the verifier would complain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:34:00 +00:00
Matt Arsenault
17f22f98eb AMDGPU: Fold more custom nodes to undef
This will help sneak undefs past GVN into the DAG for
some tests.

Also add missing intrinsic for rsq_legacy, even though the node
was already selected to the instruction. Also start passing
the debug location to intrinsic errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:33:56 +00:00
Sanjay Patel
cefb67466a [InstCombine] update to use FileCheck with autogenerated exact checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:23:40 +00:00
Matt Arsenault
96ad9ea23d Generalize DiagnosticInfoStackSize to support other limits
Backends may want to report errors on resources other than
stack size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 18:13:04 +00:00
Sanjay Patel
61fd0e8c35 [InstCombine] update to use FileCheck with autogenerated exact checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273173 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:56:13 +00:00
Matt Arsenault
61691ce470 AMDGPU: Use correct method for determining instruction size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273172 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:51:32 +00:00
Adrian McCarthy
741101db8b Properly handle short file names on the command line in Windows [TAKE 2]
Trying to expand short names with a relative path doesn't work, so this
first gets the module name to get a full path (which can still have short
names).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273171 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:51:27 +00:00
Sanjay Patel
307efec848 [InstCombine] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273170 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:48:48 +00:00
Rafael Espindola
a2f3bd3103 Use shouldAssumeDSOLocal.
With this ARM fast isel knows that PIE variable are not preemptable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:45:33 +00:00
Tom Stellard
75473ec73e AMDGPU: Add support for R_AMDGPU_REL32 relocations
Reviewers: arsenm, kzhuravl, rafael

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:33:43 +00:00
Rafael Espindola
255303f8ea Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 17:00:13 +00:00
Tom Stellard
a0adb8d997 AMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations
Reviewers: arsenm, rafael, kzhuravl

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273166 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 16:59:44 +00:00
Sam Parker
a02f69b1c1 [ARM] Enable isel of UMAAL
TargetLowering and DAGToDAG are used to combine ADDC, ADDE and UMLAL
dags into UMAAL. Selection is split into the two phases because it
is easier to match the two patterns at those different times.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273165 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 16:47:09 +00:00
Rafael Espindola
5b2db1b4cc Add a isPositionIndependent predicate.
Reduces a bit of code duplication and clarify where we are interested
just on position independence and no the location of the symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 16:43:17 +00:00
David Majnemer
774279ad53 Forgot to update callers of deleteDeadInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273163 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 16:07:38 +00:00
David Majnemer
53e59a0643 Reapply "[LoopIdiom] Don't remove dead operands manually"
This reverts commit r273160, reapplying r273132.
RecursivelyDeleteTriviallyDeadInstructions cannot be called on a
parentless Instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 16:03:25 +00:00
Aaron Ballman
30081011a5 Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 15:37:15 +00:00
Cong Liu
37e00a0801 Revert "[LoopIdiom] Don't remove dead operands manually"
This reverts commit r273132.
Breaks multiple test under /llvm/test:Transforms (e.g.
llvm/test:Transforms/LoopIdiom/basic.ll.test) under asan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273160 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 15:22:15 +00:00
Simon Pilgrim
a3a6b523e7 [X86][F16C] Added half <-> double conversion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 12:51:55 +00:00
Patrik Hagglund
0c2a451224 Fix formatting of r273144. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273149 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 11:19:58 +00:00
Pankaj Gode
eca908ec2f [AARCH64] Add support for Broadcom Vulcan
Adding core tuning support for new Broadcom Vulcan core (ARMv8.1A).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 11:13:31 +00:00
Patrik Hagglund
7293ea541b Avoid output indeterminism between GCC and Clang builds.
Remove dependency of the evalution order of function arguments, which
is unspecified.

Patch by David Stenberg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 10:19:04 +00:00
Patrik Hagglund
44907069da Avoid output indeterminism between GCC and Clang builds.
Remove dependency of the evalution order of function arguments, which
is unspecified.

The following test previously failed when built with GCC (but succeded
when built with Clang):

  ; RUN: opt -sroa -S < %s | FileCheck %s

  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"

  %A = type {i16}

  @a = global %A* null
  @b = global i16 0

  ; CHECK-LABEL: @f1(
  ; CHECK: alloca %A
  ; CHECK-NEXT: extractvalue %A
  ; CHECK-NEXT: getelementptr inbounds %A

  define void @f1 (%A %a) {
    %1 = alloca %A
    store %A %a, %A* %1
    %2 = load i16, i16* @b
    %3 = icmp ne i16 %2, 0
    br i1 %3, label %bb1, label %bb2
  bb1:
    store %A* %1, %A** @a
    br label %bb2
  bb2:
    ret void
  }

Patch by David Stenberg.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273144 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 10:19:00 +00:00
Patrik Hagglund
76e55eedd6 Fix for PR27940
After a store has been eliminated, when making sure that the
instruction iterator points to a valid instruction, dbg intrinsics are
now ignored as a new instruction.

Patch by Henric Karlsson.

Reviewed by Daniel Berlin.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 09:10:10 +00:00
Rui Ueyama
4a94acfea8 [codeview] Add an extra check for TPI hash values.
This patch adds a function that corresponds to `fUDTAnon`
and use that to compute TPI hash values as the reference does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 07:31:29 +00:00
Igor Breger
a8482b2070 [AVX512] [AVX512/AVX][Intrinsics] Fix Variable Bit Shift Right Arithmetic intrinsic lowering.
Differential Revision: http://reviews.llvm.org/D20897

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 07:05:43 +00:00
Craig Topper
8de712d4c8 [X86] Pass the SDLoc and Mask ArrayRef down from lowerVectorShuffle through all of the other routines instead of recreating them in the handlers for each type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 04:00:55 +00:00
Craig Topper
38d238ceee [X86] Use existing ArrayRef variable instead of calling SVOp->getMask() repeatedly. Remove nearby else after return as well. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 04:00:53 +00:00