Commit Graph

256299 Commits

Author SHA1 Message Date
Sean Silva d4e606273b Improve comment.
Thanks to Rafael for helping to dig down into what we're really trying
to communicate here.

llvm-svn: 296580
2017-03-01 04:44:04 +00:00
Tobias Grosser 6f9b60cf38 Currently broken by recent LLVM upstream changes
We mark it as XFAIL to get buildbots back to green, until the upstream changes
have been addressed.

llvm-svn: 296579
2017-03-01 04:34:44 +00:00
Adam Nemet 15032a0455 [LV] These remark should have been missed remarks
The practice in LV is that we emit analysis remarks and then finally report
either a missed or applied remark on the final decision whether vectorization
is taking place.  On this code path, we were closing with an analysis remark.

llvm-svn: 296578
2017-03-01 04:31:15 +00:00
Rui Ueyama 2787664db7 Set output section's st_entsize based on input section's st_entsize.
Each input section knows its sh_entsize value, so we can set output
section's sh_entsize based on input sections values.

llvm-svn: 296577
2017-03-01 04:04:23 +00:00
Shoaib Meenai fe989a9817 [libc++abi] Clean up visibility
Use the libc++abi visibility macros instead of pragmas or using
visibility attributes directly. Clean up redundant attributes on
definitions (where the declarations already have visibility attributes
applied, from either libc++ or libc++abi headers).

Introduce _LIBCXXABI_WEAK as a drive-by cleanup, which matches the
semantics of _LIBCPP_WEAK.

No functional change. Tested by building on Linux before and after this
change and verifying that the list of exported symbols is identical.

Differential Revision: https://reviews.llvm.org/D26949

llvm-svn: 296576
2017-03-01 03:55:57 +00:00
Mohammad Shahid 175ffa8c35 [SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available
for VectorizeTree() API.This API uses it for proper mask computation to be used in shufflevector IR.
The fix is to compute the mask for out of order memory accesses while building the vectorizable tree
instead of actual vectorization of vectorizable tree.

Reviewers: mkuper

Differential Revision: https://reviews.llvm.org/D30159

Change-Id: Id1e287f073fa4959713ba545fa4254db5da8b40d
llvm-svn: 296575
2017-03-01 03:51:54 +00:00
Matt Arsenault 103af90034 AMDGPU: Re-do update for branch-relaxation test
Modify the test so that it is still testing something
closer to what it was intended to originally.

I think the original intent was to test the situation where
there was a branch on execz and then unconditional branch
required relaxing.With the change in r296539,
there was no longer and execz branch.

Change the test so that there is now an execz branch inserted.
There is no longer an unconditional branch after the execz branch,
so this might need to be tricked in some other way to keep that
there.

llvm-svn: 296574
2017-03-01 03:36:04 +00:00
Petr Hosek 11d1770e14 [libcxx] Support threads on Fuchsia
Differential Revision: https://reviews.llvm.org/D30278

llvm-svn: 296573
2017-03-01 03:09:18 +00:00
Richard Trieu 07c9338841 Add warning for inconsistent overrides on destructor.
The exisiting warning for inconsistent overrides does not include the destructor
as it was noted in review that it was too noisy.  Instead, add to a separate
warning group that is off by default for users who want consistent warnings
between methods and destructors.

llvm-svn: 296572
2017-03-01 03:07:55 +00:00
Eric Fiselier f4bf2438c0 Mark test as unsupported in C++11
llvm-svn: 296571
2017-03-01 02:52:04 +00:00
Rui Ueyama e13373b5b9 Partially rewrite .gnu.hash synthetic section and add comments.
This implementation is probably slightly inefficient than before,
but that should be negligible because this is not a performance-
critical pass.

llvm-svn: 296570
2017-03-01 02:51:42 +00:00
Daniel Berlin f0725e3f1c clang-format GenericDomTreeConstruction.h, since the current formatting makes it look like their is a bug in the loop indentation, and there is not
llvm-svn: 296569
2017-03-01 02:50:46 +00:00
Eric Fiselier 81529ba9ab Fix test failures due to bad test hasher
llvm-svn: 296568
2017-03-01 02:34:27 +00:00
Eric Fiselier 71e329266a Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.
This patch adds the required leading underscore to those macros.

llvm-svn: 296567
2017-03-01 02:23:54 +00:00
Eric Fiselier acb21581d7 Improve diagnostics when an invalid hash is used in an unordered container.
This patch adds a static assertion that the specified hash meets
the requirements of an enabled hash, and it ensures that the static
assertion is evaluated before __compressed_pair is instantiated.
That way the static assertion diagnostic is emitted first.

llvm-svn: 296565
2017-03-01 02:02:28 +00:00
Daniel Berlin 65f8cf945d Only run the overloaded-intrinsic-name.ll test once, with FileCheck.
llvm-svn: 296564
2017-03-01 01:56:41 +00:00
Daniel Berlin 3f91004ce7 Keep attributes, calling convention, etc, when remangling intrinsic
Summary: Fix issue reported where intrinsic calling convention is dropped after r295253.

Reviewers: sanjoy

Subscribers: materi, llvm-commits

Differential Revision: https://reviews.llvm.org/D30422

llvm-svn: 296563
2017-03-01 01:49:13 +00:00
Devin Coughlin 1bf65c8c0d [Analyzer] Fix crash in ObjCPropertyChecker on protocol property
Fix a crash in the ObjCPropertyChecker when analyzing a 'copy' property of an
NSMutable* type in a protocol.

rdar://problem/30766684

Differential Revision: https://reviews.llvm.org/D30482

llvm-svn: 296562
2017-03-01 01:47:37 +00:00
Eric Fiselier 1ad881c3e4 Fix PR32097 - is_abstract doesn't work on class templates.
This patch fixes llvm.org/PR32097 by using the __is_abstract
builtin type-trait instead of the previous library-only implementation.

All supported compilers provide this trait. I've tested as far
back as Clang 3.2, GCC 4.6 and MSVC trunk.

llvm-svn: 296561
2017-03-01 01:27:14 +00:00
Zachary Turner b75c5c564c Move constexpr arrays out of class definition.
GCC Linker doesn't seem to like this.

llvm-svn: 296560
2017-03-01 01:17:31 +00:00
Eugene Zelenko 28db7e65e5 [DebugInfo] Fix some Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 296559
2017-03-01 01:14:23 +00:00
Michael Park 466f0653a3 Updated the XFAIL comment in variant tests.
Summary:
`ConstexprTestTypes::NoCtors` is an aggregate type (and consequently a literal type) in C++17,
but not in C++14 since it has a base class. This patch updates the comment to accurately describe the reason for the XFAIL.

Reviewers: EricWF

Reviewed By: EricWF

Differential Revision: https://reviews.llvm.org/D30481

llvm-svn: 296558
2017-03-01 01:07:56 +00:00
Zachary Turner 1d855afc5f Fix signed / unsigned comparison warning.
llvm-svn: 296557
2017-03-01 01:07:10 +00:00
Zachary Turner 9538bc4578 [PDB] Add an additional test for BinaryStreamRef.
A bug was uncovered where if you have a StreamRef whose ViewOffset
is > 0, then when you call readLongestContiguousChunk it will
succeed even when it shouldn't, and it always return you a
buffer that was taken as if the ViewOffset was 0.

Fixed this bug and added a test for it.

llvm-svn: 296556
2017-03-01 01:04:16 +00:00
Zachary Turner 24ba722f05 [PDB] Add tests for BinaryStream.
llvm-svn: 296555
2017-03-01 01:03:53 +00:00
Paul Robinson 18c12d534d [PS4] Set our default dialect to C++11. NFC for other targets.
Reapplies r296209 now that r296549 has fixed what really seems to be
the last problematic test.

llvm-svn: 296554
2017-03-01 01:01:10 +00:00
Adam Nemet 1eca59e8b7 [opt-viewer] Suggest installing the faster parser (libYAML)
llvm-svn: 296553
2017-03-01 00:54:40 +00:00
Ahmed Bougacha 20b3e9a835 [CodeGen] Remove dead FastISel code after SDAG emitted a tailcall.
When SDAGISel (top-down) selects a tail-call, it skips the remainder
of the block.

If, before that, FastISel (bottom-up) selected some of the (no-op) next
few instructions, we can end up with dead instructions following the
terminator (selected by SDAGISel).

We need to erase them, as we know they aren't necessary (in addition to
being incorrect).

We already do this when FastISel falls back on the tail-call itself.
Also remove the FastISel-emitted code if we fallback on the
instructions between the tail-call and the return.

llvm-svn: 296552
2017-03-01 00:43:42 +00:00
Ahmed Bougacha 67d1c7c3c2 [GlobalISel] Replace all combined G_EXTRACT uses.
Iterating on the use-list we're modifying doesn't work: after the first
iteration, the use-list iterator will point to a MachineOperand
referencing the new register.  This caused us to skip the other uses to
replace.

Instead, use MRI.replaceRegWith(), which accounts for this behavior.

llvm-svn: 296551
2017-03-01 00:43:39 +00:00
Paul Robinson 3443575c03 Add missing module/license header. NFC.
llvm-svn: 296550
2017-03-01 00:14:42 +00:00
Charles Li f22a68714f [Test] Make Lit tests C++11 compatible - IR ordering
Differential Revision: https://reviews.llvm.org/D30430

llvm-svn: 296549
2017-03-01 00:10:00 +00:00
Jason Molenda 0c9bea4821 Greg Clayton is no longer working at Apple, he will continue to
review patches etc from his clayborg email address.

llvm-svn: 296548
2017-03-01 00:00:45 +00:00
Adam Nemet 9c512a539e [opt-viewer] Handle column number 0
The asm-printer now emits remarks with function location which have
unspecified (0) source column number.

llvm-svn: 296547
2017-02-28 23:59:46 +00:00
Adam Nemet abe46080d4 Revert "(HEAD, origin/master, origin/HEAD, master) [LV] These should missed remarks"
This reverts commit r296544.

This got committed by accident.

llvm-svn: 296546
2017-02-28 23:54:27 +00:00
Adam Nemet e193da191d [LV] These should missed remarks
llvm-svn: 296544
2017-02-28 23:48:58 +00:00
Adrian Prantl 612ac86189 Teach the IR verifier to reject conflicting debug info for function arguments.
Conflicting debug info for function arguments causes hard-to-debug
assertions in the DWARF backend, so the Verifier should reject it.
For performance reasons this only checks function arguments from
non-inlined debug intrinsics for now.

rdar://problem/30520286

This reapplies r295749 after fixing PR32042.

llvm-svn: 296543
2017-02-28 23:48:42 +00:00
Martell Malone 6b43b7ad49 [ELF] - Allow the Code Model flag when using LTO
Differential Revision: https://reviews.llvm.org/D29445

llvm-svn: 296542
2017-02-28 23:43:26 +00:00
Paul Robinson dccb4feff8 [DWARFv5] llvm-mc support for new unit header.
This is for running the assembler with -g (to emit DWARF describing
the assembler source).

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

llvm-svn: 296541
2017-02-28 23:40:46 +00:00
Dan Gohman 7d7409e553 [WebAssembly] Convert the remaining unit tests to the new wasm-object-file target.
To facilitate this, add a new hidden command-line option to disable
the explicit-locals pass. That causes llc to emit invalid code that doesn't
have all locals converted to get_local/set_local, however it simplifies
testwriting in many cases.

llvm-svn: 296540
2017-02-28 23:37:04 +00:00
Daniel Berlin 06f92e6dcb Update AMDGPU test branch-relaxation.ll for changes after post-dom fixes
llvm-svn: 296539
2017-02-28 23:35:24 +00:00
Eli Friedman 36795239f5 [ARM] Don't generate deprecated T1 STM.
This prevents generating stm r1!, {r0, r1} on Thumb1, where value
stored for r1 is UNKONWN.

Patch by Zhaoshi Zheng.

Differential Revision: https://reviews.llvm.org/D27910

llvm-svn: 296538
2017-02-28 23:32:55 +00:00
Krzysztof Parzyszek 33fd0bbbe8 [Hexagon] Generate extract instructions more aggressively
llvm-svn: 296537
2017-02-28 23:27:33 +00:00
Kostya Serebryany 41e7a27811 [libFuzzer] remove usage of the old coverage instrumentation
llvm-svn: 296536
2017-02-28 23:23:48 +00:00
Daniel Berlin 03f6938edc Fix PR 24415 (at least), by making our post-dominator tree behavior sane.
Summary:
Currently, our post-dom tree tries to ignore and remove the effects of
infinite loops.  It fails miserably at this, because it tries to do it
ahead of time, and thus can only detect self-loops, and any other type
of infinite loop, it pretends doesn't exist at all.

This can, in a bunch of cases, lead to wrong answers and a completely
empty post-dom tree.

Wrong answer:

```
declare void foo()
define internal void @f() {
entry:
  br i1 undef, label %bb35, label %bb3.i

bb3.i:
  call void @foo()
  br label %bb3.i

bb35.loopexit3:
  br label %bb35

bb35:
  ret void
}
```
We get:
```
Inorder PostDominator Tree:
  [1]  <<exit node>> {0,7}
    [2] %bb35 {1,6}
      [3] %bb35.loopexit3 {2,3}
      [3] %entry {4,5}
```

This is a trivial modification of the testcase for PR 6047
Note that we pretend bb3.i doesn't exist.
We also pretend that bb35 post-dominates entry.

While it's true that it does not exit in a theoretical sense, it's not
really helpful to try to ignore the effect and pretend that bb35
post-dominates entry.  Worse, we pretend the infinite loop does
nothing (it's usually considered a side-effect), and doesn't even
exist, even when it calls a function.  Sadly, this makes it impossible
to use when you are trying to move code safely.  All compilers also
create virtual or real single exit nodes (including us), and connect
infinite loops there (which this patch does).  In fact, others have
worked around our behavior here, to the point of building their own
post-dom trees:
https://zneak.github.io/fcd/2016/02/17/structuring.html and pointing
out the region infrastructure is near-useless for them with postdom in
this state :(

Completely empty post-dom tree:
```
define void @spam() #0 {
bb:
  br label %bb1

bb1:                                              ; preds = %bb1, %bb
  br label %bb1

bb2:                                              ; No predecessors!
  ret void
}
```
Printing analysis 'Post-Dominator Tree Construction' for function 'foo':
=============================--------------------------------
Inorder PostDominator Tree:
  [1]  <<exit node>> {0,1}

:(

(note that even if you ignore the effects of infinite loops, bb2
should be present as an exit node that post-dominates nothing).

This patch changes post-dom to properly handle infinite loops and does
root finding during calculation to prevent empty tress in such cases.

We match gcc's (and the canonical theoretical) behavior for infinite
loops (find the backedge, connect it to the exit block).

Testcases coming as soon as i finish running this on a ton of random graphs :)

Reviewers: chandlerc, davide

Subscribers: bryant, llvm-commits

Differential Revision: https://reviews.llvm.org/D29705

llvm-svn: 296535
2017-02-28 22:57:50 +00:00
Rui Ueyama 13ed0b691e ELF ICF: Merge only functions.
Previously, LLD merged all read-only sections. So the following
program prints out "true" if -icf=all is specified.

  static const int foo = 1;
  static const int bar = 1;
  int main() { printf("%s\n", &foo == &bar ? "true" : "false"); }

This is somewhat counter-intuitive, and it actually caused nasty issues.
One example is https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c24.

This patch changes the way how it works. Now ICF merges only functions
(i.e. executable sections).

Differential Revision: https://reviews.llvm.org/D30365

llvm-svn: 296534
2017-02-28 22:42:49 +00:00
Peter Collingbourne 8dabd7e7de gold-plugin: Remove unused variable.
llvm-svn: 296533
2017-02-28 22:40:30 +00:00
Krzysztof Parzyszek f208681731 [Hexagon] Fix instruction selection for sign-extending i1 to i64
llvm-svn: 296532
2017-02-28 22:37:01 +00:00
Jason Molenda 659e0eff10 Add additional areas I'm responsible for in the lldb codebase.
llvm-svn: 296531
2017-02-28 22:31:18 +00:00
Rui Ueyama e412063397 Add comments about .hash and .gnu.hash.
llvm-svn: 296529
2017-02-28 22:05:13 +00:00
Dean Michael Berris 352e7609fc [XRay][Docs] Update the XRay documentation
Summary:
Update the XRay docs to mention new subcomands to the llvm-xray tool,
and details on FDR mode logging. Also list down available libraries for
use part of the LLVM distribution.

Reviewers: rSerge, pelikan, echristo, timshen, sdardis, rengolin

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D30395

llvm-svn: 296528
2017-02-28 22:01:26 +00:00