Commit Graph

129656 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
40247d2622 Fix doxygen comments from r265224, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 15:16:56 +00:00
Duncan P. N. Exon Smith
91ae2398b9 BitcodeWriter: Further unify function metadata, NFC
Further unify the handling of function-local metadata with global
metadata, by exposing the same interface in ValueEnumerator.  Both
contexts use the same accessors:

  - getMDStrings(): get the strings for this block.
  - getNonMDStrings(): get the non-strings for this block.

A future commit will start adding strings to the function-block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265224 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 15:09:42 +00:00
Duncan P. N. Exon Smith
bfce5b2915 BitcodeReader: Check for unresolved function metadata
A follow-up commit will start using function metadata blocks more
heavily.  This commit adds some error checking to confirm that metadata
is fully resolved before (and after) materializing each function.

This is valid even when reading very old bitcode from before the
metadata/value split.  The global metadata block always came before the
function blocks.  However, in case somehow this causes a regression
(i.e., an old LLVM did produce such bitcode after all) I'm committing
separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 14:55:01 +00:00
Simon Pilgrim
c3ddf2dea3 [X86][AVX] Added vector float truncation (double2float) tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 14:09:17 +00:00
Mehdi Amini
c03999349e Reverts r265219.
Unintentionally commited... time to call the day off!

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:35:03 +00:00
Mehdi Amini
47f754ab87 Fix "warning: variabl 'XX’ set but not used" in release build (variable used in assertion, NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:34:19 +00:00
Mehdi Amini
f4510007c7 wip
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:34:14 +00:00
Mehdi Amini
398341689b constify GlobalValue::getGUID() and GlobalValue::getGlobalIdentifier() (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:25:27 +00:00
Mehdi Amini
b659366e9e Revert "ThinLTO: add module caching handling."
This reverts commit r265214, unintentionally commited.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:08:18 +00:00
Mehdi Amini
5f76ad9dd7 Create a typedef GlobalValue::GUID for uint64_t and RAUW (NFC)
Summary: This should make the code more readable, especially all the map declarations.

Reviewers: tejohnson

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:07:53 +00:00
Mehdi Amini
4ac4b88b38 ThinLTO: add module caching handling.
Reviewers: tejohnson

Subscribers: llvm-commits, joker.eph

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 05:07:08 +00:00
Mehdi Amini
b3cb9bc147 80 lines column after renaming "shouldDiscardValueNames" (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 03:59:58 +00:00
Mehdi Amini
64a77d0033 Rename Context::discardValueNames() to shouldDiscardValueNames() (NFC)
Suggested by Sean Silva.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 03:46:17 +00:00
Mehdi Amini
22706dc4c0 Add Cache Pruning support
Incremental LTO will usea cache to store object files.
This patch handles the pruning part of the cache, exposing
a few knobs:

- Pruning interval: the implementation keeps a "timestamp" file in the
  directory and will scan it only after a given interval since the
  last modification of the timestamp file. This is for performance
  purpose, we don't want to scan continuously the folder.
- Entry expiration: this is the time after which a file that hasn't
  been used is remove from the cache.
- Maximum size: expressed in percentage of the available disk space,
  it helps to avoid that we blow up the disk space.

http://reviews.llvm.org/D18422

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 03:28:26 +00:00
Hans Wennborg
88fbbb352c Fix -Wpedantic warning about extra semi-colon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-02 01:03:41 +00:00
Rong Xu
e7eaa873ce [PGO] Use a helper function to find all indirect call-sites
Use a helper function to find all the direct-calls-sites in a function.
Also split the code into a separated file as this will be use by
indirect-call-promotion transformation.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 23:16:44 +00:00
Tim Northover
01dde4144a AArch64: avoid clobbering SP for dead MOVimm pseudos.
We were producing ORR, which actually defines a GPR32sp rather than a GPR32.

Should fix PR23209.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 23:14:52 +00:00
Nico Weber
6bde7e452f Make DIASession work if msdia*.dll isn't registered.
This fixes various symbolization test failures for me when I build with a
hermetic VS2015 without having run the 2015 installer.

http://reviews.llvm.org/D18707


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 22:21:51 +00:00
Adrian Prantl
fbce329a31 Add missing emissionKind flags to the DICompileUnits of several old testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 22:18:43 +00:00
Mehdi Amini
03669a56fb ThinLTO: special handling for LinkOnce functions
These function can be dropped by the compiler if they are no longer
referenced in the current module. However there is a change that
another module is still referencing them because of the import.

Multiple solutions can be used:

- Always import LinkOnce when a caller is imported. This ensure that
  every module with a call to a LinkOnce has the definition and will
  be able to emit it if it emits the call.
- Turn the LinkOnce into Weak, so that it is always emitted.
- Turn all LinkOnce into available_externally and come back after all
  modules are codegen'ed to emit only one copy of the linkonce, when
  there is still a reference to it.

This patch implement the second option, with am optimization that
only *one* module will turn the LinkOnce into Weak, while the others
will turn it into available_externally, so that there is exactly one
copy emitted for the whole compilation.

http://reviews.llvm.org/D18346

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:53:50 +00:00
Manman Ren
4bda882517 Swift Calling Convention: add swifterror attribute.
A ``swifterror`` attribute can be applied to a function parameter or an
AllocaInst.

This commit does not include any target-specific change. The target-specific
optimization will come as a follow-up patch.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:41:15 +00:00
Simon Pilgrim
44e6fffbb4 [X86][SSE] Regenerated vector float tests - fabs / floor(etc.) / fneg / float2double
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:30:48 +00:00
Simon Pilgrim
e4a978783a [X86][SSE] Vector i64 load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:06:17 +00:00
Simon Pilgrim
68b3b2c3e2 [X86][SSE] Regenerated comparison mask and float immediate tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:00:00 +00:00
Simon Pilgrim
047f650a3c [X86][SSE] Regenerated the vec_extract tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 20:55:19 +00:00
David Blaikie
130ab6b212 Update owners to reflect recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 20:40:49 +00:00
Rong Xu
ba623ac1b5 Fix buildbot lldb-amd64-ninja-netbsd7 failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 20:15:04 +00:00
Simon Pilgrim
c9b8f68005 [X86][SSE] Regenerated the vec_insert tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 19:42:23 +00:00
James Y Knight
07284c3594 Remove useless check for ThreadModel==Single in ARMISelLowering. NFC.
ThreadModel::Single is already handled already by ARMPassConfig adding
LowerAtomicPass to the pass list, which lowers all atomics to non-atomic
ops and deletes fences.

So by the time we get to ISel, there's no atomic fences left, so they
don't need special handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 19:33:19 +00:00
Peter Collingbourne
302882987a LowerBitSets: Move declarations to separate namespace.
Should fix modules build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:46:50 +00:00
Mike Aizatsky
f4643f6392 [libfuzzer] adding license headers to cpp files
Differential Revision: http://reviews.llvm.org/D18705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:38:58 +00:00
Simon Pilgrim
1bb3a19ffc [X86][SSE] Regenerated vec_partial tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265173 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:30:29 +00:00
Sanjay Patel
31624e4275 [x86] add an SSE2 + fast-unaligned accesses run for memset nonzero tests
Was there really no other way to splat a byte in SSE2?
    punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
    pshuflw {{.*#+}} xmm0 = xmm0[0,0,0,0,4,5,6,7]
    pshufd {{.*#+}} xmm0 = xmm0[0,0,1,1]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265172 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:29:25 +00:00
Simon Pilgrim
22b6378a9f [X86][SSE] Regenerated vec_logical tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265171 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:28:23 +00:00
Tom Stellard
059753cf8e AMDGPU: Implement {BUFFER,FLAT}_ATOMIC_CMPSWAP{,_X2}
Summary:
Implement BUFFER_ATOMIC_CMPSWAP{,_X2} instructions on all GCN targets, and FLAT_ATOMIC_CMPSWAP{,_X2} on CI+.

32-bit instruction variants tested manually on Kabini and Bonaire. Tests and parts of code provided by Jan Veselý.

Patch by: Vedran Miletić

Reviewers: arsenm, tstellarAMD, nhaehnle

Subscribers: jvesely, scchan, kanarayan, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265170 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:27:37 +00:00
Simon Pilgrim
b258b0e1c1 [X86][SSE] Regenerated vector sdiv to shifts tests
Added SSE + AVX1 tests as well as AVX2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:18:40 +00:00
Mike Aizatsky
1ec923a9c5 [sancov] save entry block from pruning (it is always full dominator)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:13:19 +00:00
Sanjay Patel
208a8fcf44 [x86] add an SSE1 run for these tests
Note however that this is identical to the existing SSE2 run.
What we really want is yet another run for an SSE2 machine that
also has fast unaligned 16-byte accesses.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 18:11:30 +00:00
Simon Pilgrim
08e2214ee6 [X86][SSE] Regenerated vec_setcc tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:55:02 +00:00
Simon Pilgrim
2a4643560e [X86][SSE] Regenerated the vec_set tests.
Replaced lots of dodgy greps with actual codegen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265163 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:40:25 +00:00
Sanjay Patel
7966329ae7 [x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to http://reviews.llvm.org/D18566 and http://reviews.llvm.org/D18676 -
where we noticed that an intermediate splat was being generated for memsets of
non-zero chars.

That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.

The 16-byte test that was added in D18566 is now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.

Note that the SSE1 path is not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:36:45 +00:00
Chad Rosier
4225a30340 [AArch64] Fix a typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265160 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:34:38 +00:00
David Majnemer
8f6f6d0cea [InstCombine] Don't sink an instr after a catchswitch
A catchswitch is a terminator, instructions cannot be inserted after it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:28:17 +00:00
David Majnemer
3f538b527e [SLPVectorizer] Don't insert an extractelement before a catchswitch
A catchswitch cannot be preceded by another instruction in the same
basic block (other than a PHI node).

Instead, insert the extract element right after the materialization of
the vectorized value.  This isn't optimal but is a reasonable compromise
given the constraints of WinEH.

This fixes PR27163.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265157 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 17:28:15 +00:00
Rong Xu
a7f5174cd1 [PGO] Refactor PGOFuncName meta data code to be used in clang
Refactor the code that gets and creates PGOFuncName meta data so that it can be
used in clang's value profile annotation.

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





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265149 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 16:43:30 +00:00
Sanjay Patel
fb73eb7749 [x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to D18566 - where we noticed that an intermediate splat was being
generated for memsets of non-zero chars.

That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.

The tests that were added in the last patch are now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.
In the new tests, the splat via shuffling looks ok to me, but there might be some
room for improvement depending on uarch there.

Note that the SSE1/2 paths are not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 16:27:14 +00:00
Benjamin Kramer
c9fc333558 [ADT] Make StringMap's tombstone aligned.
This avoids undefined behavior when casting pointers to it. Also make
sure that we don't cast to a derived StringMapEntry before checking for
tombstone, as that may have different alignment requirements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 15:51:51 +00:00
Vedant Kumar
9f0f7beb05 [PGOProfile] Rename a test to make it more reusable, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265144 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 15:45:33 +00:00
Valery Pykhtin
7d11146a8d [AMDGPU] fix MADAK/MADMK instructions operand namings to match encoding fields.
$vsrc1 -> $src1, $k -> $imm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 13:13:12 +00:00
Andrea Di Biagio
b632c256b6 [x86] Remove redundant call to setTargetDAGCombine for BUILD_VECTOR node type.
Since revision 235394, we no longer perform target specific combines on
build_vector nodes. No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 12:25:44 +00:00