Commit Graph

132878 Commits

Author SHA1 Message Date
Lang Hames
1fa1983597 [Orc] Add conversion to/from RuntimeDyld::SymbolInfo for JITSymbol.
This tidies up some code that was manually constructing RuntimeDyld::SymbolInfo
instances from JITSymbols. It will save more mess in the future when
JITSymbol::getAddress is extended to return an Expected<TargetAddress> rather
than just a TargetAddress, since we'll be able to embed the error checking in
the conversion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 23:14:26 +00:00
Peter Collingbourne
6aef9f9248 Add support for metadata attachments for global variables.
This patch adds an IR, assembly and bitcode representation for metadata
attachments for globals. Future patches will port existing features to use
these new attachments.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 23:01:54 +00:00
Zachary Turner
e781066bc2 [pdb] Add unit tests for PDB MappedBlockStream and zero copy
Differential Revision: http://reviews.llvm.org/D20837
Reviewed By: ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 22:41:52 +00:00
Matthias Braun
1cd242fe11 CodeGen: Refactor renameDisconnectedComponents() as a pass
Refactor LiveIntervals::renameDisconnectedComponents() to be a pass.
Also change the name to "RenameIndependentSubregs":

- renameDisconnectedComponents() worked on a MachineFunction at a time
  so it is a natural candidate for a machine function pass.

- The algorithm is testable with a .mir test now.

- This also fixes a problem where the lazy renaming as part of the
  MachineScheduler introduced IMPLICIT_DEF instructions after the number
  of a nodes in a region were counted leading to a mismatch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 22:38:06 +00:00
Reid Kleckner
c59038317a Speculative build fix for codeview type dumper API change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 22:32:54 +00:00
Kevin B. Smith
5830c5c818 [X86]: Add a pattern that uses GR16_ABCD rather than GR32_ABCD to avoid falsely marking whole 32 bit register as live.
Differential Revision: http://reviews.llvm.org/D20649


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 22:00:12 +00:00
Matthias Braun
b4b32e0649 ARM: Improve/fix comment in recently added test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 21:59:59 +00:00
Matthias Braun
fe23302cc8 ARM: Do not attempt to modify register class of physregs.
Physregs have no associated register class, do not attempt to modify it
in Thumb2InstrInfo::storeRegToStackSlot()/loadFromStackSlot().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 21:39:12 +00:00
Chris Bieneman
6d33ed3ca2 [obj2yaml] Trying to make msan happy
Failing bot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13302/steps/check-llvm%20msan/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 21:00:08 +00:00
Guozhi Wei
12ab473e2b [SLP] Pass in correct alignment when query memory access cost
This patch fixes bug https://llvm.org/bugs/show_bug.cgi?id=27897.

When query memory access cost, current SLP always passes in alignment value of 1 (unaligned), so it gets a very high cost of scalar memory access, and wrongly vectorize memory loads in the test case.

It can be fixed by simply giving correct alignment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 20:41:19 +00:00
Kevin Enderby
e9ddf3a4a7 Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error
when the object is from a slice of a Mach-O Universal Binary use something like
"foo.o (for architecture i386)" as part of the error message when expected.

Also fixed places in these tools that were ignoring object file errors from
MachOUniversalBinary::getAsObjectFile() when the code moved on to see if
the slice was an archive.

To do this MachOUniversalBinary::getAsObjectFile() and
MachOUniversalBinary::getObjectForArch() were changed from returning
ErrorOr<...> to Expected<...> then that was threaded up to its users.

Converting these interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. To contain the changes for now the use of
errorToErrorCode() is still used in two places yet to be fully converted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 20:35:34 +00:00
Chris Bieneman
37735dbc09 [CMake] Update to requiring CMake 3.4.3
Summary:
This is as per the discussions on developer lists:

http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 20:21:32 +00:00
George Burgess IV
31047306fc [CFLAA] Don't link GEP pointers to GEP indices.
Code like the following is considered broken, and doesn't need to be
supported by our AA magicks:

void getFoo(int *P) {
  int *PAlias = (int *)((char *)NULL + (uintptr_t)P);
}

This patch makes CFLAA drop support for code like this.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271322 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 19:55:05 +00:00
Ahmed Bougacha
2027459e9a [CodeGen] Promote FMINNAN/FMAXNAN like other binops.
We think it's OK to generate half fminnan because it's legal for the
transform-to type (f32; r245196). However, PromoteFloatRes was missing
the case; simply promote like the other binops, including minnum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271317 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:50:25 +00:00
Ahmed Bougacha
e03288c0e5 [CodeGen] Don't mark FMINNUM/FMAXNUM Expand twice. NFC.
They're already in the all_valuetypes() loop above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:50:21 +00:00
Ahmed Bougacha
3e0c470b3b [Docs] CodeGen has supported vector icmp/fcmp for a long time.
The IR support is already well-documented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:50:05 +00:00
Reid Kleckner
25565d97e7 [codeview] Improve readability of type record assembly
Adds the method MCStreamer::EmitBinaryData, which is usually an alias
for EmitBytes. In the MCAsmStreamer case, it is overridden to emit hex
dump output like this:
        .byte   0x0e, 0x00, 0x08, 0x10
        .byte   0x03, 0x00, 0x00, 0x00
        .byte   0x00, 0x00, 0x00, 0x00
        .byte   0x00, 0x10, 0x00, 0x00

Also, when verbose asm comments are enabled, this patch prints the dump
output for each comment before its record, like this:
        # ArgList (0x1000) {
        #   TypeLeafKind: LF_ARGLIST (0x1201)
        #   NumArgs: 0
        #   Arguments [
        #   ]
        # }
        .byte   0x06, 0x00, 0x01, 0x12
        .byte   0x00, 0x00, 0x00, 0x00

This should make debugging easier and testing more convenient.

Reviewers: aaboud

Subscribers: majnemer, zturner, amccarth, aaboud, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:45:36 +00:00
Rafael Espindola
f2b59e8119 Delete AArch64II::MO_CONSTPOOL.
A constant pool holding the address of a variable in equivalent to
a got entry. It produces exactly the same instruction sequence as a
got use and unlike a got use this is not uniqued by the linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:31:14 +00:00
Reid Kleckner
cb4d52f619 [codeview] Add a CVTypeDumper::dump(ArrayRef<uint8_t>) overload
This is a convenient wrapper when the type record is already laid out as
bytes in memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:15:23 +00:00
Davide Italiano
3c5dd6e28a [PM] BDCE: Fix caching of analyses.
Another chapter in the story. GlobalsAA should be preserved, as
 well as the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:53:22 +00:00
Simon Dardis
4de072ea97 [mips] Remove tests which should have been deleted.
The two xfail tests for mis32r6 & mips64r6 were supposed
to be removed in r271301.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:52:29 +00:00
Davide Italiano
860b370f3d [PM] ADCE: Fix caching of analyses.
When this pass was originally ported, AA wasn't available for the
new PM. Now it is, so we can cache properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:39:39 +00:00
Simon Dardis
f213957c14 [mips] Enforce compact branch register restrictions
Enforce compact branch register restrictions such as the use of the zero
register, both operands being the same register. Emit clear error in such
cases as the issue is subtle.

For bovc and bnvc, silently fixup such cases when emitting objects directly,
like LLVM started doing in rL269899.

Reviewers: vkalintiris, dsanders

Differential Review: http://reviews.llvm.org/D20475


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:34:42 +00:00
Chris Bieneman
7e74f7a10f [obj2yaml][yaml2obj] Support for reading and dumping the MachO export trie
The MachO export trie is a serially encoded trie keyed by symbol name. This code parses the trie and preserves the structure so that it can be dumped again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:26:36 +00:00
Erik Eckstein
980cda98b1 Fix a crash in MergeFunctions related to ordering of weak/strong functions
The assumption, made in insert() that weak functions are always inserted after strong functions,
is only true in the first round of adding functions.
In subsequent rounds this is no longer guaranteed , because we might remove a strong function from the tree (because it's modified) and add it later,
where an equivalent weak function already exists in the tree.
This change removes the assert in insert() and explicitly enforces a weak->strong order.
This also removes the need of two separate loops in runOnModule().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:20:23 +00:00
Qin Zhao
9ac0d05e2d [esan|cfrag] Create the skeleton of cfrag variable for the runtime
Summary:
Creates a global variable containing preliminary information
for the cache-fragmentation tool runtime.

Passes a pointer to the variable (null if no variable is created) to the
compilation unit init and exit routines in the runtime.

Reviewers: aizatsky, bruening

Subscribers: filcab, kubabrecka, bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:14:02 +00:00
Matt Arsenault
9d102db2c1 AMDGPU: Remove unused address space
Also return a single StringRef instead of building a string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 16:57:45 +00:00
Rafael Espindola
1a9c272521 Add a use of shouldAssumeDSOLocal to ARM.
Now this code path knows about position independent executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 15:31:55 +00:00
Krzysztof Parzyszek
72f099b5f0 [Hexagon] Disable expanding MUX instructions that define a subregister
The code in HexagonExpandCondsets.cpp does not handle those cases at the
moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 14:27:10 +00:00
Yaron Keren
4c77296fb2 Do not modify a std::vector while looping it.
Introduced in r271244, this is probably undefined behaviour and asserts when
compiled with Visual C++ debug mode. 

On further note, the loop is quadratic with regard to the number of successors
since removeSuccessor is linear and could probably be modified to linear time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 13:45:05 +00:00
Ranjeet Singh
c146d1a1e5 [ARM] Add backend support for load/store intrinsics.
Added support to map intrinsics
__builtin_arm_{ldc,ldcl,ldc2,ldc2l,stc,stcl,stc2,stc2l}
to their ARM instructions.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 12:39:30 +00:00
Simon Pilgrim
a8a5e74bf9 [X86][SSE] Add load-folding patterns for (V)CVTDQ2PD (PR27291)
Added patterns for (V)CVTDQ2PD -> 2f64 loading from a 64-bit source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 12:04:35 +00:00
Simon Dardis
8140f781f2 [mips] bnec/beqc register constraint fix
beqc and bnec cannot have $rs == $rt. Inhibit compact branch creation
if that would occur.

Reviewers: vkalintiris, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 09:54:55 +00:00
Igor Breger
ae9c817ebb [AVX512] Fix intrinsic vcvtps2ph lowering.
Differential Revision: http://reviews.llvm.org/D20788

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 08:04:21 +00:00
Igor Breger
7720e47020 Fix intrinsic vbroadcast{i32|f32}x2 lowering.
Differential Revision: http://reviews.llvm.org/D20780

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 07:43:39 +00:00
Craig Topper
2f32d38dbc [AVX512] Remove gcc builtin name from masked load intrinsics so they can be custom handled by clang to create generic masked load intrinsics instead of using the x86 specific ones.
The intrinsics will be removed in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 06:42:51 +00:00
Craig Topper
acc7ed7b83 [AVX512] Remove masked store intrinsics. Clang now emits generic masked store intrinsics instead.
The intrinsics will be autoupgraded to the same generic masked stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:50:02 +00:00
Saleem Abdulrasool
a2bdb6de81 X86: permit using SjLj EH on x86 targets as an option
This adds support to the backed to actually support SjLj EH as an exception
model.  This is *NOT* the default model, and requires explicitly opting into it
from the frontend.  GCC supports this model and for MinGW can still be enabled
via the `--using-sjlj-exceptions` options.

Addresses PR27749!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:48:07 +00:00
David Majnemer
692eabeda0 [llvm-pdbdump-fuzzer] Add a fuzzer for llvm-pdbdump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:24:40 +00:00
David Majnemer
84d13f89fd [llvm-dwarfdump-fuzzer] Get this compiling again
Looks like the dwarfdump fuzzer has bitrotted, update it to take into
account updates to the libobject API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:24:33 +00:00
Craig Topper
2463f3bdaa [X86] Remove SSE/AVX unaligned store intrinsics as clang no longer uses them. Auto upgrade to native unaligned store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 23:15:56 +00:00
Craig Topper
83ed492499 [X86] Use update_llc_test_checks.py to re-generate a test in preparation for an upcoming commit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 22:54:14 +00:00
Craig Topper
e55c354dcc [X86] Simplify and remove some unnecessary auto-upgrade code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 22:54:12 +00:00
Craig Topper
c7654447f7 [X86] Reduce the number of string compares in the autoupgrade logic by checking more prefixes instead of complete matches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 22:54:05 +00:00
Rafael Espindola
9e45fdcaa3 Fix a crash when producing COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 20:18:53 +00:00
Simon Pilgrim
47ca2d83df [X86][XOP] Split off auto-upgraded xop intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 19:50:56 +00:00
Simon Pilgrim
4dedbb6410 [X86][SSE] Renamed pmovxrm tests
These aren't intrinsics anymore - as discussed on D20686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 19:14:37 +00:00
Lang Hames
9dd9c9cfcb [Kaleidoscope][BuildingAJIT] Finish off Chapter 1.
* Various tidy-up and streamlining of existing discussion.
* Describes findSymbol and removeModule.

Chapter 1 is now rough but essentially complete in terms of content.

Feedback, patches etc. very welcome.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 19:03:26 +00:00
Simon Pilgrim
16a2da8f0e [X86][AVX2] Regenerated AVX2 extension tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271224 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 18:49:57 +00:00
Simon Pilgrim
e03d7f3fb0 [X86][SSE] Updated storeu fast-isel tests to match clang builtin tests
Since rL271214 the headers have no longer used the storeu intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 18:42:51 +00:00