Commit Graph

208341 Commits

Author SHA1 Message Date
Alex Lorenz 36593ac51b MIR Parser: parseIRValue should take in a constant pointer. NFC.
llvm-svn: 245520
2015-08-19 23:27:07 +00:00
Alex Lorenz 55dc6f8165 MIR Printer: Extract the code that prints IR slots to a separate function. NFC.
This code can be reused when printing references to unnamed local IR values.

llvm-svn: 245519
2015-08-19 23:24:37 +00:00
David Blaikie c7aaacde67 Allow Optionals to be compared to None
This is something like nullopt in std::experimental::optional. Optional
could already be constructed from None, so this seems like an obvious
extension from there.

I have a use in a future patch for Clang, though it may not go that
way/end up used - so this seemed worth committing now regardless.

llvm-svn: 245518
2015-08-19 23:07:27 +00:00
Alexander Kornienko 87d89d2be1 [clang-tidy] Work around failure in Darwin.
llvm-svn: 245517
2015-08-19 23:03:23 +00:00
NAKAMURA Takumi 0ee6ce1c52 [CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally.
llvm-svn: 245516
2015-08-19 22:55:16 +00:00
Paul Herman 6e0fe6fbf5 Fix tests to work on remote targets.
llvm-svn: 245515
2015-08-19 22:44:48 +00:00
John McCall 0d461693b6 Fix the layout of bitfields in ms_struct unions: their
alignment is ignored, and they always allocate a complete
storage unit.

Also, change the dumping of AST record layouts: use the more
readable C++-style dumping even in C, include bitfield offset
information in the dump, and don't print sizeof/alignof
information for fields of record type, since we don't do so
for bases or other kinds of field.

rdar://22275433

llvm-svn: 245514
2015-08-19 22:42:36 +00:00
Eric Fiselier 10ac1f98fa Add files that got missed in r245512.
llvm-svn: 245513
2015-08-19 22:35:56 +00:00
Eric Fiselier 2228a8a3f2 More unique_ptr test cleanup. Fixes in <memory> to come later.
llvm-svn: 245512
2015-08-19 22:35:07 +00:00
Alexander Kornienko 1b7bf7a2a7 [clang-tidy] Add modernize-use-nullptr check, attempt 2.
This patch re-applies r245434 and r245471 reverted in r245493, and changes the
way custom null macros are configured. The test for custom null macros is
temporarily excluded and will be committed separately to reduce chances of
breakages.

Initial patches by Angel Garcia.

llvm-svn: 245511
2015-08-19 22:21:37 +00:00
Daniel Jasper 8d90e533ea Remove empty destructors added in r245500. I got confused by my
YouCompleteMe setup which apparently doesn't find the base classes and
thus doesn't understand that there is an implicit virtual destructor.

llvm-svn: 245510
2015-08-19 22:04:55 +00:00
Richard Smith fb5e9f5082 Add missing comment.
llvm-svn: 245509
2015-08-19 21:59:52 +00:00
Paul Herman 641e1987d6 Fix evaluation of global operators in C++
llvm-svn: 245508
2015-08-19 21:44:56 +00:00
Richard Trieu 1cd076eb34 Fix -Wlogical-not-parentheses to work better with C code.
Remove the assumption of a Boolean type by checking if an expression is known
to have a boolean value.  Disable warning in two other tests.

llvm-svn: 245507
2015-08-19 21:33:54 +00:00
Sanjay Patel 9e5927fdc3 [x86] enable machine combiner reassociations for scalar double-precision min/max
llvm-svn: 245506
2015-08-19 21:27:27 +00:00
Paul Herman 493bb398e7 Improve tests regarding imported namespaces and chained calls in C++
llvm-svn: 245505
2015-08-19 21:23:01 +00:00
Sanjay Patel 4e3ee1e548 [x86] enable machine combiner reassociations for scalar single-precision maximums
llvm-svn: 245504
2015-08-19 21:18:46 +00:00
Simon Pilgrim 35f528262f [DAGCombiner] Added SMAX/SMIN/UMAX/UMIN constant folding
We still need to add constant folding of vector comparisons to fold the tests for targets that don't support the respective min/max nodes

I needed to update 2011-12-06-AVXVectorExtractCombine to load a vector instead of using a constant vector to prevent it folding

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

llvm-svn: 245503
2015-08-19 21:11:58 +00:00
Artem Belevich 46db9e822c [CUDA] Added stubs for __nvvm_atom_add_*_d() builtins.
They show up in CUDA headers but are not currently supported by
NVPTX back-end.

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

llvm-svn: 245502
2015-08-19 21:11:37 +00:00
Richard Smith 1d0f1996df [modules] Don't needlessly bounce through Sema when updating exception specifications.
llvm-svn: 245501
2015-08-19 21:09:32 +00:00
Daniel Jasper d30dc3fc75 Fix IncludeInserter to allow for more than one added header per file.
Also adapt tests a bit to make it possible to test this. Removed
checking the number of errors reported per test. It was never actually
checked and doesn't seem particularly relevant to the test itself.

llvm-svn: 245500
2015-08-19 21:02:27 +00:00
Juergen Ributzka b12248e9cd [AArch64][FastISel] Don't fold shifts with UB.
We are already falling back to SelectionDAG when encountering an shift with UB.
This adds the same checks for shifts with UB that get folded into arithmetic or
logical operations.

This fixes rdar://problem/22345295.

llvm-svn: 245499
2015-08-19 20:52:55 +00:00
David Majnemer f25fe64716 [X86] Emit more efficient >= comparisons against 0
We don't do a great job with >= 0 comparisons against zero when the
result is used as an i8.

Given something like:
  void f(long long LL, bool *B) {
    *B = LL >= 0;
  }

We used to generate:
  shrq    $63, %rdi
  xorb    $1, %dil
  movb    %dil, (%rsi)

Now we generate:
  testq   %rdi, %rdi
  setns   (%rsi)

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

llvm-svn: 245498
2015-08-19 20:51:40 +00:00
Richard Smith 7747ce2260 Internal-linkage variables with constant-evaluatable initializers do not need to be emitted. (Also reduces the set of variables that need to be eagerly deserialized when using PCH / modules.)
llvm-svn: 245497
2015-08-19 20:49:38 +00:00
Artem Belevich 39259ffc65 [CUDA] Add appropriate host/device attribute to builtins.
Differential Revision: http://reviews.llvm.org/D12122

llvm-svn: 245496
2015-08-19 20:48:20 +00:00
Adrian McCarthy 61ede1519c Read exception records from Windows mini dump
Differential Revision: http://reviews.llvm.org/D12126

llvm-svn: 245495
2015-08-19 20:43:22 +00:00
Dan Gohman dde8dce6a9 [WebAssembly] Use the default alignment for SIMD types.
Previously WebAssembly's datalayout string had -v128:8:128. This had been an
attempt to declare a certain level of support for unaligned SIMD accesses.
However, clang makes its own determinations for SIMD alignment that are
independent of the datalayout string, so this wasn't actually meaningful.

llvm-svn: 245494
2015-08-19 20:30:20 +00:00
Justin Bogner 71e1a579b2 Revert "[clang-tidy] Add use-nullptr check to clang-tidy."
The new test is failing on darwin:

http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/10339/

This reverts r245434 and its follow up r245471.

llvm-svn: 245493
2015-08-19 20:30:07 +00:00
Aaron Ballman f7c25368b7 Replacing a custom AST matcher with some builtin AST matchers; NFC, and existing tests should provide sufficient coverage.
llvm-svn: 245492
2015-08-19 20:26:22 +00:00
Simon Atanasyan 814b705984 [Mips] Use 'or' for move instead of [d]addu in PLT entries
Patch by Simon Dardis.

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

llvm-svn: 245491
2015-08-19 20:20:10 +00:00
Simon Pilgrim 989cbbd2f5 [DAGCombiner] Fold CONCAT_VECTORS of EXTRACT_SUBVECTOR (or undef) to VECTOR_SHUFFLE.
Check to see if this is a CONCAT_VECTORS of a bunch of EXTRACT_SUBVECTOR operations. If so, and if the EXTRACT_SUBVECTOR vector inputs come from at most two distinct vectors the same size as the result, attempt to turn this into a legal shuffle.

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

llvm-svn: 245490
2015-08-19 20:09:50 +00:00
Piotr Padlewski 1d02f681a9 Generating available_externally vtables bugfix
Bugfix revealed in r245264.

http://reviews.llvm.org/D12128

llvm-svn: 245489
2015-08-19 20:09:09 +00:00
Dawn Perchik a431f152df [lldb-mi] Add (gdb) prompt after =breakpoint-modified and =breakpoint-created.
Reviewed by: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12113

llvm-svn: 245488
2015-08-19 20:04:03 +00:00
David Majnemer ba275f9947 Replace some calls to isa<LandingPadInst> with isEHPad()
No functionality change is intended.

llvm-svn: 245487
2015-08-19 19:54:02 +00:00
Paul Robinson 9c10414ce0 Minor tidying of regex in a test
llvm-svn: 245486
2015-08-19 19:36:35 +00:00
Douglas Katzman 2362b69dd9 [Sparc]: asm-only support for the ldstub instruction.
llvm-svn: 245485
2015-08-19 19:30:57 +00:00
Aaron Ballman 5cedc8fbfa Replacing a custom AST matcher with some builtin AST matchers; NFC, and existing tests should provide sufficient coverage.
llvm-svn: 245484
2015-08-19 19:29:23 +00:00
Alex Lorenz feb6b4395b MIR Parser: Rename 'MachineOperandWithLocation' to 'ParsedMachineOperand'. NFC.
Besides storing the operand's source range, this structure now stores other
attributes as well, so the name should reflect this fact.

llvm-svn: 245483
2015-08-19 19:19:16 +00:00
Alex Lorenz 5ef93b0c4c MIR Serialization: Serialize instruction's register ties.
This commit serializes the machine instruction's register operand ties.
The ties are printed out only when the instructon has register ties that are
different from the ties that are specified in the instruction's description.

llvm-svn: 245482
2015-08-19 19:05:34 +00:00
Nemanja Ivanovic 5f1cea4141 Temporary fix for the self-host failures introduced by rL244921.
This revision has introduced an issue that only affects bootstrapped compiler
when it is printing the ASM. I am working on resolving the issue, but in the
meantime, I'm disabling the legalization of scalar_to_vector operation for v2i64
and the associated testing until I can get this fixed.

llvm-svn: 245481
2015-08-19 19:04:47 +00:00
Alex Lorenz e66a7ccf77 MIR Serialization: Serialize defined registers that require 'def' register flag.
The defined registers are already serialized - they are represented by placing
them before the '=' in a machine instruction. However, certain instructions like
INLINEASM can have defined register operands after the '=', so this commit
introduces the 'def' register flag for such operands.

llvm-svn: 245480
2015-08-19 18:55:47 +00:00
Bruno Cardoso Lopes 27fd06922b [PeepholeOptimizer] Look through PHIs to find additional register sources
Reintroduce r245442. Remove an overly conservative assertion introduced
in r245442. We could replace the assertion to use `shareSameRegisterFile`
instead, but in that point in `insertPHI` we already lost the original
Def subreg to check against. So drop the assertion completely.

Original commit message:

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/20404526

llvm-svn: 245479
2015-08-19 18:53:36 +00:00
Chaoren Lin b0138025ec XTIMEOUT TestChangeProcessGroup for Linux.
llvm-svn: 245477
2015-08-19 18:39:25 +00:00
Douglas Katzman e5485c651e [SPARC] Enable writing to floating-point-state register.
llvm-svn: 245475
2015-08-19 18:34:48 +00:00
Lang Hames 596aec96ac [Kaleidoscope] More inter-chapter diff reduction.
llvm-svn: 245474
2015-08-19 18:32:58 +00:00
Vedant Kumar cb23639d39 [docs] Fix minor typo in CodingStandards.rst
llvm-svn: 245473
2015-08-19 18:19:12 +00:00
Lang Hames 59b0da886e [Kaleidoscope] Clang-format the Kaleidoscope tutorials.
Also reduces changes between tutorial chapters.

llvm-svn: 245472
2015-08-19 18:15:58 +00:00
Alexander Kornienko be6e053938 [clang-tidy] Fix a bug in UseNullptrCheck.
http://reviews.llvm.org/D12162

Patch by Angel Garcia!

llvm-svn: 245471
2015-08-19 17:50:22 +00:00
Eric Fiselier 7cb813ffc4 [libcxx] Add "install-libcxx" target.
Summary: Currently you can't install libc++ from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: cfe-commits

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

llvm-svn: 245470
2015-08-19 17:41:53 +00:00
Ahmed Bougacha 9e00ec6195 [AArch64] Improve short-form diags on long-form Match_InvalidOperand.
Since r244955, we try to use the short-form ErrorInfo when both
tries failed, and the long-form match failed on a suffix operand.
However, this means we sometimes mix ErrorInfo and MatchResult
(one manifestation of this being PR24498). Instead, restore both.

llvm-svn: 245469
2015-08-19 17:40:19 +00:00