138819 Commits

Author SHA1 Message Date
Sanjoy Das
643807ace9 [SCEV] Further isolate incidental data structure; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 01:10:25 +00:00
Sanjoy Das
475c580270 [SCEV] Simplify BackedgeTakenInfo::getMax; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 01:10:22 +00:00
Sanjoy Das
fbc0b21d22 Appease MSVC
... by not default move constructors and operator= s. Defaulting these
works in clang, but not in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 00:22:18 +00:00
Sanjoy Das
e6b6f3a715 Attempt to appease MSVC
... by explicitly deleting the copy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 00:00:51 +00:00
Sanjoy Das
72ec6f5dda [SCEV] Reserve space in SmallVector; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:12:08 +00:00
Sanjoy Das
bfa3983f1b [SCEV] Document a gotcha; NFC
We should re-consider the design decision that led to this gotcah, but
for now just document it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:12:06 +00:00
Sanjoy Das
347d5b6432 [SCEV] Have ExitNotTakenInfo keep a pointer to its predicate; NFC
SCEVUnionPredicate is a "heavyweight" structure, so it is beneficial to
store the (optional) data out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:12:04 +00:00
Sanjoy Das
a2d692b82c [SCEV] Simplify tracking ExitNotTakenInfo instances; NFC
This change simplifies a data structure optimization in the
`BackedgeTakenInfo` class for loops with exactly one computable exit.

I've sanity checked that this does not regress compile time performance,
using sqlite3's amalgamated build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:12:00 +00:00
Sanjoy Das
f4f66fe033 [SCEV] Rename a couple of fields; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:11:57 +00:00
Sanjoy Das
3b4332c090 [SCEV] Remove incidental data structure; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:11:55 +00:00
Sanjoy Das
0d1cc519bb [SCEV] Clang format most of the SCEV header; NFC
The indentation for the declared classes was not as per LLVM coding
style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 23:11:51 +00:00
Craig Topper
8ab193a8a5 [X86] Remove what appears to be leftover MMX code involving (v1i64 scalar_to_vector).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282361 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:34:11 +00:00
Craig Topper
277575f893 [X86] Remove patterns for scalar_to_vector from FR32/FR64 to 256-bit vectors. Lowering explicitly avoids creating this pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:34:09 +00:00
Craig Topper
444f89a273 [AVX-512] Replace get512BitSuperRegister with calls to TargetRegisterInfo::getMatchingSuperReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:34:06 +00:00
Craig Topper
7913ebb85c [AVX-512] Fix some patterns predicates to properly enforce priority for various versions of CVTDQ2PD instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:34:02 +00:00
Craig Topper
d064828e3f [AVX-512] Add rounding versions of instructions to hasUndefRegUpdate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:33:59 +00:00
Craig Topper
a7c6d16bf9 [AVX-512] Add the scalar unsigned integer to fp conversion instructions to hasUndefRegUpdate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:33:57 +00:00
Craig Topper
1239ce3145 [AVX-512] Remove duplicate instructions for converting integer to scalar floating point. We can use patterns to point to the other instructions instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 16:33:53 +00:00
Zachary Turner
9f072db19b Add a comment on StringRef::contains(char)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 04:06:39 +00:00
Zachary Turner
3ae26e9375 Fix signed / unsigned comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 03:57:34 +00:00
Zachary Turner
568a8f4a4d Add some predicated searching functions to StringRef.
This adds 4 new functions to StringRef, which can be used to
take or drop characters while a certain condition is met, or
until a certain condition is met.  They are:

take_while - Return characters until a condition is not met.
take_until - Return characters until a condition is met.
drop_while - Remove characters until a condition is not met.
drop_until - Remove characters until a condition is met.

Internally, all of these functions delegate to two additional
helper functions which can be used to search for the position
of a character meeting or not meeting a condition, which are:

find_if - Find the first character matching a predicate.
find_if_not - Find the first character not matching a predicate.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 03:27:29 +00:00
Craig Topper
386ab19245 [AVX-512] Don't use two opcodes for INTR_TYPE_SCALAR_MASK_RM. The handling was such that if the second opcode was present the first was ingored, so we can just have one opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-25 01:03:10 +00:00
Craig Topper
6928dfadcd [X86] Teach combineShuffle to avoid creating floating point operations with integer types and integer operations with floating point types. Seems isOperationLegal lies for mismatched types and operations.
Fixes PR30511.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 21:42:49 +00:00
Craig Topper
1e23cc89e7 [AVX-512] Split scalar version of X86ISD::SELECT into a separate opcode because isel is not robust with multiple type profiles for the same opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 21:42:47 +00:00
Craig Topper
9ca28eca4f [AVX-512] Remove the patterns for selecting scalar VCOMI/VUCOMI instructions with SAE as there is no way to create the pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 21:42:43 +00:00
Duncan P. N. Exon Smith
affe79938b ObjCARC: Don't look at users of ConstantData
Stop looking at users of UndefValue and ConstantPointerNull in the
objective C ARC optimizers.  The other users aren't actually
interesting, since they're not pointing at a particular object.  I
imagine these calls could be optimized through -instcombine... maybe
they already are?

These early returns will be required at some point in the future, with a
WIP patch that asserts when someone accesses a use-list on ConstantData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 21:01:20 +00:00
Duncan P. N. Exon Smith
5cb2954160 Analysis: Return early for UndefValue in computeKnownBits
There is no benefit in looking through assumptions on UndefValue to
guess known bits.  Return early to avoid walking their use-lists, and
assert that all instances of ConstantData are handled here for similar
reasons (UndefValue was the only integer/pointer holdout).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 20:42:02 +00:00
Sanjay Patel
c7ebf69800 [x86] don't try to create a vector integer inst for an SSE1 target (PR30512)
This bug was introduced with:
http://reviews.llvm.org/rL272511

We need to restrict the lowering to v4f32 comparisons because that's all SSE1 can handle.

This should fix:
https://llvm.org/bugs/show_bug.cgi?id=28044



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 20:24:06 +00:00
Duncan P. N. Exon Smith
3a296bc80d Scalar: Ignore ConstantData in processAssumption
Assumptions on UndefValue and ConstantPointerNull aren't relevant to
other users.  Ignore them entirely to avoid wasting cycles walking
through their (possibly extremely extensive (cross-module)) use-lists.

It wasn't clear how to add a specific test for this, and it'll be
covered anyway by an eventual patch that asserts when trying to access
the use-list of an instance of ConstantData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 20:00:38 +00:00
Duncan P. N. Exon Smith
e31ddb4329 Analysis: Return early in isKnownNonNullAt for ConstantData
Check and return early for ConstantPointerNull and UndefValue
specifically in isKnownNonNullAt, and assert that ConstantData never
make it to isKnownNonNullFromDominatingCondition.

This confirms that isKnownNonNullFromDominatingCondition never walks
through the use-list of an instance of ConstantData.  Given that such
use-lists cross module boundaries, it never really made sense to do so,
and was potentially very expensive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 19:39:47 +00:00
Dylan McKay
2e99ba25d5 [AVR] Update signature of AVRTargetObjectFile::SelectSectionForGlobal
It was changed recently, and was breaking compilation of the backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 11:38:08 +00:00
Quentin Colombet
9b473140dd [RegisterBankInfo] Constify the member of the XXXMapping maps.
This makes it obvious that items in those maps behave like statically
created objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282327 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:54:03 +00:00
Quentin Colombet
ab46f81198 [RegisterBankInfo] Document the design choice for the BreakDown.
This adds a comment explaining why we will duplicate PartialMapping to
represent the breakdown for complex mappings (mappings with more than
one partial mapping), instead of using an array of pointer.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:53:58 +00:00
Quentin Colombet
d1ab103882 [RegisterBankInfo] Add statistics for dynamic value mappings.
Like partial mappings, as we move toward TableGen'ed information, the
number should reach zero eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:53:55 +00:00
Quentin Colombet
9545266289 [RegisterBankInfo] Uniquely generate ValueMapping.
This is a step toward statically allocate ValueMapping. Like the
previous few commits, the goal is to move toward a TableGen'ed like
structure with no dynamic allocation at all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:53:52 +00:00
Quentin Colombet
245edb6c14 [RegisterBankInfo] Keep valid pointers for PartialMappings.
Previously we were using the address of the unique instance of a partial
mapping in the related map to access this instance. However, when the
map grows, the whole set of instances may be moved elsewhere and the
previous addresses are not valid anymore.

Instead, keep the address of the unique heap allocated instance of a
partial mapping.

Note: I did not see any actual bugs for that problem as the number of
partial mappings dynamically allocated is small (<= 4).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:53:48 +00:00
Kostya Serebryany
ec25365d1b [libFuzzer] add a standalone build script
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 04:00:00 +00:00
Duncan P. N. Exon Smith
c1ce9acb64 GlobalStatus: Don't walk use-lists of ConstantData
Return early from llvm::isSafeToDestroyConstant() whenever the value
`isa<ConstantData>()`.  These constants are shared across the
LLVMContext.  We never really want to delete them here, and walking
their use-lists can be very expensive.

(This is motivated by an eventual goal of removing use-lists entirely
from ConstantData.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-24 02:30:11 +00:00
Kostya Serebryany
e2e54904b7 [libFuzzer] simplify HandleTrace again, start re-running interesting units and collecting their features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 23:51:58 +00:00
Peter Collingbourne
9194bd40e5 Add qualification to fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 23:23:23 +00:00
Sanjay Patel
e86f70292b [x86] fix FCOPYSIGN lowering to create constants instead of ConstantPool loads
This is similar to:
https://reviews.llvm.org/rL279958

By not prematurely lowering to loads, we should be able to more easily eliminate
the 'or' with zero instructions seen in copysign-constant-magnitude.ll.

We should also be able to extend this code to handle vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 23:17:29 +00:00
Rui Ueyama
200a529492 Add StringSwitch::Cases functions that takes 6 to 10 arguments.
Differential Revision: https://reviews.llvm.org/D24882

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 22:10:06 +00:00
Petr Hosek
2a09485a4b [MC] Support .ds directives in assembler parser
These directives are already supported by GNU assembler.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 21:53:36 +00:00
Matthias Braun
a92ff23987 llc: Add -start-before/-stop-before options
Differential Revision: https://reviews.llvm.org/D23089

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 21:46:02 +00:00
Peter Collingbourne
91d99c6edf LTO: Simplify caching interface.
The NativeObjectOutput class has a design problem: it mixes up the caching
policy with the interface for output streams, which makes the client-side
code hard to follow and would for example make it harder to replace the
cache implementation in an arbitrary client.

This change separates the two aspects by moving the caching policy
to a separate field in Config, replacing NativeObjectOutput with a
NativeObjectStream class which only deals with streams and does not need to
be overridden by most clients and introducing an AddFile callback for adding
files (e.g. from the cache) to the link.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 21:33:43 +00:00
Valery Pykhtin
dc7e3f0651 [AMDGPU] Fix for bz30427: wrong MTBUF encoding on VI
Differential revision: https://reviews.llvm.org/D24875

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 21:21:21 +00:00
Kostya Serebryany
b5dbd9f60f [libFuzzer] first steps in adding a proper automated test suite based on real-life code: add a script to build RE2 at a revision that has known bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 20:43:22 +00:00
Teresa Johnson
468ae9f703 [gold] Split plugin options controlling ThinLTO and codegen parallelism.
Summary:
As suggested in D24826, use different options for ThinLTO backend
parallelism from the option controlling regular LTO code gen
parallelism. They are already split in the LTO API, and this enables
controlling them with different clang options.

Reviewers: pcc, mehdi_amini

Subscribers: dexonsmith, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 20:35:19 +00:00
Vedant Kumar
5438741694 [Coverage] Clarify a function contract (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 20:13:44 +00:00
Vedant Kumar
3de4fb3563 [llvm-cov] Factor out logic to remove unmapped inputs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 20:13:41 +00:00