1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

132639 Commits

Author SHA1 Message Date
David Majnemer
8095f257b6 [llvm-pdbdump-fuzzer] Add a fuzzer for llvm-pdbdump
llvm-svn: 271243
2016-05-31 01:24:40 +00:00
David Majnemer
c44da87d92 [llvm-dwarfdump-fuzzer] Get this compiling again
Looks like the dwarfdump fuzzer has bitrotted, update it to take into
account updates to the libobject API.

llvm-svn: 271242
2016-05-31 01:24:33 +00:00
Craig Topper
4f195e8edb [X86] Remove SSE/AVX unaligned store intrinsics as clang no longer uses them. Auto upgrade to native unaligned store instructions.
llvm-svn: 271236
2016-05-30 23:15:56 +00:00
Craig Topper
9d8b6d7b31 [X86] Use update_llc_test_checks.py to re-generate a test in preparation for an upcoming commit. NFC
llvm-svn: 271234
2016-05-30 22:54:14 +00:00
Craig Topper
ba623bae32 [X86] Simplify and remove some unnecessary auto-upgrade code.
llvm-svn: 271233
2016-05-30 22:54:12 +00:00
Craig Topper
3cfa1cbe27 [X86] Reduce the number of string compares in the autoupgrade logic by checking more prefixes instead of complete matches.
llvm-svn: 271232
2016-05-30 22:54:05 +00:00
Rafael Espindola
f002876001 Fix a crash when producing COFF.
llvm-svn: 271229
2016-05-30 20:18:53 +00:00
Simon Pilgrim
9226b7680f [X86][XOP] Split off auto-upgraded xop intrinsics
llvm-svn: 271228
2016-05-30 19:50:56 +00:00
Simon Pilgrim
5e4ee0eb80 [X86][SSE] Renamed pmovxrm tests
These aren't intrinsics anymore - as discussed on D20686

llvm-svn: 271226
2016-05-30 19:14:37 +00:00
Lang Hames
8153ee55cd [Kaleidoscope][BuildingAJIT] Finish off Chapter 1.
* Various tidy-up and streamlining of existing discussion.
* Describes findSymbol and removeModule.

Chapter 1 is now rough but essentially complete in terms of content.

Feedback, patches etc. very welcome.

llvm-svn: 271225
2016-05-30 19:03:26 +00:00
Simon Pilgrim
15ddf25bef [X86][AVX2] Regenerated AVX2 extension tests
llvm-svn: 271224
2016-05-30 18:49:57 +00:00
Simon Pilgrim
83a5e7cad9 [X86][SSE] Updated storeu fast-isel tests to match clang builtin tests
Since rL271214 the headers have no longer used the storeu intrinsic

llvm-svn: 271222
2016-05-30 18:42:51 +00:00
Simon Pilgrim
97b3734c4d [X86][SSE2] Updated _mm_store_pd1/_mm_store1_pd fast-isel tests to match D20617
llvm-svn: 271220
2016-05-30 18:18:44 +00:00
Lang Hames
cabab5d07e [Kaleidoscope][BuildingAJIT] Add stub Chapter 5 text.
llvm-svn: 271213
2016-05-30 16:53:19 +00:00
Diana Picus
178ddc2360 [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

llvm-svn: 271200
2016-05-30 08:28:34 +00:00
Sanjoy Das
5581317282 [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.

llvm-svn: 271196
2016-05-30 01:37:39 +00:00
Lang Hames
e6a2988e2b [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.

llvm-svn: 271194
2016-05-30 01:18:32 +00:00
Lang Hames
ff51913a0c [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.

llvm-svn: 271193
2016-05-30 00:09:26 +00:00
Joerg Sonnenberger
c94c01607b Make it easier to process merges in a normal buildable directory tree by
allowing the user to specify the base directory of the checkout.

llvm-svn: 271192
2016-05-29 22:09:54 +00:00
Sanjoy Das
c22ce4ba1f [IndVarSimplify] Extract the logic of -indvars out into a class; NFC
This will be used later to port IndVarSimplify to the new pass manager.

llvm-svn: 271190
2016-05-29 21:42:00 +00:00
Lang Hames
1e1103c6a7 [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.

llvm-svn: 271189
2016-05-29 21:17:13 +00:00
Kostya Serebryany
21c058bf71 [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.
llvm-svn: 271186
2016-05-29 15:58:57 +00:00
Benjamin Kramer
6d9ad0a6e9 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.

llvm-svn: 271181
2016-05-29 10:46:35 +00:00
Benjamin Kramer
d255a71000 [ProfileData] Clean up string handling a bit.
llvm-svn: 271180
2016-05-29 10:31:00 +00:00
Sanjoy Das
0445693edb [SCEV] Remove the singleton apply function (re-apply r271155)
Polly has been updated in r271177 to not use it.

llvm-svn: 271178
2016-05-29 07:53:21 +00:00
Craig Topper
242c5f7500 [X86] Remove some unnecessary declarations for old intrinsics from a test.
llvm-svn: 271175
2016-05-29 06:37:39 +00:00
Craig Topper
99d4129969 [X86] Simplify some of the autoupgrade code. NFC
llvm-svn: 271174
2016-05-29 06:37:33 +00:00
David Majnemer
2ee323bf42 Don't dereference a symbol iterator before checking for the end case
llvm-svn: 271173
2016-05-29 06:18:08 +00:00
David Majnemer
6d741ef1bb Make sure we don't add an empty string to the stringmap
llvm-svn: 271172
2016-05-29 06:18:06 +00:00
David Majnemer
a1f3014900 [CVRecord] Don't assume that the record has two bytes of data in it
llvm-svn: 271171
2016-05-29 06:18:04 +00:00
David Majnemer
2fa58d5a19 Don't let the readArray size calculation overflow
llvm-svn: 271170
2016-05-29 06:18:01 +00:00
Zachary Turner
cd8fb2751b [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.

llvm-svn: 271168
2016-05-29 05:36:01 +00:00
Sanjoy Das
318126056c Revert "[SCEV] Remove unused function; NFC"
This reverts commit r271155.  The `apply` function is actually used by
Polly.

llvm-svn: 271167
2016-05-29 04:08:50 +00:00
Craig Topper
6f7e59ad43 [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.

llvm-svn: 271164
2016-05-29 02:39:20 +00:00
Rafael Espindola
c16ddbf88b Add RelaxELFRelocations to TargetOptions.h.
It will be used in clang.

llvm-svn: 271161
2016-05-29 01:57:20 +00:00
Rafael Espindola
ceb4ee788c Move RelaxELFRel out to llvm-mc.
llvm-svn: 271160
2016-05-29 01:11:00 +00:00
Davide Italiano
86cd7e1f3f [PM] Reassociate: cache analyses more aggressively.
While here, add a FIXME for setPreserveCFG().

llvm-svn: 271159
2016-05-29 00:41:17 +00:00
Sanjoy Das
1436acbf2f [SCEV] Remove \brief from comments; NFC
With autobrief, \brief is not required.

llvm-svn: 271158
2016-05-29 00:38:29 +00:00
Sanjoy Das
e8fa2e07cc [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.

llvm-svn: 271157
2016-05-29 00:38:22 +00:00
Sanjoy Das
7e12896bdb [SCEV] Rename functions to LLVM style; NFC
llvm-svn: 271156
2016-05-29 00:38:00 +00:00
Sanjoy Das
d2cc088cb1 [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.

llvm-svn: 271155
2016-05-29 00:37:45 +00:00
Sanjoy Das
40e7d219f6 [SCEV] Comment and whitesapce changes in header
- Use doxygen-style comments
 - Don't repeat member names in comments
 - Add newlines between declarations

llvm-svn: 271154
2016-05-29 00:36:42 +00:00
Sanjoy Das
40738ba4e6 [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

llvm-svn: 271153
2016-05-29 00:36:25 +00:00
Sanjoy Das
5e3a215bf7 [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

llvm-svn: 271152
2016-05-29 00:34:42 +00:00
Sanjoy Das
9baaae9344 [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.

llvm-svn: 271151
2016-05-29 00:32:17 +00:00
Sanjoy Das
ad0baa641e [ValueTracking] ICmp instructions propagate poison
This is a stripped down version of D19211, leaving out the questionable
"branching in poison is UB" bit.

llvm-svn: 271150
2016-05-29 00:31:18 +00:00
Davide Italiano
c9edaacacf [PM] SCCP should preserve GlobalsAA even if the IR is mutated.
llvm-svn: 271149
2016-05-29 00:31:15 +00:00
David Majnemer
ae2b1f0c97 [COFFDumper] Validate that the next offset is not too large
llvm-svn: 271147
2016-05-28 20:04:50 +00:00
David Majnemer
35bdb1faa1 [COFFDumper] Make sure there is sufficient padding left in the string table
llvm-svn: 271146
2016-05-28 20:04:48 +00:00
David Majnemer
40cf622629 [SymbolDumper] Validate the string table offset before using it
llvm-svn: 271145
2016-05-28 20:04:46 +00:00