Commit Graph

215031 Commits

Author SHA1 Message Date
Evgeniy Stepanov 65da7bc392 Allow deque to handle incomplete types.
Allow deque and deque::iterator instantiation with incomplete element
type. This is an ABI breaking change, and it is only enabled if
LIBCXX_ABI_VERSION >= 2 or LIBCXX_ABI_UNSTABLE=ON.

llvm-svn: 252350
2015-11-06 22:02:29 +00:00
Tom Stellard 05691a678e DAGCombiner: Check shouldReduceLoadWidth before combining (and (load), x) -> extload
Reviewers: resistor, arsenm

Subscribers: llvm-commits

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

llvm-svn: 252349
2015-11-06 21:58:37 +00:00
Zachary Turner e73a0601bd Python 3 - Port use of string.maketrans and don't use sets.Set.
`sets.Set` has been deprecated in favor of `set` since 2.6, and
`string.maketrans` has to be special cased.  In Python 3 there
is `str.maketrans`, `bytes.maketrans`, and `bytearray.maketrans`
and you have to choose the correct one.  So we need to introduce
a runtime version check at this site.

llvm-svn: 252348
2015-11-06 21:37:33 +00:00
Zachary Turner 5821f79714 Python 3 - Use the exec function, not the exec statement.
exec statement is gone in Python 3, this version works in both.

llvm-svn: 252347
2015-11-06 21:37:21 +00:00
Zachary Turner 059e52c44c Python 3 - Fix some issues with class / instance variables in unittest2.
Explanation from a Python wizard (not me) about why this exhibited
different behavior under Python 2 and Python 3.

    `cmp` is a builtin_function_or_method in Python 2.7, which doesn't
    have a __get__ and doesn't qualify as a "descriptor".  Your lambda is a
    regular function which qualifies as a descriptor whose __get__ method
    returns a bound instance.

His suggested fix was to write

    sortTestMethodsUsing = staticmethod(cmp_)

However, I don't think `sortTestMethodsUsing` (or any of the other fields
of `TestLoader`) should be class attributes anyway.  They are all accessed
through self, so they should be instance attributes.  So the fix employed
here is to convert them to instance attributes.

Differential Revision: http://reviews.llvm.org/D14453
Reviewed By: Todd Fiala

llvm-svn: 252346
2015-11-06 21:37:07 +00:00
Dan Gohman 3cb66c85b9 [WebAssembly] Use more explicit types in testcases.
llvm-svn: 252345
2015-11-06 21:32:42 +00:00
Dan Gohman 8d456e4200 [WebAssembly] Add more explicit pushes to the tests.
llvm-svn: 252344
2015-11-06 21:26:50 +00:00
David Majnemer 7204cff0a1 [InstCombine] Don't RAUW tokens with undef
Let SimplifyCFG remove unreachable BBs which define token instructions.

llvm-svn: 252343
2015-11-06 21:26:32 +00:00
Davide Italiano d9f87b4642 [SimplifyLibCalls] Don't hardcode the function name.
llvm-svn: 252342
2015-11-06 21:05:07 +00:00
Quentin Colombet 9a8efc08d3 [ShrinkWrapping] Teach shrink-wrapping how to analyze RegMask.
Previously we were conservatively assuming that RegMask operands clobber
callee saved registers.

llvm-svn: 252341
2015-11-06 21:00:13 +00:00
Matthias Braun 9198c671e8 MachineScheduler: Add regpressure information to debug dump
llvm-svn: 252340
2015-11-06 20:59:02 +00:00
Tom Stellard 41b7e63040 AMDGPU/SI: Refactor VOP[12C] tablegen definitions
Summary:
Pass the VOPProfile object all the through to *_m multiclasses.  This will
allow us to do more simplifications in the future.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 252339
2015-11-06 20:56:18 +00:00
Jonathan Peyton 70bda912fb Fix for zero chunk size
Setting dynamic schedule with chunk size 0 via omp_set_schedule(dynamic,0)
and then using "schedule (runtime)" causes infinite loop because for the 
chunked dynamic schedule we didn't correct zero chunk to the default (1).

llvm-svn: 252338
2015-11-06 20:32:44 +00:00
Mehdi Amini b0e3192a48 Fix SLPVectorizer commutativity reordering
The SLPVectorizer had a very crude way of trying to benefit
from associativity: it tried to optimize for splat/broadcast
or in order to have the same operator on the same side.
This is benefitial to the cost model and allows more vectorization
to occur.
This patch improve the logic and make the detection optimal (locally,
we don't look at the full tree but only at the immediate children).

Should fix https://llvm.org/bugs/show_bug.cgi?id=25247

Reviewers: mzolotukhin

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 252337
2015-11-06 20:17:51 +00:00
Rafael Espindola 7bcaec83be Fix a few windows only tests.
This argument must be non-null.

llvm-svn: 252336
2015-11-06 19:57:37 +00:00
Andrew Kaylor 4731bea3e5 Improved the operands commute transformation for X86-FMA3 instructions.
All 3 operands of FMA3 instructions are commutable now.

Patch by Slava Klochkov

Reviewers: Quentin Colombet(qcolombet), Ahmed Bougacha(ab).

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

llvm-svn: 252335
2015-11-06 19:47:25 +00:00
Dan Gohman 4b96d8d1ff [WebAssembly] Make expression-stack pushing explicit
Modelling of the expression stack is evolving. This patch takes another
step by making pushes explicit.

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

llvm-svn: 252334
2015-11-06 19:45:01 +00:00
Sanjoy Das 55ea67cea7 [ValueTracking] Add parameters to isImpliedCondition; NFC
Summary:
This change makes the `isImpliedCondition` interface similar to the rest
of the functions in ValueTracking (in that it takes a DataLayout,
AssumptionCache etc.).  This is an NFC, intended to make a later diff
less noisy.

Depends on D14369

Subscribers: llvm-commits

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

llvm-svn: 252333
2015-11-06 19:01:08 +00:00
Sanjoy Das c01b4d2b28 [ValueTracking] De-pessimize isImpliedCondition around unsigned compares
Summary:
Currently `isImpliedCondition` will optimize "I +_nuw C < L ==> I < L"
only if C is positive.  This is an unnecessary restriction -- the
implication holds even if `C` is negative.

Reviewers: reames, majnemer

Subscribers: llvm-commits

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

llvm-svn: 252332
2015-11-06 19:01:03 +00:00
Sanjoy Das 9349dcc74a [ValueTracking] Add a framework for encoding implication rules
Summary:
This change adds a framework for adding more smarts to
`isImpliedCondition` around inequalities.  Informally,
`isImpliedCondition` will now try to prove "A < B ==> C < D" by proving
"C <= A && B <= D", since then it follows "C <= A < B <= D".

While this change is in principle NFC, I could not think of a way to not
handle cases like "i +_nsw 1 < L ==> i < L +_nsw 1" (that ValueTracking
did not handle before) while keeping the change understandable.  I've
added tests for these cases.

Reviewers: reames, majnemer, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 252331
2015-11-06 19:00:57 +00:00
Bruce Mitchener ddcd2de0d1 [swig] Remove check_lldb_swig_executable_file_exists.
Summary:
Code that tried to find swig and then split the path into
a separate path and filename is being removed. The invoking
build system always provides the location of swig and we
don't need to split it into 2 pieces only to recombine it
a short time later.

Reviewers: zturner, domipheus

Subscribers: lldb-commits

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

llvm-svn: 252330
2015-11-06 18:53:29 +00:00
Renato Golin 369ff40898 [Docs] Change ARM build info to CMake
llvm-svn: 252329
2015-11-06 18:39:34 +00:00
Matt Arsenault f59e538937 AMDGPU: Cleanup includes
llvm-svn: 252328
2015-11-06 18:23:00 +00:00
Matt Arsenault 0c90e9501e AMDGPU: Create emergency stack slots during frame lowering
Test has a bogus verifier error which will be fixed by later commits.

llvm-svn: 252327
2015-11-06 18:17:45 +00:00
Zachary Turner 5cb8e67b17 Don't use module internal implementation details in our decorators.
We tried implementing something akin to a conditionalExpectedFailure
decorator for unittest2.  We did this by making use of some
implementation details of the unittest2 module.  In an effort to make
this work with unittest, this patch removes the reliance on the
implementation details.  I have a hard time wrapping my head around
how this all works with the deeply nested decorators, but the spirit
of the patch here is to do do the following: If the condition function
is true, use the original unittest2.expectedFailure decorator.  Otherwise
don't use any decorator, just call the test function.

Differential Revision: http://reviews.llvm.org/D14406
Reviewed By: tberghammer, labath

llvm-svn: 252326
2015-11-06 18:14:42 +00:00
Zachary Turner f0c3f68e33 Make Windows always use multiprocessing-pool.
We still see "Too many file handles" errors on Windows even with
lower numbers of cores.  It's not clear what the right balance is,
and the bar seems to move as more tests get added.  So just use
the strategy that works until we can investigate more deeply.

llvm-svn: 252325
2015-11-06 18:14:31 +00:00
Matt Arsenault 08f14de244 AMDGPU: Remove unused scratch resource operands
The SGPR spill pseudos don't actually use them.

llvm-svn: 252324
2015-11-06 18:07:53 +00:00
Matt Arsenault 3931948bb6 AMDGPU: Add pass to detect used kernel features
Mark kernels that use certain features that require user
SGPRs to support with kernel attributes. We need to know
before instruction selection begins because it impacts
the kernel calling convention lowering.

For now this only detects the workitem intrinsics.

llvm-svn: 252323
2015-11-06 18:01:57 +00:00
Matt Arsenault 4dc7a5a5c6 AMDGPU: Fix hardcoded alignment of spill.
Instead of forcing 4 alignment when spilled, set register class
alignments.

llvm-svn: 252322
2015-11-06 17:54:47 +00:00
Matt Arsenault 623e6fd466 AMDGPU: Hack for VS_32 register pressure
For some reason VS_32 ends up factoring into the pressure heuristics
even though we should never see a virtual register with this class.

When SGPRs are reserved for register spilling, this for some reason
triggers reg-crit scheduling.

Setting isAllocatable = 0 may help with this since that seems to remove
it from the default implementation's generated table.

llvm-svn: 252321
2015-11-06 17:54:43 +00:00
Teresa Johnson 1063293a89 Restore "Move metadata linking after lazy global materialization/linking."
Summary:
This reverts commit r251965.

Restore "Move metadata linking after lazy global materialization/linking."

This restores commit r251926, with fixes for the LTO bootstrapping bot
failure.

The bot failure was caused by references from debug metadata to
otherwise unreferenced globals. Previously, this caused the lazy linking
to link in their defs, which is unnecessary. With this patch, because
lazy linking is complete when we encounter the metadata reference, the
materializer created a declaration. For definitions such as aliases and
comdats, it is illegal to have a declaration. Furthermore, metadata
linking should not change code generation. Therefore, when linking of
global value bodies is complete, the materializer will simply return
nullptr as the new reference for the linked metadata.

This change required fixing a different test to ensure there was a
real reference to a linkonce global that was only being reference from
metadata.

Note that the new changes to the only-needed-named-metadata.ll test
illustrate an issue with llvm-link -only-needed handling of comdat
groups, whereby it may result in an incomplete comdat group. I note this
in the test comments, but the issue is orthogonal to this patch (it can
be reproduced without any metadata at head).

Reviewers: dexonsmith, rafael, tra

Subscribers: tobiasvk, joker.eph, llvm-commits

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

llvm-svn: 252320
2015-11-06 17:50:53 +00:00
Teresa Johnson 189b252652 Restore "Move metadata linking after lazy global materialization/linking."
This reverts commit r251965.

llvm-svn: 252319
2015-11-06 17:50:48 +00:00
Reid Kleckner b8fd162fc5 [WinEH] Mark funclet entries and exits as clobbering all registers
Summary:
In this implementation, LiveIntervalAnalysis invents a few register
masks on basic block boundaries that preserve no registers. The nice
thing about this is that it prevents the prologue inserter from thinking
it needs to spill all XMM CSRs, because it doesn't see any explicit
physreg defs in the MI.

Reviewers: MatzeB, qcolombet, JosephTremoulet, majnemer

Subscribers: MatzeB, llvm-commits

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

llvm-svn: 252318
2015-11-06 17:06:38 +00:00
Chad Rosier 43f9b48975 [LIR] Simplify code by making DataLayout globally accessible. NFC.
llvm-svn: 252317
2015-11-06 16:33:57 +00:00
Jun Bum Lim 22fe15ee86 [AArch64]Enable the narrow ld promotion only on profitable microarchitectures
The benefit from converting narrow loads into a wider load (r251438) could be
micro-architecturally dependent, as it assumes that a single load with two bitfield
extracts is cheaper than two narrow loads. Currently, this conversion is
enabled only in cortex-a57 on which performance benefits were verified.

llvm-svn: 252316
2015-11-06 16:27:47 +00:00
Angel Garcia Gomez 2c19d4cee3 Allow the alias to be of a different type.
Summary: Consider a declaration an alias even if it doesn't have the same unqualified type than the container element, as long as one can be converted to the other using only implicit casts.

Reviewers: klimek

Subscribers: alexfh, cfe-commits

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

llvm-svn: 252315
2015-11-06 15:47:04 +00:00
Aaron Ballman bde4c81ffe Fixing line endings; NFC.
llvm-svn: 252314
2015-11-06 15:34:03 +00:00
Rafael Espindola 889d7bb4cb Bring r252305 back with a test fix.
We now create the .eh_frame section early, just like every other special
section.

This means that the special flags are visible in code that explicitly
asks for ".eh_frame".

llvm-svn: 252313
2015-11-06 15:30:45 +00:00
Rafael Espindola 1954c614d4 .eh_frame is not normally writable. Update the test to reflect that.
llvm-svn: 252312
2015-11-06 15:25:54 +00:00
Kuba Brecka cc47f200ba Followup test failure fix for r252310 ("[tsan] Add Clang frontend support for TSan on OS X").
llvm-svn: 252311
2015-11-06 15:20:30 +00:00
Kuba Brecka 85e01c0bdc [tsan] Add Clang frontend support for TSan on OS X
We're currently in process of porting TSan to OS X, and quite a few of the initial support in the runtime library has already landed in trunk. This patch actually enables "-fsanitize=thread" in the frontend.

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

llvm-svn: 252310
2015-11-06 15:09:20 +00:00
Kuba Brecka 9dcecefe67 [tsan] Add Darwin support for lit tests
This patch enables running lit tests on OS X:
1) Simply enable tests for Darwin (they were restricted to Linux and FreeBSD).
2) Disable using instrumented libcxx (libcxx_tsan) on Darwin.
3) On Darwin, override abort_on_error=0, otherwise all tests would generate crash logs and take much longer to process.

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

llvm-svn: 252309
2015-11-06 15:05:34 +00:00
Angel Garcia Gomez 7056f7488f Use the old index identifier by default, instead of 'elem'.
Summary: Use the old index name in the cases where the check would come up with an invented name.

Reviewers: klimek

Subscribers: cfe-commits

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

llvm-svn: 252308
2015-11-06 15:03:14 +00:00
Petar Jovanovic 73d1044abe Fix __builtin_signbit for ppcf128 type
Function__builtin_signbit returns wrong value for type ppcf128 on big endian
machines. This patch fixes how value is generated in that case.

Patch by Aleksandar Beserminji.

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

llvm-svn: 252307
2015-11-06 14:52:46 +00:00
Rafael Espindola 1aa4d1c56f Revert "Simplify the creation of .eh_frame/.debug_frame sections."
This reverts commit r252305.

Investigating a test failure.

llvm-svn: 252306
2015-11-06 14:51:09 +00:00
Rafael Espindola e69bcd7ef8 Simplify the creation of .eh_frame/.debug_frame sections.
llvm-svn: 252305
2015-11-06 14:47:44 +00:00
Rafael Espindola 5b2131cd32 git clang-format and fix variable names. NFC.
llvm-svn: 252304
2015-11-06 14:12:17 +00:00
Angel Garcia Gomez 7e1d4ae937 Avoid naming conflicts with the old index in modernize-loop-convert.
Summary: The old index declaration is going to be removed anyway, so we can reuse its name if it is the best candidate for the new index.

Reviewers: klimek

Subscribers: cfe-commits, alexfh

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

llvm-svn: 252303
2015-11-06 14:04:12 +00:00
Tobias Grosser 712229ec59 Add missing '%loadPolly' to test case
llvm-svn: 252302
2015-11-06 14:03:35 +00:00
Michael Kruse ddb6528ba6 Fix reuse of non-dominating synthesized value in subregion exit
We were adding all generated values in non-affine subregions to be used
for the subregions generated exit block. The thought was that only
values that are dominating the original exit block can be used there.
But it is possible for synthesizable values to be expanded in any
block. If the same values is also used for implicit writes, it would
try to reuse already synthesized values even if not dominating the exit
block.

The fix is to only add values to the list of values usable in the exit
block only if it is dominating the exit block. This fixes
llvm.org/PR25412.

llvm-svn: 252301
2015-11-06 13:51:24 +00:00