Commit Graph

262784 Commits

Author SHA1 Message Date
Xinliang David Li 126157c3b4 [PartialInlining] Add internal options to enable partial inlining in pass pipeline (off by default)
1. Legacy: -mllvm -enable-partial-inlining
2. New:  -mllvm -enable-npm-partial-inlining -fexperimental-new-pass-manager

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

llvm-svn: 303567
2017-05-22 16:41:57 +00:00
Adrian Prantl 4c047f8931 Don't generate line&scope debug info for meta-instructions.
MachineInstructions that don't generate any code (such as
IMPLICIT_DEFs) should not generate any debug info either.

Fixes PR33107.

https://bugs.llvm.org/show_bug.cgi?id=33107

llvm-svn: 303566
2017-05-22 16:21:02 +00:00
Simon Atanasyan 9812d231ed [mips] Add one more check to the micromips attribute test case. NFC
llvm-svn: 303565
2017-05-22 15:53:34 +00:00
Simon Atanasyan 7113435787 [mips] Quote command line options with `` in the micromips attribute description. NFC
llvm-svn: 303564
2017-05-22 15:53:31 +00:00
Alex Lorenz 832d8fcc63 [index] Index the deleted functions
rdar://32323386

llvm-svn: 303563
2017-05-22 15:42:45 +00:00
Erik Pilkington 6ac77a6c37 [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location
Differential revision: https://reviews.llvm.org/D33250

llvm-svn: 303562
2017-05-22 15:41:12 +00:00
Michael Kruse 1aad76c18f [CodeGen] Add invalidation of the loop SCEVs after merge block generation.
The SCEVs of loops surrounding the escape users of a merge blocks are
forgotten, so that loop trip counts based on old values can be revoked.

This fixes llvm.org//PR32536

Contributed-by: Baranidharan Mohan <mbdharan@gmail.com>

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

llvm-svn: 303561
2017-05-22 15:36:53 +00:00
Nirav Dave e00da22ef3 [DAG] Rework store merge to loop on load candidates. NFCI.
Continue to consider remaining candidate merges until all possible
merges have been considered.

llvm-svn: 303560
2017-05-22 15:33:47 +00:00
Alex Lorenz 365cb47818 [index] Visit the default argument values in function definitions
rdar://32323315

llvm-svn: 303559
2017-05-22 15:17:44 +00:00
Nirav Dave 3465861177 [X86] Remove target feature info from mul-i256.ll test. NFC.
llvm-svn: 303558
2017-05-22 15:04:08 +00:00
Martin Probst ab60acb698 clang-format: [JS] avoid line breaks before unindented r_parens.
The change that enabled wrapping at the previous scope's indentation had
unintended side-effects in that clang-format would prefer to wrap
closing parentheses to the next line if it avoided a wrap on the next
line (assuming very narrow lines):

    fooObject
        .someCall(barbazbam)
        .then(bam);

Would get formatted as:

    fooObject.someCall(barbazbam
    ).then(bam);

Because the ')' is now indented at the parent level (fooObject).

Normally formatting a builder pattern style call sequence like that is
outlawed in clang-format anyway. However for JavaScript this is special
cased to support trailing .bind calls.

This change disallows this special case when following a closing ')' to
avoid the problem.

Included are some random comment fixes.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 303557
2017-05-22 14:58:26 +00:00
Francois Ferrand a881be87ca clang-format: do not reflow bullet lists
Summary:
This patch prevents reflowing bullet lists in block comments.

It handles all lists supported by doxygen and markdown, e.g. bullet
lists starting with '-', '*', '+', as well as numbered lists starting
with -# or a number followed by a dot.

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: djasper, klimek, cfe-commits

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

llvm-svn: 303556
2017-05-22 14:47:17 +00:00
Alex Lorenz d65b3e4212 [index] 'using namespace' declarations in functions should record
the reference to the namespace

rdar://32323190

llvm-svn: 303555
2017-05-22 14:39:39 +00:00
Alexander Kornienko f2dc6492ed [clang-tidy] misc-move-const-arg shouldn't complain on std::move(lambda)
llvm-svn: 303554
2017-05-22 14:30:14 +00:00
Pavel Labath 6bb7e21f10 Fix incorrect Status -> Error rename in IOHandler
Change 302872 was a massive rename of the Error class to Status.

The change included an incorrect rename of the "Status" window
in the LLDB GUI from "Status to "Error". This patch undoes this incorrect
rename and restores the status window's correct name.

Differential Revision: https://reviews.llvm.org/D33241
Patch by Brian Gianforcaro.

llvm-svn: 303553
2017-05-22 14:13:38 +00:00
Alexander Kornienko 1e034c3f22 [clang-tidy] readability-redundant-declaration false positive for defaulted function
Summary:
```
template <class T>
struct C {
  C();
};

template <class T>
C<T>::C() = default;
```

Causes a readability-redundant-declaration diagnostic. This is caused by `isDefinition` not matching defaulted functions.

Reviewers: alexfh, danielmarjamaki

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D33358

llvm-svn: 303552
2017-05-22 13:58:57 +00:00
Alexander Kornienko a0ddf5fc1c [clang-tidy] readability-braces-around-statements false positive with char literals
Summary:
Single-line if statements cause a false positive when the last token in the conditional statement is a char constant:

```
if (condition)
  return 'a';
```

For some reason `findEndLocation` seems to skips too many (vertical) whitespaces in this case. The same problem already occured with string literals (https://reviews.llvm.org/D25558), and was fixed by adding a special check for this very case. I just extended the condition to also include char constants. No idea what really causes the issue though.

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D33354

llvm-svn: 303551
2017-05-22 13:58:16 +00:00
Siddharth Bhat 68ae83e68c [Docs] Use ReadTheDocs theme if available.
Use ReadTheDocs theme for Sphinx if available since it is well
maintained and used by readthedocs.org.

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

llvm-svn: 303550
2017-05-22 13:36:15 +00:00
Siddharth Bhat b2f754e39f [Docs] Fix Sphinx documentation in CMake check.
Summary:
- `include(AddSphinxTarget)` needs to occur before checking `SPHINX_FOUND`.
- `docs-polly-html` and `docs-polly-man` are now usable again.
- Perhaps we should build docs in the CI as well?

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

llvm-svn: 303549
2017-05-22 13:16:02 +00:00
Valery Pykhtin 74cb9c8831 [AMDGPU] Fix incorrect register usage tracking in GCNUpwardTracker
Differential revision: https://reviews.llvm.org/D33289

llvm-svn: 303548
2017-05-22 13:09:40 +00:00
Krasimir Georgiev d814533851 [clangd] Switch to incomplete translation units
Summary: This speeds up code completion. All the cool kids (ycmd) are doing it.

Reviewers: bkramer, ilya-biryukov

Reviewed By: bkramer

Subscribers: cfe-commits

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

llvm-svn: 303547
2017-05-22 12:49:08 +00:00
Simon Atanasyan 2c87f5341d [mips] Support `micromips` attribute
This patch adds support for the `micromips` and `nomicromips` attributes
for MIPS targets.

Differential revision: https://reviews.llvm.org/D33363

llvm-svn: 303546
2017-05-22 12:47:43 +00:00
Simon Atanasyan e0b726f2fa [mips] Support micromips attribute passed by front-end
This patch adds handling of the `micromips` and `nomicromips` attributes
passed by front-end. The patch depends on D33363.

Differential revision: https://reviews.llvm.org/D33364

llvm-svn: 303545
2017-05-22 12:47:41 +00:00
Artur Pilipenko edee25152b [LoopPredication] NFC. Add extra debug output in case we fail to parse the range check
llvm-svn: 303544
2017-05-22 12:06:57 +00:00
Artur Pilipenko c488dfabac [LoopPredication] NFC. Move a nested struct declaration before the fields, clang-format a bit
This will simplify the diff for an upcoming review.

llvm-svn: 303543
2017-05-22 12:01:32 +00:00
Daniel Sanders c244ff6a1e Revert r303259 - [globalisel][tablegen] Import rules containing intrinsic_wo_chain.
It's causing some buildbots to timeout whenever tablegen needs re-compilation,
particularly those with -fsanitize=memory but not only them. A compile time
regression was expected since it triples the amount of SelectionDAG rules we
are able to import but it's currently too high.

llvm-svn: 303542
2017-05-22 10:14:33 +00:00
Krasimir Georgiev ea222a7951 [clang-format] Keep trailing preprocessor line comments separate from the following section comments
Summary:
r303415 changed the way a sequence of line comments following a preprocessor
macro is handled, which has the unfortunate effect of aligning a trailing
preprocessor line comment and following unrelated section comments, so:
```
#ifdef A // comment about A
// section comment
#endif
```
gets turned into:
```
#ifdef A // comment about A
         // section comment
#endif
```
This patch fixes this by additionally checking the original start columns of
the line comments.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 303541
2017-05-22 10:07:56 +00:00
James Molloy 6110be9759 Re-apply r302416: [ARM] Clear the constant pool cache on explicit .ltorg directives
Re-applying now that PR32825 which was raised on the commit this fixed up is now known to have also been fixed by this commit.

Original commit message:
    Multiple ldr pseudoinstructions with the same constant value will
    reuse the same constant pool entry. However, if the constant pool
    is explicitly flushed with a .ltorg directive, we should not try
    to reference constants in the previous pool any longer, since they
    may be out of range.

    This fixes assembling hand-written assembler source which repeatedly
    loads the same constant value, across a binary size larger than the
    pc-relative fixup range for ldr instructions (4096 bytes). Such
    assembler source already uses explicit .ltorg instructions to emit
    constant pools with regular intervals. However if we try to reuse
    constants emitted in earlier pools, they end up out of range.

    This makes the output of the testcase match what binutils gas does
    (prior to this patch, it would fail to assemble).

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

llvm-svn: 303540
2017-05-22 09:42:07 +00:00
James Molloy 5193c80830 Re-apply r286006: Fix 24560: assembler does not share constant pool for same constants
Re-applying now that the open bug on this commit, PR32825, is known to be fixed.

Original commit message:
    Summary: This patch returns the same label if the CP entry with the same value has been created.

    Reviewers: eli.friedman, rengolin, jmolloy

    Subscribers: majnemer, jmolloy, llvm-commits

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

llvm-svn: 303539
2017-05-22 09:42:01 +00:00
Strahinja Petrovic ab9573f37c [MIPS] Add support to match more patterns for DINS instruction
This patch adds support for recognizing patterns to match
DINS instruction.

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

llvm-svn: 303537
2017-05-22 09:06:44 +00:00
James Molloy 5cc75ae8f9 Revert "[ARM] Clear the constant pool cache on explicit .ltorg directives"
This reverts commit r302416. This was a fixup for r286006, which has now been reverted so this doesn't apply (either in concept or in code).

This commit itself has no problems, but the underlying issue it was fixing has now disappeared from the codebase.

llvm-svn: 303536
2017-05-22 08:49:28 +00:00
James Molloy 5a9cf2e22d Revert "Fix 24560: assembler does not share constant pool for same constants"
This reverts commit r286006. It caused PR32825 and wasn't fixed.

llvm-svn: 303535
2017-05-22 08:42:47 +00:00
Francois Ferrand 9976efa8ff clang-format: Allow customizing the penalty for breaking assignment
Summary:
Add option to customize the penalty for breaking assignment

This allows increasing the priority of the assignment, to prefer spliting
an operation instead of splitting the assignment, e.g. :

  int a = bbbbbbbbbbbbbbbb +
          cccccccccccccccc;

Reviewers: krasimir, djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 303534
2017-05-22 08:28:17 +00:00
Amaury Sechet 89d733a505 Regenerate expected result for test constant-combines.ll . NFC
llvm-svn: 303533
2017-05-22 07:49:16 +00:00
David Blaikie d2f3a941e0 libDebugInfo/DWARF: Apply relocations for debug_addr addresses in object files
llvm-symbolizer would fail to symbolize addresses in unlinked object
files when handling .dwo file data because the addresses would not be
relocated in the same way as the ranges in the skeleton CU in the object
file.

Fix that so object files can be symbolized the same as executables.

llvm-svn: 303532
2017-05-22 07:02:47 +00:00
Sanjoy Das 036dda25a5 [SCEV] Clarify behavior around max backedge taken count
This is a re-application of a r303497 that was reverted in r303498.
I thought it had broken a bot when it had not (the breakage did not
go away with the revert).

This change makes the split between the "exact" backedge taken count
and the "maximum" backedge taken count a bit more obvious.  Both of
these are upper bounds on the number of times the loop header
executes (since SCEV does not account for most kinds of abnormal
control flow), but the latter is guaranteed to be a constant.

There were a few places where the max backedge taken count *was* a
non-constant; I've changed those to compute constants instead.

At this point, I'm not sure if the constant max backedge count can be
computed by calling `getUnsignedRange(Exact).getUnsignedMax()` without
losing precision.  If it can, we can simplify even further by making
`getMaxBackedgeTakenCount` a thin wrapper around
`getBackedgeTakenCount` and `getUnsignedRange`.

llvm-svn: 303531
2017-05-22 06:46:04 +00:00
Zvi Rackover fdddf671d8 [X86] Add (ix bitcast(vsetcc)) test cases with illegal types. NFC.
llvm-svn: 303530
2017-05-22 06:39:12 +00:00
Craig Topper 2b1fc32f22 [InstCombine] Cleanup the interface for overflow checks
Summary:
Fix naming conventions and const correctness.
This completes the changes made in rL303029.

Patch by Yoav Ben-Shalom.

Reviewers: craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

llvm-svn: 303529
2017-05-22 06:25:31 +00:00
Amaury Sechet 1b195c35a0 Add a test case for large integer subtraction via subcarry. NFC
llvm-svn: 303528
2017-05-22 06:06:45 +00:00
Rui Ueyama b6632d9cd1 Revert r303304: Re-submit r303225: Garbage collect dllimported symbols.
This reverts commit r303304 because it looks like the change
introduced a crash bug. At least after that change, LLD with thinlto
crashes when linking Chromium.

llvm-svn: 303527
2017-05-22 06:01:37 +00:00
Dean Michael Berris 36778a54fe [XRay][compiler-rt] Add __xray_remove_customevent_handler(...)
This change adds __xray_remove_customevent_handler(...) to be consistent
with other APIs that add/remove handlers.

llvm-svn: 303526
2017-05-22 03:23:54 +00:00
Amaury Sechet 822ba7eddc Add test case for subcarry optimization.
llvm-svn: 303525
2017-05-22 02:31:42 +00:00
Craig Topper e777fed152 [SimplifyCFG] Prevent a few APInt copies on method calls that return const reference. NFCI
llvm-svn: 303523
2017-05-22 00:49:35 +00:00
Craig Topper aaef41f71b [KnownBits] Use isNegative/isNonNegative to shorten some code. NFC
llvm-svn: 303522
2017-05-22 00:49:33 +00:00
Daniel Berlin d130b6c27d NewGVN: Fix PR 33116, the memoryphi version of bug 32838.
llvm-svn: 303521
2017-05-21 23:41:58 +00:00
Daniel Berlin 0207cca8e0 NewGVN: Cleanup some repeated code using some templated helpers
llvm-svn: 303520
2017-05-21 23:41:56 +00:00
Daniel Berlin 0193997b7e NewGVN: Fix printing of simplified expression
llvm-svn: 303519
2017-05-21 23:41:53 +00:00
Daniel Berlin ca74978d6c SmallPtrSetImpl/SmallPtrSet: Add a public value_type and key_type
llvm-svn: 303518
2017-05-21 23:41:51 +00:00
Michael Kruse 706f79ab14 [CodeGen] Support partial write accesses.
Allow the BlockGenerator to generate memory writes that are not defined
over the complete statement domain, but only over a subset of it. It
generates a condition that evaluates to 1 if executing the subdomain,
and only then execute the access.

Only write accesses are supported. Read accesses would require a PHINode
which has a value if the access is not executed.

Partial write makes DeLICM able to apply mappings that are not defined
over the entire domain (for instance, a branch that leaves a loop with
a PHINode in its header; a MemoryKind::PHI write when leaving is never
read by its PHI read).

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

llvm-svn: 303517
2017-05-21 22:46:57 +00:00
Davide Italiano 3318970cd3 [NewGVN] Actually check the NewGVN output.
Apparently I messed up squashing two consecutive commits.

llvm-svn: 303516
2017-05-21 20:55:53 +00:00