OSDN Git Service

android-x86/external-llvm.git
8 years ago[X86][AVX2] Regenerated AVX2 extension tests
Simon Pilgrim [Mon, 30 May 2016 18:49:57 +0000 (18:49 +0000)]
[X86][AVX2] Regenerated AVX2 extension tests

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

8 years ago[X86][SSE] Updated storeu fast-isel tests to match clang builtin tests
Simon Pilgrim [Mon, 30 May 2016 18:42:51 +0000 (18:42 +0000)]
[X86][SSE] Updated storeu fast-isel tests to match clang builtin tests

Since rL271214 the headers have no longer used the storeu intrinsic

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

8 years ago[X86][SSE2] Updated _mm_store_pd1/_mm_store1_pd fast-isel tests to match D20617
Simon Pilgrim [Mon, 30 May 2016 18:18:44 +0000 (18:18 +0000)]
[X86][SSE2] Updated _mm_store_pd1/_mm_store1_pd fast-isel tests to match D20617

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

8 years ago[Kaleidoscope][BuildingAJIT] Add stub Chapter 5 text.
Lang Hames [Mon, 30 May 2016 16:53:19 +0000 (16:53 +0000)]
[Kaleidoscope][BuildingAJIT] Add stub Chapter 5 text.

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

8 years ago[BPF] Remove exit-on-error from tests (PR27768, PR27769)
Diana Picus [Mon, 30 May 2016 08:28:34 +0000 (08:28 +0000)]
[BPF] Remove exit-on-error from tests (PR27768, PR27769)

The exit-on-error flag is necessary to avoid some assertions/unreachables. We
can get past them by creating a few dummy nodes.

Fixes PR27768, PR27769.

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

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

8 years ago[IndVars] Assert that the incoming IR is in LCSSA
Sanjoy Das [Mon, 30 May 2016 01:37:39 +0000 (01:37 +0000)]
[IndVars] Assert that the incoming IR is in LCSSA

Since we already assert that the outgoing IR is in LCSSA, it is easy to
get misled into thinking that -indvars broke LCSSA if the incoming IR is
non-LCSSA.  Checking this pre-condition will make such cases break in
more obvious ways.

Inspired by (but does _not_ fix) PR26682.

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

8 years ago[Kaleidoscope][BuildingAJIT] Don't build Chapter 5 on Windows for now.
Lang Hames [Mon, 30 May 2016 01:18:32 +0000 (01:18 +0000)]
[Kaleidoscope][BuildingAJIT] Don't build Chapter 5 on Windows for now.

The TCP setup code is currently *nix based and does not build on Windows.

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

8 years ago[Kaleidoscope][BuildingAJIT] Add code for Chapter 5 - remote JITing.
Lang Hames [Mon, 30 May 2016 00:09:26 +0000 (00:09 +0000)]
[Kaleidoscope][BuildingAJIT] Add code for Chapter 5 - remote JITing.

This chapter demonstrates lazily JITing from ASTs with the expressions being
executed on a remote machine via a TCP connection. It needs some polish, but is
substantially complete.

Currently x86-64 SysV ABI (Darwin and Linux) only, but other architectures
can be supported by changing the server code to use alternative ABI support
classes from llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h.

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

8 years agoMake it easier to process merges in a normal buildable directory tree by
Joerg Sonnenberger [Sun, 29 May 2016 22:09:54 +0000 (22:09 +0000)]
Make it easier to process merges in a normal buildable directory tree by
allowing the user to specify the base directory of the checkout.

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

8 years ago[IndVarSimplify] Extract the logic of `-indvars` out into a class; NFC
Sanjoy Das [Sun, 29 May 2016 21:42:00 +0000 (21:42 +0000)]
[IndVarSimplify] Extract the logic of `-indvars` out into a class; NFC

This will be used later to port IndVarSimplify to the new pass manager.

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

8 years ago[Orc] Fix a type in the OrcRemoteClientUtility.
Lang Hames [Sun, 29 May 2016 21:17:13 +0000 (21:17 +0000)]
[Orc] Fix a type in the OrcRemoteClientUtility.

This function failed to type-check as it was. No test case yet (we only have
regression tests for the remote-JIT code, and LLI don't use this function), but
an upcoming chapter of the Kaleidoscope Building A JIT tutorials will use
this.

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

8 years ago[libFuzzer] fix a use-after-free (!) in libFuzzer caused by r270905: that CL caused...
Kostya Serebryany [Sun, 29 May 2016 15:58:57 +0000 (15:58 +0000)]
[libFuzzer] fix a use-after-free (!) in libFuzzer caused by r270905: that CL caused a push_back in the main corpus invalidating the vector<> iterators in rare cases.

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

8 years agoRemove some 'const' specifiers that do nothing but prevent moving the argument.
Benjamin Kramer [Sun, 29 May 2016 10:46:35 +0000 (10:46 +0000)]
Remove some 'const' specifiers that do nothing but prevent moving the argument.

Found by clang-tidy's misc-move-const-arg. While there drop some
obsolete c_str() calls.

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

8 years ago[ProfileData] Clean up string handling a bit.
Benjamin Kramer [Sun, 29 May 2016 10:31:00 +0000 (10:31 +0000)]
[ProfileData] Clean up string handling a bit.

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

8 years ago[SCEV] Remove the singleton `apply` function (re-apply r271155)
Sanjoy Das [Sun, 29 May 2016 07:53:21 +0000 (07:53 +0000)]
[SCEV] Remove the singleton `apply` function (re-apply r271155)

Polly has been updated in r271177 to not use it.

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

8 years ago[X86] Remove some unnecessary declarations for old intrinsics from a test.
Craig Topper [Sun, 29 May 2016 06:37:39 +0000 (06:37 +0000)]
[X86] Remove some unnecessary declarations for old intrinsics from a test.

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

8 years ago[X86] Simplify some of the autoupgrade code. NFC
Craig Topper [Sun, 29 May 2016 06:37:33 +0000 (06:37 +0000)]
[X86] Simplify some of the autoupgrade code. NFC

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

8 years agoDon't dereference a symbol iterator before checking for the end case
David Majnemer [Sun, 29 May 2016 06:18:08 +0000 (06:18 +0000)]
Don't dereference a symbol iterator before checking for the end case

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

8 years agoMake sure we don't add an empty string to the stringmap
David Majnemer [Sun, 29 May 2016 06:18:06 +0000 (06:18 +0000)]
Make sure we don't add an empty string to the stringmap

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

8 years ago[CVRecord] Don't assume that the record has two bytes of data in it
David Majnemer [Sun, 29 May 2016 06:18:04 +0000 (06:18 +0000)]
[CVRecord] Don't assume that the record has two bytes of data in it

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

8 years agoDon't let the readArray size calculation overflow
David Majnemer [Sun, 29 May 2016 06:18:01 +0000 (06:18 +0000)]
Don't let the readArray size calculation overflow

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

8 years ago[pdb] Make an abstract base class for PDBFile.
Zachary Turner [Sun, 29 May 2016 05:36:01 +0000 (05:36 +0000)]
[pdb] Make an abstract base class for PDBFile.

This will allow us to mock it out in a unit test to begin
writing unit tests for the various PDB and codeview classes.

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

8 years agoRevert "[SCEV] Remove unused function; NFC"
Sanjoy Das [Sun, 29 May 2016 04:08:50 +0000 (04:08 +0000)]
Revert "[SCEV] Remove unused function; NFC"

This reverts commit r271155.  The `apply` function is actually used by
Polly.

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

8 years ago[IR] Teach the ArrayRef<int> form of IRBuilder::CreateShuffleVector to use ConstantDa...
Craig Topper [Sun, 29 May 2016 02:39:20 +0000 (02:39 +0000)]
[IR] Teach the ArrayRef<int> form of IRBuilder::CreateShuffleVector to use ConstantDataVector.

This will be used in a follow up commit to simplify code in clang that creates a ConstantDataVector and calls the other form.

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

8 years agoAdd RelaxELFRelocations to TargetOptions.h.
Rafael Espindola [Sun, 29 May 2016 01:57:20 +0000 (01:57 +0000)]
Add RelaxELFRelocations to TargetOptions.h.

It will be used in clang.

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

8 years agoMove RelaxELFRel out to llvm-mc.
Rafael Espindola [Sun, 29 May 2016 01:11:00 +0000 (01:11 +0000)]
Move RelaxELFRel out to llvm-mc.

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

8 years ago[PM] Reassociate: cache analyses more aggressively.
Davide Italiano [Sun, 29 May 2016 00:41:17 +0000 (00:41 +0000)]
[PM] Reassociate: cache analyses more aggressively.

While here, add a FIXME for setPreserveCFG().

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

8 years ago[SCEV] Remove \brief from comments; NFC
Sanjoy Das [Sun, 29 May 2016 00:38:29 +0000 (00:38 +0000)]
[SCEV] Remove \brief from comments; NFC

With autobrief, \brief is not required.

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

8 years ago[SCEV] Consolidate comments; NFC
Sanjoy Das [Sun, 29 May 2016 00:38:22 +0000 (00:38 +0000)]
[SCEV] Consolidate comments; NFC

Consolidate documentation by removing comments from the .cpp file where
the comments in the .cpp file were copy-pasted from the header.

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

8 years ago[SCEV] Rename functions to LLVM style; NFC
Sanjoy Das [Sun, 29 May 2016 00:38:00 +0000 (00:38 +0000)]
[SCEV] Rename functions to LLVM style; NFC

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

8 years ago[SCEV] Remove unused function; NFC
Sanjoy Das [Sun, 29 May 2016 00:37:45 +0000 (00:37 +0000)]
[SCEV] Remove unused function; NFC

Moreover, I've never seen globally scoped `static inline` functions
elsewhere in LLVM, so this pattern is unusual if not unidiomatic.

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

8 years ago[SCEV] Comment and whitesapce changes in header
Sanjoy Das [Sun, 29 May 2016 00:36:42 +0000 (00:36 +0000)]
[SCEV] Comment and whitesapce changes in header

 - Use doxygen-style comments
 - Don't repeat member names in comments
 - Add newlines between declarations

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

8 years ago[IndVars] Eliminate op.with.overflow when possible (re-apply)
Sanjoy Das [Sun, 29 May 2016 00:36:25 +0000 (00:36 +0000)]
[IndVars] Eliminate op.with.overflow when possible (re-apply)

Summary:
If we can prove that an op.with.overflow intrinsic does not overflow, we
can get rid of the intrinsic, and replace it with non-wrapping
arithmetic.

This was first checked in at r265913 but reverted in r265950 because it
exposed some issues around how SCEV handled post-inc add recurrences.
Those issues have now been fixed.

Reviewers: atrick, regehr

Subscribers: sanjoy, mcrosier, llvm-commits

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

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

8 years ago[SCEV] See through op.with.overflow intrinsics (re-apply)
Sanjoy Das [Sun, 29 May 2016 00:34:42 +0000 (00:34 +0000)]
[SCEV] See through op.with.overflow intrinsics (re-apply)

Summary:
This change teaches SCEV to see reduce `(extractvalue
0 (op.with.overflow X Y))` into `op X Y` (with a no-wrap tag if
possible).

This was first checked in at r265912 but reverted in r265950 because it
exposed some issues around how SCEV handled post-inc add recurrences.
Those issues have now been fixed.

Reviewers: atrick, regehr

Subscribers: mcrosier, mzolotukhin, llvm-commits

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

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

8 years ago[SCEV] Don't always add no-wrap flags to post-inc add recs
Sanjoy Das [Sun, 29 May 2016 00:32:17 +0000 (00:32 +0000)]
[SCEV] Don't always add no-wrap flags to post-inc add recs

Fixes PR27315.

The post-inc version of an add recurrence needs to "follow the same
rules" as a normal add or subtract expression.  Otherwise we miscompile
programs like

```
int main() {
  int a = 0;
  unsigned a_u = 0;
  volatile long last_value;
  do {
    a_u += 3;
    last_value = (long) ((int) a_u);
    if (will_add_overflow(a, 3)) {
      // Leave, and don't actually do the increment, so no UB.
      printf("last_value = %ld\n", last_value);
      exit(0);
    }
    a += 3;
  } while (a != 46);
  return 0;
}
```

This patch changes SCEV to put no-wrap flags on post-inc add recurrences
only when the poison from a potential overflow will go ahead to cause
undefined behavior.

To avoid regressing performance too much, I've assumed infinite loops
without side effects is undefined behavior to prove poison<->UB
equivalence in more cases.  This isn't ideal, but is not new to LLVM as
a whole, and far better than the situation I'm trying to fix.

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

8 years ago[ValueTracking] ICmp instructions propagate poison
Sanjoy Das [Sun, 29 May 2016 00:31:18 +0000 (00:31 +0000)]
[ValueTracking] ICmp instructions propagate poison

This is a stripped down version of D19211, leaving out the questionable
"branching in poison is UB" bit.

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

8 years ago[PM] SCCP should preserve GlobalsAA even if the IR is mutated.
Davide Italiano [Sun, 29 May 2016 00:31:15 +0000 (00:31 +0000)]
[PM] SCCP should preserve GlobalsAA even if the IR is mutated.

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

8 years ago[COFFDumper] Validate that the next offset is not too large
David Majnemer [Sat, 28 May 2016 20:04:50 +0000 (20:04 +0000)]
[COFFDumper] Validate that the next offset is not too large

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

8 years ago[COFFDumper] Make sure there is sufficient padding left in the string table
David Majnemer [Sat, 28 May 2016 20:04:48 +0000 (20:04 +0000)]
[COFFDumper] Make sure there is sufficient padding left in the string table

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

8 years ago[SymbolDumper] Validate the string table offset before using it
David Majnemer [Sat, 28 May 2016 20:04:46 +0000 (20:04 +0000)]
[SymbolDumper] Validate the string table offset before using it

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

8 years ago[COFFDumper] Make sure there is sufficient padding left in the checksum
David Majnemer [Sat, 28 May 2016 19:45:58 +0000 (19:45 +0000)]
[COFFDumper] Make sure there is sufficient padding left in the checksum

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

8 years ago[SymbolDumper] Validate the string table offset before using it
David Majnemer [Sat, 28 May 2016 19:45:56 +0000 (19:45 +0000)]
[SymbolDumper] Validate the string table offset before using it

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

8 years ago[CVSymbolVisitor] It's possible for an error to occur in begin()
David Majnemer [Sat, 28 May 2016 19:45:54 +0000 (19:45 +0000)]
[CVSymbolVisitor] It's possible for an error to occur in begin()

If the begin iterator fails, we cannot dereference it's contents.
Instead, we must immediately stop processing symbols.

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

8 years ago[Object] Return an error code instead of asserting
David Majnemer [Sat, 28 May 2016 19:45:51 +0000 (19:45 +0000)]
[Object] Return an error code instead of asserting

This makes it easier to report errors up the stack.

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

8 years ago[llvm-readobj] Validate the string table offset before using it
David Majnemer [Sat, 28 May 2016 19:45:49 +0000 (19:45 +0000)]
[llvm-readobj] Validate the string table offset before using it

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

8 years agoUse consume instead of manually using drop_front
David Majnemer [Sat, 28 May 2016 19:17:48 +0000 (19:17 +0000)]
Use consume instead of manually using drop_front

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

8 years agoUpdate test to deal with non-zero exit codes
David Majnemer [Sat, 28 May 2016 19:02:12 +0000 (19:02 +0000)]
Update test to deal with non-zero exit codes

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

8 years agollvm-pdbdump should have a non-zero exit code on error
David Majnemer [Sat, 28 May 2016 18:25:15 +0000 (18:25 +0000)]
llvm-pdbdump should have a non-zero exit code on error

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

8 years ago[X86][SSE] (Reapplied) Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics...
Simon Pilgrim [Sat, 28 May 2016 18:03:41 +0000 (18:03 +0000)]
[X86][SSE] (Reapplied) Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)

This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused.

Reapplied now that the the companion patch (D20684) removes/auto-upgrade the clang intrinsics has been committed.

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

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

8 years agoTighten some of the name map checks further
David Majnemer [Sat, 28 May 2016 18:03:37 +0000 (18:03 +0000)]
Tighten some of the name map checks further

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

8 years agoValueMapper: fix assertion when null-mapping a constant for linking metadata
Mehdi Amini [Sat, 28 May 2016 17:26:03 +0000 (17:26 +0000)]
ValueMapper: fix assertion when null-mapping a constant for linking metadata

Summary:
When RF_NullMapMissingGlobalValues is set, mapValue can return null
for GlobalValue. When mapping the operands of a constant that is
referenced from metadata, we need to handle this case and actually
return null instead of mapping this constant.

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

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

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

8 years ago[InstCombine] add tests to show bitcast interference
Sanjay Patel [Sat, 28 May 2016 16:10:37 +0000 (16:10 +0000)]
[InstCombine] add tests to show bitcast interference

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

8 years agoFix production of R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX.
Rafael Espindola [Sat, 28 May 2016 15:51:38 +0000 (15:51 +0000)]
Fix production of R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX.

We were producing R_X86_64_GOTPCRELX for invalid instructions and
sometimes producing R_X86_64_GOTPCRELX instead of
R_X86_64_REX_GOTPCRELX.

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

8 years agoregenerate checks
Sanjay Patel [Sat, 28 May 2016 15:44:28 +0000 (15:44 +0000)]
regenerate checks

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

8 years agojoin RUN lines; NFC
Sanjay Patel [Sat, 28 May 2016 15:34:05 +0000 (15:34 +0000)]
join RUN lines; NFC

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

8 years ago[x86] avoid printing unnecessary sign bits of hex immediates in asm comments (PR20347)
Sanjay Patel [Sat, 28 May 2016 14:58:37 +0000 (14:58 +0000)]
[x86] avoid printing unnecessary sign bits of hex immediates in asm comments (PR20347)

It would be better to check the valid/expected size of the immediate operand, but this is
generally better than what we print right now.

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

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

8 years ago[X86] Try to zero elts when lowering 256-bit shuffle with PSHUFB.
Ahmed Bougacha [Sat, 28 May 2016 14:38:04 +0000 (14:38 +0000)]
[X86] Try to zero elts when lowering 256-bit shuffle with PSHUFB.

Otherwise we fallback to a blend of PSHUFBs later on.

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

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

8 years agoSimplify and clang-format a table.
Rafael Espindola [Sat, 28 May 2016 11:13:34 +0000 (11:13 +0000)]
Simplify and clang-format a table.

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

8 years agoFix default reloc model on ARM.
Rafael Espindola [Sat, 28 May 2016 10:41:15 +0000 (10:41 +0000)]
Fix default reloc model on ARM.

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

8 years ago[MC] Return early when .fill size is negative
Petr Hosek [Sat, 28 May 2016 08:20:08 +0000 (08:20 +0000)]
[MC] Return early when .fill size is negative

Rather than invoking emitFill with negative size, which may trigger
an undefined behavior, return immediately after emitting the warning.

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

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

8 years agoBounds check the number of bitmap blocks in the name map
David Majnemer [Sat, 28 May 2016 05:59:25 +0000 (05:59 +0000)]
Bounds check the number of bitmap blocks in the name map

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

8 years agoAn empty record cannot be null-terminated
David Majnemer [Sat, 28 May 2016 05:59:22 +0000 (05:59 +0000)]
An empty record cannot be null-terminated

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

8 years agoMake sure the directory contains info for all streams
David Majnemer [Sat, 28 May 2016 05:59:19 +0000 (05:59 +0000)]
Make sure the directory contains info for all streams

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

8 years ago[MC] Support symbolic expressions in assembly directives
Petr Hosek [Sat, 28 May 2016 05:57:48 +0000 (05:57 +0000)]
[MC] Support symbolic expressions in assembly directives

This matches the behavior of GNU assembler which supports symbolic
expressions in absolute expressions used in assembly directives.

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

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

8 years ago[pdb] Finish conversion to zero copy pdb access.
Zachary Turner [Sat, 28 May 2016 05:21:57 +0000 (05:21 +0000)]
[pdb] Finish conversion to zero copy pdb access.

This converts remaining uses of ByteStream, which was still
left in the symbol stream and type stream, to using the new
StreamInterface zero-copy classes.

RecordIterator is finally deleted, so this is the only way left
now.  Additionally, more error checking is added when iterating
the various streams.

With this, the transition to zero copy pdb access is complete.

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

8 years agoRevert "Revert "Map DynamicNoPIC to Static on non-darwin.""
Renato Golin [Sat, 28 May 2016 04:47:13 +0000 (04:47 +0000)]
Revert "Revert "Map DynamicNoPIC to Static on non-darwin.""

This reverts commit r271096, as reverting it broke even more buildbots!

But that also means I'll break on ARM again... :(

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

8 years agoAdd a comment about why we need to buffer the attribute changes.
Sean Silva [Sat, 28 May 2016 04:24:39 +0000 (04:24 +0000)]
Add a comment about why we need to buffer the attribute changes.

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

8 years agoRevert "Map DynamicNoPIC to Static on non-darwin."
Renato Golin [Sat, 28 May 2016 04:24:26 +0000 (04:24 +0000)]
Revert "Map DynamicNoPIC to Static on non-darwin."

This reverts commit r271052, as it broke some ARM buildbots.

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

8 years ago[libFuzzer] fix a failure that occurs when running individual inputs
Kostya Serebryany [Sat, 28 May 2016 04:19:46 +0000 (04:19 +0000)]
[libFuzzer] fix a failure that occurs when running individual inputs

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

8 years agoSmall cleanup.
Sean Silva [Sat, 28 May 2016 04:19:45 +0000 (04:19 +0000)]
Small cleanup.

Centralize assertion.
Clean up max loop.

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

8 years agoInline this into its only use. NFC.
Sean Silva [Sat, 28 May 2016 04:19:40 +0000 (04:19 +0000)]
Inline this into its only use. NFC.

The name was out of date at this point and it seems simple enough to
have in-line.

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

8 years agoBring back r271090 in a way that doesn't depend on r271089.
Sean Silva [Sat, 28 May 2016 04:05:36 +0000 (04:05 +0000)]
Bring back r271090 in a way that doesn't depend on r271089.

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

8 years agoRevert r271089 and r271090.
Sean Silva [Sat, 28 May 2016 03:56:25 +0000 (03:56 +0000)]
Revert r271089 and r271090.

It was triggering an msan bot.

Revert "[IRPGO] Set the function entry count metadata."

This reverts commit r271090.

Revert "[IRPGO] Centralize the function attribute inliner hint logic. NFC."

This reverts commit r271089.

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

8 years ago[IRPGO] Set the function entry count metadata.
Sean Silva [Sat, 28 May 2016 03:02:54 +0000 (03:02 +0000)]
[IRPGO] Set the function entry count metadata.

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

8 years ago[IRPGO] Centralize the function attribute inliner hint logic. NFC.
Sean Silva [Sat, 28 May 2016 03:02:50 +0000 (03:02 +0000)]
[IRPGO] Centralize the function attribute inliner hint logic. NFC.

This keeps the logic in the same function.

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

8 years ago[Hexagon] Add option to enable subregister liveness tracking
Krzysztof Parzyszek [Sat, 28 May 2016 02:02:51 +0000 (02:02 +0000)]
[Hexagon] Add option to enable subregister liveness tracking

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

8 years ago[Hexagon] Separate C8 and USR to avoid unwanted subregister composition
Krzysztof Parzyszek [Sat, 28 May 2016 01:51:16 +0000 (01:51 +0000)]
[Hexagon] Separate C8 and USR to avoid unwanted subregister composition

Composing subreg_loreg with subreg_oveflow leads to strange results with
lane masks for register classes with subreg_loreg. In particular, dead
lane detection generates incorrect code.

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

8 years ago[LoopUnrollAnalyzer] Add a comment to visitCastInst.
Michael Zolotukhin [Sat, 28 May 2016 01:40:14 +0000 (01:40 +0000)]
[LoopUnrollAnalyzer] Add a comment to visitCastInst.

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

8 years agoAArch64: Fix indentation
Matthias Braun [Sat, 28 May 2016 01:06:51 +0000 (01:06 +0000)]
AArch64: Fix indentation

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

8 years ago[docs] Be a bit more precise.
Sean Silva [Sat, 28 May 2016 01:03:36 +0000 (01:03 +0000)]
[docs] Be a bit more precise.

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

8 years agoAMDGPU: Cleanup vector insert/extract tests
Matt Arsenault [Sat, 28 May 2016 00:51:06 +0000 (00:51 +0000)]
AMDGPU: Cleanup vector insert/extract tests

This mostly makes sure that 3-vector dynamic inserts
and extracts are covered.

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

8 years agoAMDGPU: Fix trailing whitespace
Matt Arsenault [Sat, 28 May 2016 00:50:51 +0000 (00:50 +0000)]
AMDGPU: Fix trailing whitespace

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

8 years agoAMDGPU: Add fract intrinsic
Matt Arsenault [Sat, 28 May 2016 00:19:52 +0000 (00:19 +0000)]
AMDGPU: Add fract intrinsic

Remove broken patterns matching it. This was matching the
unsafe math pattern and expanding the fix for the buggy instruction
from the pattern. The problems are also on CI. Remove the workarounds
and only use fract with unsafe math or from the intrinsic.

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

8 years agoThe patch fixes r271071
Evgeny Stupachenko [Sat, 28 May 2016 00:14:58 +0000 (00:14 +0000)]
The patch fixes r271071
Summary:
unused variables in Release mode:
  BasicBlock *Header
  unsigned OrigCount
put under DEBUG

From: Evgeny Stupachenko <evstupac@gmail.com>

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

8 years agoFix windows build bot failure
Xinliang David Li [Sat, 28 May 2016 00:03:35 +0000 (00:03 +0000)]
Fix windows build bot failure

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

8 years ago[PM] Port the Sample FDO to new PM (part-2)
Xinliang David Li [Fri, 27 May 2016 23:20:16 +0000 (23:20 +0000)]
[PM] Port the Sample FDO to new PM (part-2)

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

8 years agoThe patch refactors unroll pass.
Evgeny Stupachenko [Fri, 27 May 2016 23:15:06 +0000 (23:15 +0000)]
The patch refactors unroll pass.
Summary:
Unroll factor (Count) calculations moved to a new function.
Early exits on pragma and "-unroll-count" defined factor added.
New type of unrolling "Force" introduced (previously used implicitly).
New unroll preference "AllowRemainder" introduced and set "true" by default.
(should be set to false for architectures that suffers from it).

Reviewers: hfinkel, mzolotukhin, zzheng

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

From: Evgeny Stupachenko <evstupac@gmail.com>

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

8 years agoUse C++ casts to avoid a warning
Sanjoy Das [Fri, 27 May 2016 23:04:28 +0000 (23:04 +0000)]
Use C++ casts to avoid a warning

warning: cast from type ‘const void*’ to type
‘llvm::PrettyStackTraceEntry*’ casts away qualifiers [-Wcast-qual]
   PrettyStackTraceHead = (PrettyStackTraceEntry*)Top;

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

8 years agoUpdate the stack coloring pass to remove lifetime intrinsics in the optnone/opt-bisec...
Andrew Kaylor [Fri, 27 May 2016 22:56:49 +0000 (22:56 +0000)]
Update the stack coloring pass to remove lifetime intrinsics in the optnone/opt-bisect skip case.

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

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

8 years ago[asan] Add option to enable asan-use-after-scope from clang.
Vitaly Buka [Fri, 27 May 2016 22:55:10 +0000 (22:55 +0000)]
[asan] Add option to enable asan-use-after-scope from clang.

Clang will have -fsanitize-address-use-after-scope flag.

PR27453

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

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

8 years agoStart using shouldAssumeDSOLocal on ARM.
Rafael Espindola [Fri, 27 May 2016 22:41:51 +0000 (22:41 +0000)]
Start using shouldAssumeDSOLocal on ARM.

Given where this is used it should be a nop.

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

8 years ago[Kaleidoscope][BuildingAJIT] Add stub chapter text for Building A JIT Chapter 4.
Lang Hames [Fri, 27 May 2016 22:34:56 +0000 (22:34 +0000)]
[Kaleidoscope][BuildingAJIT] Add stub chapter text for Building A JIT Chapter 4.

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

8 years ago[PM] Port the Sample FDO to new PM (part-1)
Xinliang David Li [Fri, 27 May 2016 22:30:44 +0000 (22:30 +0000)]
[PM] Port the Sample FDO to new PM (part-1)

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

8 years ago[Kaleidoscope][Orc] Remove the reference to the Orc directory that was removed
Lang Hames [Fri, 27 May 2016 22:21:12 +0000 (22:21 +0000)]
[Kaleidoscope][Orc] Remove the reference to the Orc directory that was removed
in r271059.

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

8 years ago[Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.
Lang Hames [Fri, 27 May 2016 22:17:56 +0000 (22:17 +0000)]
[Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.

This code has been superseded by the new Building A JIT series.

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

8 years agoMachineScheduler: Introduce ONLY1 reason to improve debug output
Matthias Braun [Fri, 27 May 2016 22:14:26 +0000 (22:14 +0000)]
MachineScheduler: Introduce ONLY1 reason to improve debug output

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

8 years agoAArch64Subtarget: Use default member initializers
Matthias Braun [Fri, 27 May 2016 22:14:09 +0000 (22:14 +0000)]
AArch64Subtarget: Use default member initializers

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

8 years agoDon't discard errors
David Majnemer [Fri, 27 May 2016 22:07:50 +0000 (22:07 +0000)]
Don't discard errors

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

8 years ago[Kaleidoscope][BuildingAJIT] Add code for chapter 4.
Lang Hames [Fri, 27 May 2016 21:50:13 +0000 (21:50 +0000)]
[Kaleidoscope][BuildingAJIT] Add code for chapter 4.

This chapter will cover lazy compilation directly from ASTs using the Compile
Callbacks and Indirect Stubs APIs.

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

8 years ago[libFuzzer] use __sanitizer_set_report_fd with -close_fd_mask. This allows us to...
Kostya Serebryany [Fri, 27 May 2016 21:46:22 +0000 (21:46 +0000)]
[libFuzzer] use __sanitizer_set_report_fd with -close_fd_mask. This allows us to keep asan reports when closing target's stderr

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