134223 Commits

Author SHA1 Message Date
Rafael Espindola
00fd9cb07c Mips: Fix access to private functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27 03:19:40 +00:00
Sanjay Patel
5a5bead6c7 add tests for potential select transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273833 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 23:44:21 +00:00
Rafael Espindola
a0e42848da Use isPositionIndependent predicate. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:38:44 +00:00
Rafael Espindola
9dfcab0b93 Use isPositionIndependent. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273829 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:32:53 +00:00
Rafael Espindola
678eac4d05 Use isPositionIndependent predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273828 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:30:06 +00:00
Rafael Espindola
608ab75c0b Use isPositionIndependent predicate. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273827 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:24:01 +00:00
Rafael Espindola
73b2bb0c65 Refactor a duplicated predicate. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 22:13:55 +00:00
Marcin Koscielnicki
9200e60f15 [lit] Add SANITIZER_IGNORE_CVE_2016_2143 to pass_vars.
This variable is used by ASan (and other sanitizers in the future)
on s390x-linux to override a check for CVE-2016-2143 in the running
kernel (see revision 267747 on compiler-rt).  Since the check simply
checks if the kernel version is in a whitelist of known-good versions,
it may miss distribution kernels, or manually-patched kernels - hence
the need for this variable.  To enable running the ASan testsuite on
such kernels, this variable should be passed from the environment
down to the testcases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 21:49:58 +00:00
Benjamin Kramer
8d0d2b6abd Apply clang-tidy's modernize-loop-convert to lib/Analysis.
Only minor manual fixes. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 17:27:42 +00:00
Nico Weber
96caeda925 Revert r273807 (and r273809, r273810), it caused PR28311
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 15:10:34 +00:00
Benjamin Kramer
dd1d7a40c6 Apply clang-tidy's modernize-loop-convert to lib/MC.
Only minor manual fixes. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273814 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 14:49:00 +00:00
Benjamin Kramer
e96e21f003 Apply clang-tidy's modernize-loop-convert to most of lib/IR.
Only minor manual fixes. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 14:10:56 +00:00
Benjamin Kramer
36a5f73f45 [CodeExtractor] Merge DEBUG statements in an attempt to fix the msvc
build.

There's a known bug in msvc 2013 that fails to compile do-while loops
inside of ranged for loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 13:39:33 +00:00
Amjad Aboud
1c56f09923 Fixed build failure (due to unused variable error) in r273807.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273810 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 13:36:23 +00:00
Amjad Aboud
1d63a7ddba Fixed build failure (due to unused variable error) in r273807.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 12:43:33 +00:00
Benjamin Kramer
5288df58b7 Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.
Only minor manual fixes. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 12:28:59 +00:00
Amjad Aboud
9aed97cfb6 [codeview] Improved array type support.
Added support for:
1. Multi dimension array.
2. Array of structure type, which previously was declared incompletely.
3. Dynamic size array.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273807 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 11:44:45 +00:00
Sanjoy Das
3204b8036b [RSForGC] Appease MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:42:52 +00:00
Craig Topper
caddfacae3 [X86] Rewrite lowerVectorShuffleWithPSHUFB to not require a ZeroableMask to be created. We can do everything with the starting mask and zeroable bit vector. This removes the last usage of isSingleInputShuffleMask. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:10:56 +00:00
Craig Topper
e8326f9cc1 [X86] Replace calls to isSingleInputShuffleMask with just checking if V2 is UNDEF. Canonicalization and creation of shuffle vector ensures this is equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:10:53 +00:00
Craig Topper
63e75c45f1 [SelectionDAG] Use DAG.getCommutedVectorShuffle instead of reimplementing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273802 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:10:49 +00:00
Sanjoy Das
075766d9d0 [LoopUnswitch] Unswitch on conditions feeding into guards
Summary:
This is a straightforward extension of what LoopUnswitch does to
branches to guards.  That is, we unswitch

```
for (;;) {
  ...
  guard(loop_invariant_cond);
  ...
}
```

into

```
if (loop_invariant_cond) {
  for (;;) {
    ...
    // There is no need to emit guard(true)
    ...
  }
} else {
  for (;;) {
    ...
    guard(false);
    // SimplifyCFG will clean this up by adding an
    // unreachable after the guard(false)
    ...
  }
}
```

Reviewers: majnemer

Subscribers: mcrosier, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 05:10:45 +00:00
Sanjoy Das
e693206522 [RSForGC] Bring the BDVState struct up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273800 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:35 +00:00
Sanjoy Das
ac356fc248 [RSForGC] Bring computeLiveInValues up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:32 +00:00
Sanjoy Das
4c6d1eea8e [RSForGC] Bring computeLiveOutSeed up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273798 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:30 +00:00
Sanjoy Das
7ed3ae5d6d [RSForGC] Bring computeLiveInValues up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273797 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:26 +00:00
Sanjoy Das
52dba4b5a5 [RSForGC] Bring recomputeLiveInValues up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:23 +00:00
Sanjoy Das
18f06305e2 [RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273795 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:19 +00:00
Sanjoy Das
19d3a6ddce [RSForGC] Bring analyzeParsePointLiveness up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:17 +00:00
Sanjoy Das
ec3d727d83 [RSForGC] Bring meetBDVStateImpl up to code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:13 +00:00
Sanjoy Das
b97d91e816 [RSForGC] Get rid of the unnecessary MeetBDVStates struct; NFC
All of its implementation is in just one function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:10 +00:00
Sanjoy Das
8a49ff8073 [RSForGC] Bring findBasePointer up to code; NFC
Name-casing and minor style changes to bring the function up to the LLVM
coding style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:55:05 +00:00
David Majnemer
6ea11a40aa [Object, COFF] An import data directory might not consist soley of imports
The last import is the penultimate entry, the last entry is nulled out.
Data beyond the null entry should not be considered to hold import
entries.

This fixes PR28302.

N.B.  I am working on a reduced testcase, the one in PR28302 is too
large.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 04:36:32 +00:00
Vedant Kumar
e4356613e3 [llvm-cov] Simplify the way expansion views are rendered (NFC)
If a sub-view has already been rendered, it's helpful to re-render the
expansion site before rendering the next expansion view. Make this fact
explicit in the rendering interface, instead of hiding it behind an
awkward Optional<LineRef> parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 02:45:13 +00:00
Craig Topper
9a17918d1c [X86] Convert ==/!= comparisons with -1 for checking undef in shuffle lowering to comparisons of <0 or >=0. While there do the same for other kinds of index checks that can just check for greater than 0. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 19:05:29 +00:00
Craig Topper
6895c6a9e7 [X86] Pull similar bitcasts on different paths to earlier shared point. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 19:05:23 +00:00
Jan Vesely
d207fc4c12 AMDGPU/R600: Fix GlobalValue regressions.
Don't cast GV expression to MCSymbolRefExpr. r272705 changed GV to binary
expressions by including offset even if the offset it 0
(we haven't hit this sooner since tested workloads don't include static offsets)
We don't really care about the type of expression, so set it directly.
Fixes: r272705

Consider section relative relocations. Since all const as data is in one boffer section relative is equivalent to abs32.
Fixes: r273166

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273785 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 18:24:16 +00:00
Sanjay Patel
5f5bb0365d update tests to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 17:39:10 +00:00
Michael Gottesman
0a04f70a4b [cmake] Port the llvm-config option --build-mode to LLVMConfig.cmake via the variable LLVM_BUILD_TYPE.
This is just a small step in the direction of making LLVMConfig.cmake a complete
replacement for llvm-config.

For those unfamiliar, llvm-config --build-mode prints out CMAKE_BUILD_TYPE. Thus
as one can imagine, LLVM_BUILD_TYPE is @CMAKE_BUILD_TYPE@.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 11:31:50 +00:00
Hubert Tong
9ee91f91a8 Reapply r273664 with workaround for MSVC
Reviewers: rsmith, faisalv, aaron.ballman

Subscribers: llvm-commits, cfe-commits, nwilson

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 11:23:59 +00:00
David Majnemer
23ee217fe1 Just a small cleanup
No functional change is intended

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 08:34:38 +00:00
David Majnemer
db5173a31d Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"
This reverts commit r273778, it seems to break UBSan :/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 08:19:55 +00:00
David Majnemer
46e1183e69 [SimplifyCFG] Stop inserting calls to llvm.trap for UB
SimplifyCFG had logic to insert calls to llvm.trap for two very
particular IR patterns: stores and invokes of undef/null.

While InstCombine canonicalizes certain undefined behavior IR patterns
to stores of undef, phase ordering means that this cannot be relied upon
in general.

There are much better tools than llvm.trap: UBSan and ASan.

N.B. I could be argued into reverting this change if a clear argument as
to why it is important that we synthesize llvm.trap for stores, I'd be
hard pressed to see why it'd be useful for invokes...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 08:04:19 +00:00
David Majnemer
35fad14a31 [InstSimplify] Replace calls to null with undef
Calling null is undefined behavior, we can simplify the resulting value
to undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 07:37:30 +00:00
David Majnemer
ae15013971 [SimplifyCFG] Replace calls to null/undef with unreachable
Calling null is undefined behavior, a call to undef can be trivially
treated as a call to null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 07:37:27 +00:00
NAKAMURA Takumi
db39d89932 Fix a typo in FindAvailableLoadedValue, introduced by r273734. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 06:03:14 +00:00
Vedant Kumar
5e86ac74a4 [llvm-cov] Make an API more consistent, NFC
Make renderExpansionView() look a bit more like renderLine(), and
clarify its doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 05:48:59 +00:00
Vedant Kumar
a6154f98d5 [llvm-cov] Flesh out some doxygen comments, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273772 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 05:48:54 +00:00
Vedant Kumar
49b4592c1a Try to fix the MSVC build
There's some kind of issue with using "constexpr unsigned" in an
anonymous namespace.

http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/13395

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 03:27:29 +00:00
Konstantin Zhuravlyov
20c7a48718 [AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in the kernel code header
Debugger prologue is emitted if -mattr=+amdgpu-debugger-emit-prologue.

Debugger prologue writes work group IDs and work item IDs to scratch memory at fixed location in the following format:
  - offset 0: work group ID x
  - offset 4: work group ID y
  - offset 8: work group ID z
  - offset 16: work item ID x
  - offset 20: work item ID y
  - offset 24: work item ID z

Set
  - amd_kernel_code_t::debug_wavefront_private_segment_offset_sgpr to scratch wave offset reg
  - amd_kernel_code_t::debug_private_segment_buffer_sgpr to scratch rsrc reg
  - amd_kernel_code_t::is_debug_supported to true if all debugger features are enabled

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25 03:11:28 +00:00