Commit Graph

256839 Commits

Author SHA1 Message Date
Volkan Keles 20d3c4200d [GlobalISel] Translate floating-point negation
Reviewers: qcolombet, javed.absar, aditya_nandakumar, dsanders, t.p.northover, ab

Reviewed By: qcolombet

Subscribers: dberris, rovka, llvm-commits, kristof.beyls

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

llvm-svn: 297171
2017-03-07 18:03:28 +00:00
Adrian Prantl 654975b5a6 Update comment in testcase
llvm-svn: 297170
2017-03-07 17:55:36 +00:00
Tobias Grosser a0b85963ba Update isl to isl-0.18-336-g1e193d9
This is a regular maintenance update

llvm-svn: 297169
2017-03-07 17:53:34 +00:00
Adrian Prantl 39c6fa6064 Rephrase condition for better readability. NFC
llvm-svn: 297168
2017-03-07 17:50:51 +00:00
Zachary Turner 3b9fb88476 [fs] Make sure to check S_ISLNK() in fillStatus.
llvm-svn: 297167
2017-03-07 17:48:47 +00:00
Sanjay Patel 6d30606168 revert r297155 because there's a clang test that depends on InstCombine:
tools/clang/test/CodeGen/zvector.c

llvm-svn: 297166
2017-03-07 17:41:45 +00:00
Adrian Prantl d4056501fb Revert "Strip debug info when inlining into a nodebug function."
This reverts commit r296488.

As noted by David Blaikie on llvm-commits, I overlooked the case of a
debug function being inlined into a nodebug function being inlined
into a debug function.

llvm-svn: 297163
2017-03-07 17:28:57 +00:00
Adrian Prantl 51ee7bb06f Revert "Document that code inlined into a nodebug function also won't get any"
This reverts commit r296776.
This statement is no longer true.

llvm-svn: 297162
2017-03-07 17:28:56 +00:00
Adrian Prantl 63d9695261 Relax the conflicting function arg verifier to allow for inlined debug
info in nodebug functions.

llvm-svn: 297161
2017-03-07 17:28:54 +00:00
Adrian Prantl 9b24a45029 Verfier: Move the reset of DebugFnArgs closer to other similar operations.
NFC

llvm-svn: 297160
2017-03-07 17:28:49 +00:00
Nico Weber 3b2f0094d7 Revert r297132, it caused PR32171
llvm-svn: 297159
2017-03-07 17:23:52 +00:00
Tobias Grosser 6c9958e0b3 [tests] Make sure tests do not end in 'unreachable' - Part III
There is no point in optimizing unreachable code, hence our test cases should
always return.

This commit is part of a series that makes Polly more robust on the presence of
unreachables.

llvm-svn: 297158
2017-03-07 16:28:53 +00:00
Tobias Grosser 2d233fb35d [tests] Update bounds-check elimination test cases
These test cases should work in combination with
https://reviews.llvm.org/D12676, but became outdated over time. Update them
in preparation of discussions with Daniel Berlin on how to represent unreachable
in the post-dominator tree.

llvm-svn: 297157
2017-03-07 16:17:58 +00:00
Tobias Grosser ce69e7b593 [ScopInfo] Avoid infinite loop during schedule construction
Our current scop modeling enters an infinite loop when trying to model code
that has unreachable instructions (e.g.,
test/ScopInfo/BoundChecks/single-loop.ll), as the number of basic blocks
returned by the LLVM Loop* does not include unreachable basic blocks that
branch off from the core loop body. This arises for example in the following
piece of code:

  for (i = 0; i < N; i++) {
    if (i > 1024)
      abort();            <- this abort might be translated to an
                             unreachable

    A[i] = ...
  }

This patch adds these unreachable basic blocks in our per loop basic block
count to ensure that the schedule construction does not assume a loop has been
processed completely, despite certain unreachable basic blocks still remaining.

The infinite loop is only observable in combination with
https://reviews.llvm.org/D12676 or a similar patch.

llvm-svn: 297156
2017-03-07 16:17:55 +00:00
Sanjay Patel defdb7bed5 [InstCombine] shrink truncated splat shuffle
This is one part of solving a recent bug report:
http://lists.llvm.org/pipermail/llvm-dev/2017-February/110293.html

This keeps with our general approach: changing arbitrary shuffles is off-limts, 
but changing splat is ok. The transform is very similar to the existing 
shrinkBitwiseLogic() canonicalization.

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

llvm-svn: 297155
2017-03-07 16:10:36 +00:00
Zachary Turner 82dd5421fb [Support] Add the option to not follow symlinks on stat.
llvm-svn: 297154
2017-03-07 16:10:10 +00:00
Gabor Horvath dbf2790a1f [analyzer] Improve valist checks and move it out from alpha state.
This patch makes the valist check more robust to the different AST variants on
different platforms and also fixes a FIXME.

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

llvm-svn: 297153
2017-03-07 16:04:23 +00:00
Rafael Espindola 8bb4087f88 Use 32 bits for alignment.
This is consistent with what we do for input sections.

llvm-svn: 297152
2017-03-07 15:51:09 +00:00
Tobias Grosser 134a572951 [ScopDetection] Do not detect scops that exit to an unreachable
Scops that exit with an unreachable are today still permitted, but make little
sense to optimize. We therefore can already skip them during scop detection.
This speeds up scop detection in certain cases and also ensures that bugpoint
does not introduce unreachables when reducing test cases.

In practice this change should have little impact, as the performance of
unreachable code is unlikely to matter.

This commit is part of a series that makes Polly more robust in the presence
of unreachables.

llvm-svn: 297151
2017-03-07 15:50:43 +00:00
Tobias Grosser 87dcd46aa7 [tests] Make sure tests do not end in 'unreachable' - Part II
There is no point in optimizing unreachable code, hence our test cases should
always return.

This commit is part of a series that makes Polly more robust on the presence of
unreachables.

llvm-svn: 297150
2017-03-07 15:23:30 +00:00
Ed Schouten 4dd1292c3e Let arm_section_length store the number of bytes.
Exception section data that we extract for DWARF gets stored as the
offset and the number of bytes. For ARM exception info, we seem to
deviate from this by storing the number of entries. Attempt to make this
more consistent.

By storing the number of bytes, we can get rid of the EHTEntry structure
declared in AddressSpace.hpp. In UnwindCursor.hpp we already have
another structure declared for the same purpose.

Reviewed by:	Keith Walker
Differential Revision:	https://reviews.llvm.org/D30681

llvm-svn: 297149
2017-03-07 15:21:57 +00:00
Andi-Bogdan Postelnicu 4743e2d9b9 [clang-format] Followup of D30646 - unbreak the build
llvm-svn: 297148
2017-03-07 15:20:31 +00:00
Tobias Grosser 2dc1f547ae [tests] Make sure tests do not end in 'unreachable'
There is no point in optimizing unreachable code, hence our test cases should
always return.

This commit is part of a series that makes Polly more robust on the presence of
unreachables.

llvm-svn: 297147
2017-03-07 15:17:23 +00:00
Rafael Espindola c8de15bdda Rename remaining uses of Addralign to Alignment.
llvm-svn: 297146
2017-03-07 15:11:21 +00:00
Pavel Labath 8faf9b750a Android.rules: add support for clang compiler
Summary:
building executables with the NDK clang requires -target and
-gcc-toolchain arguments.

Reviewers: eugene, danalbert

Subscribers: srhines, lldb-commits

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

llvm-svn: 297145
2017-03-07 14:57:37 +00:00
Rafael Espindola 3770763cda Rename Addralign to Alignment.
It now matches the name used in InputSectionBase.

llvm-svn: 297144
2017-03-07 14:55:52 +00:00
Andi-Bogdan Postelnicu 6732989637 [clang-format] Fixed indent issue when adding a comment at the end of a return type in named function declaration.
Differential Revision: https://reviews.llvm.org/D30646

llvm-svn: 297143
2017-03-07 14:48:02 +00:00
John Brawn eba9fdac7e [ARM] Correct handling of LSL #0 in an IT block
The check for LSL #0 in an IT block was checking if operand 4 was zero, but
operand 4 is the condition code operand so it was actually checking for LSLEQ.
Fix this by checking operand 3, which really is the immediate operand, and add
some tests.

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

llvm-svn: 297142
2017-03-07 14:42:03 +00:00
Krzysztof Parzyszek 3cceffb752 [Hexagon] Do not insert instructions before PHI nodes
llvm-svn: 297141
2017-03-07 14:20:19 +00:00
Krasimir Georgiev eb62118e6d [clang-format] Support namespaces ending in semicolon
Summary:
This patch adds support for namespaces ending in semicolon to the namespace comment fixer.
source:
```
namespace A {
  int i;
  int j;
};
```
clang-format before:
```
namespace A {
  int i;
  int j;
} // namespace A;
```
clang-format after:
```
namespace A {
  int i;
  int j;
}; // namespace A
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 297140
2017-03-07 14:07:43 +00:00
Pavel Labath 30e6cbfcfc Revert "Use LLVM for all stat-related functionality."
this reverts r297116 because it breaks the unittests and
TestCompDirSymlink. The ModuleCache unit test is trivially fixable, but
the CompDirSymlink failure is a symptom of a deeper problem: llvm's stat
functionality is not a drop-in replacement for lldb's. The former is
based on stat(2) (which does symlink resolution), while the latter is
based on lstat(2) (which does not).

This also reverts subsequent build fixes (r297128, r297120, 297117) and
r297119 (Remove FileSpec dependency on FileSystem) which builds on top
of this.

llvm-svn: 297139
2017-03-07 13:19:15 +00:00
Ranjeet Singh 3d0af578cc [ARM] Reapply r296865 "[ARM] fpscr read/write intrinsics not aware of each other""
The original patch r296865 was reverted as it broke the chromium builds for
Android https://bugs.llvm.org/show_bug.cgi?id=32134, this patch reapplies
r296865 with a fix to make sure it doesn't cause the build regression.

The problem was that intrinsic selection on int_arm_get_fpscr was failing in
ISel this was because the code to manually select this intrinsic still thought
it was the version with no side-effects (INTRINSIC_WO_CHAIN) which is wrong as
it doesn't semantically match the definition in the tablegen code which says it
does have side-effects, I've fixed this by updating the intrinsic type to
INTRINSIC_W_CHAIN (has side-effects). I've also added a test for this based on
Hans original reproducer.

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

llvm-svn: 297137
2017-03-07 11:17:53 +00:00
Jonas Paulsson 1d33cd3988 [SystemZ] Add check VT.isSimple() in canTreateAsByteVector()
Since BB-vectorizer can produce vectors of for example 3 elements,
this check is needed.

Review: Ulrich Weigand
llvm-svn: 297136
2017-03-07 09:49:31 +00:00
Peter Smith 24fb250cad Fix Mips LA25 Thunks where Caller and Callee in different OS
This change fixes a bug in which the Mips LA25 Thunks are always assigned
to the same Output section as the caller and not the callee as expected.

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

llvm-svn: 297135
2017-03-07 09:45:04 +00:00
Artyom Skrobov 1388e2f792 In Thumb1, materialize a move between low registers as a `movs`, if CPSR isn't live.
Summary: Previously, it had always been materialized as a push/pop sequence.

Reviewers: labrinea, jroelofs

Reviewed By: jroelofs

Subscribers: llvm-commits, rengolin

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

llvm-svn: 297134
2017-03-07 09:38:16 +00:00
Argyrios Kyrtzidis a9706998f2 [index] Mark categories of test classes with the 'UnitTest' symbol property as well.
llvm-svn: 297133
2017-03-07 09:38:08 +00:00
Sam Parker 6ec5fdbc94 [LoopRotate] Update dbg.value intrinsics
Propagate debug info through the newly inserted PHI nodes.

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

llvm-svn: 297132
2017-03-07 09:34:25 +00:00
Argyrios Kyrtzidis a166a2b633 [AST/ObjC] Make ObjCCategoryImplDecl consistent with ObjCCategoryDecl and use the category name as its DeclName
This also addresses the badness in ObjCCategoryImplDecl's API, which was hiding NamedDecl's APIs with different meaning.

llvm-svn: 297131
2017-03-07 09:26:07 +00:00
Ayman Musa 63cfb16b93 [X86] Quick fix for build bot failure (r297127) due to unused variable.
llvm-svn: 297130
2017-03-07 08:56:27 +00:00
Martin Bohme 0c11c29121 [analyzer] Fix crash when building CFG with variable of incomplete type
Summary:
I've included a unit test with a function template containing a variable
of incomplete type. Clang compiles this without errors (the standard
does not require a diagnostic in this case). Without the fix, this case
triggers the crash.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 297129
2017-03-07 08:42:37 +00:00
Sean Callanan 8f0a62a999 Fixed a missing brace.
llvm-svn: 297128
2017-03-07 08:31:41 +00:00
Ayman Musa 850fc977c8 [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX compressing tables.
X86EvexToVex machine instruction pass compresses EVEX encoded instructions by replacing them with their identical VEX encoded instructions when possible.
It uses manually supported 2 large tables that map the EVEX instructions to their VEX ideticals.
This TableGen backend replaces the tables by automatically generating them.

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

llvm-svn: 297127
2017-03-07 08:11:19 +00:00
Ayman Musa ac5a2c43af [X86][AVX512] Add missing entries to EVEX2VEX tables
evex2vex pass defines 2 tables which maps EVEX instructions to their VEX identical when possible. Adding all missing entries.

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

llvm-svn: 297126
2017-03-07 08:05:53 +00:00
Tim Shen 70054bb827 Revert "[PowerPC][ELFv2ABI] Allocate parameter area on-demand to reduce stack frame size"
This reverts commit r296771.

We found some wide spread test failures internally. I'm working on a
testcase. Politely revert the patch in the mean time. :)

llvm-svn: 297124
2017-03-07 07:40:10 +00:00
Sanjoy Das 30c3538e2e [LoopUnrolling] Fix loop size check for peeling
Summary:
We should check if loop size allows us to peel at least one iteration
before we do so.

Patch by Max Kazantsev!

Reviewers: sanjoy, mkuper, efriedma

Reviewed By: mkuper

Subscribers: llvm-commits

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

llvm-svn: 297122
2017-03-07 06:03:15 +00:00
Craig Topper b60a46fea1 [APInt] Add rvalue reference support to and, or, xor operations to allow their memory allocation to be reused when possible
This extends an earlier change that did similar for add and sub operations.

With this first patch we lose the fastpath for the single word case as operator&= and friends don't support it. This can be added there if we think that's important.

I had to change some functions in the APInt class since the operator overloads were moved out of the class and can't be used inside the class now. The getBitsSet change collides with another outstanding patch to implement it with setBits. But I didn't want to make this patch dependent on that series.

I've also removed the Or, And, Xor functions which were rarely or never used. I already commited two changes to remove the only uses of Or that existed.

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

llvm-svn: 297121
2017-03-07 05:36:19 +00:00
Zachary Turner b3c6541c2c Fix FreeBSD build.
llvm-svn: 297120
2017-03-07 04:58:53 +00:00
Zachary Turner 3a6b091c23 Remove FileSpec dependency on FileSystem.
llvm-svn: 297119
2017-03-07 04:58:06 +00:00
Konstantin Zhuravlyov e8aaab8abe Revert "AMDGPU: Set MCAsmInfo::PointerSize"
It breaks line tables because the patch is not complete, working on a complete one at the moment

This reverts commit r294031.

llvm-svn: 297118
2017-03-07 04:44:33 +00:00
Zachary Turner e7a172a140 Fix linux build.
llvm-svn: 297117
2017-03-07 03:58:59 +00:00