1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

129156 Commits

Author SHA1 Message Date
Lang Hames
2b58bb4219 [Object] Start threading Error through MachOObjectFile construction.
llvm-svn: 264425
2016-03-25 17:25:34 +00:00
Sanjay Patel
fc17a70298 [InstCombine] consolidate regression tests of the ancients (2002)
Testing out the check-generator-script that's now in the utils folder.

llvm-svn: 264424
2016-03-25 17:16:32 +00:00
Sanjay Patel
b097267690 fix IR function name regex to allow hyphens
llvm-svn: 264422
2016-03-25 17:00:12 +00:00
Adrian Prantl
ed90338029 Document the purpose of this testcase.
llvm-svn: 264421
2016-03-25 16:49:57 +00:00
Jun Bum Lim
cd509e296e Revert "[SetVector] Add erase() method"
This reverts commit r264414.

llvm-svn: 264420
2016-03-25 16:49:16 +00:00
Hemant Kulkarni
f8edcd154f Fix Narrowing conversion warning introduced by r264415
llvm-svn: 264419
2016-03-25 16:37:03 +00:00
Mehdi Amini
5a67abb5fc Improve StringMap unittests: reintroduce move count, but shield against std::pair internals
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264418
2016-03-25 16:36:00 +00:00
Mehdi Amini
5143e0f517 Ensure that the StringMap does not grow during the test for pre-allocation/reserve
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264416
2016-03-25 16:09:34 +00:00
Hemant Kulkarni
8b63e79e81 [llvm-readobj] Impl GNU style program headers print
readelf -lW

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

llvm-svn: 264415
2016-03-25 16:04:48 +00:00
Jun Bum Lim
305aa24843 [SetVector] Add erase() method
Summary:
Add erase() which returns an iterator pointing to the next element after the
erased one. This makes it possible to erase selected elements while iterating
over the SetVector :
  while (I != E)
    if (test(*I))
      I = SetVector.erase(I);
    else
      ++I;

Reviewers: qcolombet, mcrosier, MatzeB, dblaikie

Subscribers: dberlin, dblaikie, mcrosier, llvm-commits

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

llvm-svn: 264414
2016-03-25 16:04:43 +00:00
Mehdi Amini
90f0c30a7d Disable counting the number of move in the unittest, it seems to rely on move-construction elision
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264412
2016-03-25 15:46:14 +00:00
Jonas Paulsson
bdd0ea44e8 [SystemZ] Remove isBranch and isTerminator flags on BRCT and BRCTG.
The BranchUnaryRI instruction class already sets these flags.

Reviewed by Ulrich Weigand.

llvm-svn: 264411
2016-03-25 15:42:30 +00:00
Duncan P. N. Exon Smith
5f89dfaeae Revert "Bitcode: Collect all MDString records into a single blob"
This reverts commit r264409 since it failed to bootstrap:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/8302/

llvm-svn: 264410
2016-03-25 15:22:27 +00:00
Duncan P. N. Exon Smith
7b1e6b8367 Bitcode: Collect all MDString records into a single blob
Optimize output of MDStrings in bitcode.  This emits them in big blocks
(currently 1024) in a pair of records:
  - BULK_STRING_SIZES: the sizes of the strings in the block, and
  - BULK_STRING_DATA: a single blob, which is the concatenation of all
    the strings.

Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this
should (a) slightly reduce bitcode size, since there is less record
overhead, and (b) greatly improve reading speed, since blobs are super
cheap to deserialize.

I needed to add support for blobs to streaming input to get the test
suite passing.
  - StreamingMemoryObject::getPointer reads ahead and returns the
    address of the blob.
  - To avoid a possible reallocation of StreamingMemoryObject::Bytes,
    BitstreamCursor::readRecord needs to move the call to JumpToEnd
    forward so that getPointer is the last bitstream operation.

llvm-svn: 264409
2016-03-25 14:40:18 +00:00
Chad Rosier
bf29b07c44 [AArch64] Fix typo. NFC.
llvm-svn: 264408
2016-03-25 14:37:43 +00:00
David L Kreitzer
f43e26ebd7 Enable non-power-of-2 #pragma unroll counts.
Patch by Evgeny Stupachenko.

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

llvm-svn: 264407
2016-03-25 14:24:52 +00:00
Simon Pilgrim
824e119cc6 [X86][SSE] Don't duplicate Lower256IntArith functionality in LowerShift. NFC.
LowerShift was using the same code as Lower256IntArith to split 256-bit vectors into 2 x 128-bit vectors, so now we just call Lower256IntArith.

llvm-svn: 264403
2016-03-25 14:17:54 +00:00
Elena Demikhovsky
e73ee2b606 fixed typo
llvm-svn: 264395
2016-03-25 10:08:36 +00:00
Mehdi Amini
70409f27e8 Fix windows build for sys::fs:file_status Access Time added in r264392
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264393
2016-03-25 07:40:52 +00:00
Mehdi Amini
3103566c26 Add lastAccessedTime to file_status
Differential Revision: http://reviews.llvm.org/D18456

This is a re-commit of r264387 and r264388 after fixing a typo.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264392
2016-03-25 07:30:21 +00:00
Mehdi Amini
b571577686 Fix perfect forwarding for StringMap
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264391
2016-03-25 07:11:31 +00:00
Mehdi Amini
1ab88eb74f Revert "Add lastAccessedTime to file_status"
This reverts commit r264387.
Bots are broken in various ways, I need to take one commit at a time...

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264390
2016-03-25 06:51:43 +00:00
Mehdi Amini
926716d050 Revert "Fix windows build for sys::fs:file_status Access Time added in r264387"
This reverts commit r264388.
Bots are broken in various ways, I need to take one commit at a time...

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264389
2016-03-25 06:43:22 +00:00
Mehdi Amini
7ede286b74 Fix windows build for sys::fs:file_status Access Time added in r264387
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264388
2016-03-25 06:06:44 +00:00
Mehdi Amini
63ad31425e Add lastAccessedTime to file_status
Reviewers: silvas

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264387
2016-03-25 05:58:11 +00:00
Mehdi Amini
7f6c7f0a20 Query the StringMap only once when creating MDString (NFC)
Summary:
Loading IR with debug info improves MDString::get() from 19ms to 10ms.
This is a rework of D16597 with adding an "emplace" method on the StringMap
to avoid requiring the MDString move ctor to be public.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264386
2016-03-25 05:58:04 +00:00
Mehdi Amini
aad049fea9 Adjust initial size in StringMap constructor to guarantee no grow()
Summary:
StringMap ctor accepts an initialize size, but expect it to be
rounded to the next power of 2. The ctor can handle that directly
instead of expecting clients to round it. Also, since the map will
resize itself when 75% full, take this into account an initialize
a larger initial size to avoid any growth.

Reviewers: dblaikie

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264385
2016-03-25 05:57:57 +00:00
Mehdi Amini
bbd89f73ab Fix DenseMap::reserve(): the formula was wrong
Summary:
Just running the loop in the unittests for a few more iterations
(till 48) exhibit that the condition on the limit was not handled
properly in r263522.
Rewrite the test to use a class to count move/copies that happens
when inserting into the map.
Also take the opportunity to refactor the logic to compute the
number of buckets required for a given number of entries in the map.
Use this when constructing a DenseMap with a desired size given to
the constructor (and add a tests for this).

Reviewers: dblaikie

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264384
2016-03-25 05:57:52 +00:00
Mehdi Amini
cc356f2508 StringMap: reserve appropriate size when initializing from an initializer list
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264383
2016-03-25 05:57:47 +00:00
Mehdi Amini
e81e2ca5f2 Add GUID/getGlobalIdentifier() non-static API to global value
Summary:
These are just helpers calling their static counter part to
simplify client code.

Reviewers: tejohnson

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264382
2016-03-25 05:57:41 +00:00
Duncan P. N. Exon Smith
696d47896a Bitcode: Use std::stable_partition for reproducible builds
Caught by inspection while working on partitioning metadata.  It's nice
to produce the same bitcode if you run the compiler twice.

llvm-svn: 264381
2016-03-25 02:20:28 +00:00
Duncan P. N. Exon Smith
075d0c9692 Bitcode: Stop using MODULE_CODE_METADATA_VALUES
The motivation for MODULE_CODE_METADATA_VALUES was to enable an
-flto=thin scheme where:

 1. First, one function is cherry-picked from a bitcode file.
 2. Later, another function is cherry-picked.
 3. Later, ...
 4. Finally, the metadata needed by all the previous functions is
    loaded.

This was abandoned in favour of:

 1. Calculate the superset of functions needed from a Module.
 2. Link all functions at once.

Delayed metadata reading no longer serves a purpose.  It also adds
a few complication, since we can't count on metadata being properly
parsed when exiting the BitcodeReader.  After discussing with Teresa, we
agreed to remove it.

The code that depended on this was removed/updated in r264326.

llvm-svn: 264378
2016-03-25 01:29:50 +00:00
Matt Arsenault
753d425ead AMDGPU: Cost model for basic integer operations
This resolves bug 21148 by preventing promotion to
i64 induction variables.

llvm-svn: 264376
2016-03-25 01:16:40 +00:00
Hans Wennborg
9fe6bf47fd X86: Use push-pop for materializing 8-bit immediates for minsize (take 2)
This is the same as r255936, with added logic for avoiding clobbering of the
red zone (PR26023).

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

llvm-svn: 264375
2016-03-25 01:10:56 +00:00
Matt Arsenault
bfd4cf42ec AMDGPU: Partially implement getArithmeticInstrCost for FP ops
llvm-svn: 264374
2016-03-25 01:00:32 +00:00
Duncan P. N. Exon Smith
0c2bab754e IR: Stop upgrading !llvm.loop attachments via MDString
Remove logic to upgrade !llvm.loop by changing the MDString tag
directly.  This old logic would check (and change) arbitrary strings
that had nothing to do with loop metadata.  Instead, check !llvm.loop
attachments directly, and change which strings get attached.

Rather than updating the assembly-based upgrade, drop it entirely.  It
has been quite a while since we supported upgrading textual IR.

llvm-svn: 264373
2016-03-25 00:56:13 +00:00
Duncan P. N. Exon Smith
f60239c0f1 IR: Reserve an MDKind for !llvm.loop; NFC
This reserves an MDKind for !llvm.loop, which allows callers to avoid a
string-based lookup.  I'm not sure why it was missing.

There should be no functionality change here, just a small compile-time
speedup.

llvm-svn: 264371
2016-03-25 00:35:38 +00:00
Saleem Abdulrasool
866cc7fa60 ARM: fix optimised division on WoA
We did not have an explicit branch to the continuation BB.  When the check was
hoisted, this could permit control follow to fall through into the division
trap.  Add the explicit branch to the continuation basic block to ensure that
code execution is correct.

llvm-svn: 264370
2016-03-25 00:34:11 +00:00
Matt Arsenault
1c86c8a2a7 TTI: Report 0 cost for free addrspacecasts
llvm-svn: 264369
2016-03-25 00:26:29 +00:00
Matt Arsenault
ab1f6bea74 TTI: Use 0 for cost of fabs if free
Ideally this would also happen for fneg, but that
isn't a distinct operation in the IR.

llvm-svn: 264368
2016-03-25 00:26:22 +00:00
Matt Arsenault
ffa532b58f AMDGPU: TTI: Make insertelement free.
We don't want to have a cost to scalarizing operations.

llvm-svn: 264364
2016-03-25 00:14:11 +00:00
Reid Kleckner
57ae7f9db2 Try to fix ODR violation of ErrorInfo::ID
This implements my suggestion to Lang.

llvm-svn: 264360
2016-03-24 23:49:34 +00:00
Manman Ren
abf6fcb013 CXX TLS: collect return blocks after SelectAllBasicBlocks.
It is incorrect to get the corresponding MBB for a ReturnInst before
SelectAllBasicBlocks since SelectAllBasicBlocks can change the
correspondence between a ReturnInst and the MBB it is in.

PR27062

llvm-svn: 264358
2016-03-24 23:21:29 +00:00
Sanjay Patel
005a2447bd Add utility script to generate checks for opt or llc regression tests
This is an enhancement of the existing update_llc_test_checks.py script.
It adds some of the functionality from the script used in D17999 to make
the IR checking more flexible.

The bad news: 
This actually is 'My First Python Program'. Thus, it's likely that I have
violated all best practices of Python programming if I've made a functional
change from the original program. If you see anything that's obviously 
wrong, please let me know or feel free to fix it. I didn't even read any
documentation...

The good news: 
I tested this on ~10 existing opt/llc regression tests, and it does what 
I hoped for. It produces exact checking for IR regression tests and doesn't
signficantly change the existing llc-with-x86-target asm checking. The opt
tests that were modified in r263667, r263668, r263674, and r263679 are
examples of the expected results, except that this version of the script 
puts the check lines ahead of the IR to follow the existing llc/asm 
behavior.

If there are no complaints/fallout, we should be able to remove the 
original script. Extending this script to be used for non-x86 and clang
regression tests would be the expected follow-up steps.

llvm-svn: 264357
2016-03-24 23:19:26 +00:00
Sanjoy Das
f86c960aaf Reduce code duplication by extracting out a helper function; NFC
llvm-svn: 264355
2016-03-24 22:51:49 +00:00
Sanjoy Das
43d252542e Lower varargs correctly in deopt bundle lowering
Earlier we were ignoring varargs in LowerCallSiteWithDeoptBundle because
populateCallLoweringInfo does not set CallLoweringInfo::IsVarArg.

llvm-svn: 264354
2016-03-24 22:37:52 +00:00
Sean Silva
73782171b6 Fix typo: XDS -> XDG
Patch by Robert Ma <bob1211@gmail.com>!

llvm-svn: 264352
2016-03-24 22:27:27 +00:00
David Blaikie
0feb27005d llvm-dwp: Coalesce code for reading the CU's DW_AT_GNU_dwo_id and DW_AT_name
Going to be reading the DW_AT_GNU_dwo_name shortly as well, and there
was already enough duplication here that it was worth refactoring
rather than adding even more.

llvm-svn: 264350
2016-03-24 22:17:08 +00:00
Mike Aizatsky
3edddc591b [sancov] renaming statistics fields.
llvm-svn: 264349
2016-03-24 21:49:55 +00:00
Matthias Braun
8753a39411 LiveInterval: Fix Distribute() failing on liveranges with unused VNInfos
This fixes http://llvm.org/PR26991

llvm-svn: 264345
2016-03-24 21:41:38 +00:00