OSDN Git Service

android-x86/external-llvm.git
8 years ago[codeview] Return type indices for typedefs
David Majnemer [Thu, 2 Jun 2016 06:21:37 +0000 (06:21 +0000)]
[codeview] Return type indices for typedefs

Use the type index of the underlying type unless we have a typedef from
long to HRESULT; HRESULT typedefs are translated to T_HRESULT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271494 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] fix docs
Kostya Serebryany [Thu, 2 Jun 2016 06:06:34 +0000 (06:06 +0000)]
[libFuzzer] fix docs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271493 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer tests...
Dan Liew [Thu, 2 Jun 2016 05:48:09 +0000 (05:48 +0000)]
[LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer tests on Apple platforms.

This fixes a broken part of the build on OSX as the dataflow sanitizer is not supported
on OSX yet.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271492 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibFuzzer] Reimplement how the optional user functions are called.
Dan Liew [Thu, 2 Jun 2016 05:48:02 +0000 (05:48 +0000)]
[LibFuzzer] Reimplement how the optional user functions are called.

The motivation for this change is to fix linking issues on OSX.
However this only partially fixes linking issues (the uninstrumented
tests and a few others  won't succesfully link yet).

This change introduces a struct of function pointers
(``fuzzer::ExternalFuntions``) which when initialised will point to the
optional functions if they are available.  Currently these
``LLVMFuzzerInitialize`` and ``LLVMFuzzerCustomMutator`` functions.

Two implementations of ``fuzzer::ExternalFunctions`` constructor are
provided one for Linux and one for OSX.

The OSX implementation uses ``dlsym()`` because the prior implementation
using weak symbols does not work unless the additional flags are passed
to the linker.

The Linux implementation continues to use weak symbols because the
``dlsym()`` approach does not work unless additional flags are passed
to the linker.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271491 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] docs: add contact, mention more trophies
Kostya Serebryany [Thu, 2 Jun 2016 05:45:42 +0000 (05:45 +0000)]
[libFuzzer] docs: add contact, mention more trophies

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271490 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Parse and dump section map and section contribs
Zachary Turner [Thu, 2 Jun 2016 05:07:49 +0000 (05:07 +0000)]
[pdb] Parse and dump section map and section contribs

Differential Revision: http://reviews.llvm.org/D20876
Reviewed By: rnk, ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271488 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add 512-bit load/stores to fast isel.
Craig Topper [Thu, 2 Jun 2016 04:51:37 +0000 (04:51 +0000)]
[AVX512] Add 512-bit load/stores to fast isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271486 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] No need to use 256-bit VMOVNTPS for integer types when only AVX1 is supported...
Craig Topper [Thu, 2 Jun 2016 04:19:48 +0000 (04:19 +0000)]
[X86] No need to use 256-bit VMOVNTPS for integer types when only AVX1 is supported. VMOVNTDQ is available with AVX1.

We were getting this right for v4i64 but not the other integer types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271482 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Add AVX 256-bit load and stores to fast isel.
Craig Topper [Thu, 2 Jun 2016 04:19:45 +0000 (04:19 +0000)]
[X86] Add AVX 256-bit load and stores to fast isel.

I'm not sure why this was missing for so long.

This also exposed that we were picking floating point 256-bit VMOVNTPS for some integer types in normal isel for AVX1 even though VMOVNTDQ is available. In practice it doesn't matter due to the execution dependency fix pass, but it required extra isel patterns. Fixing that in a follow up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271481 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use uint16_t for a couple arrays of instruction opcodes. NFC
Craig Topper [Thu, 2 Jun 2016 04:19:42 +0000 (04:19 +0000)]
[X86] Use uint16_t for a couple arrays of instruction opcodes. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271480 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove LOADA/LOADU/STOREA/STOREU intrinsic types now that they are unused.
Craig Topper [Thu, 2 Jun 2016 04:19:40 +0000 (04:19 +0000)]
[AVX512] Remove LOADA/LOADU/STOREA/STOREU intrinsic types now that they are unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271479 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsic...
Craig Topper [Thu, 2 Jun 2016 04:19:36 +0000 (04:19 +0000)]
[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead.

The intrinsics will be autoupgraded to the same generic masked loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271478 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd "REQUIRES-ANY" feature test
Eric Fiselier [Thu, 2 Jun 2016 01:59:57 +0000 (01:59 +0000)]
Add "REQUIRES-ANY" feature test

Summary:
This patch adds a "REQUIRES-ANY" feature test that is disjunctive. This marks a test as `UNSUPPORTED` if none of the specified features are available.

Libc++ has the need to write feature test such as `// REQUIRES-ANY: c++98, c++03`  when testing of behavior that is specific to older dialects but has since changed.

Reviewers: rnk, ddunbar

Subscribers: ddunbar, probinson, llvm-commits, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271468 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agomake icall pass name consistent /NFC
Xinliang David Li [Thu, 2 Jun 2016 01:52:05 +0000 (01:52 +0000)]
make icall pass name consistent /NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271467 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] use __sanitizer_print_memory_profile to print the memory profile on OOM
Kostya Serebryany [Thu, 2 Jun 2016 01:33:11 +0000 (01:33 +0000)]
[libFuzzer] use __sanitizer_print_memory_profile to print the memory profile on OOM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271465 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoInline isDereferenceableFromAttribute; NFC
Sanjoy Das [Thu, 2 Jun 2016 00:52:53 +0000 (00:52 +0000)]
Inline isDereferenceableFromAttribute; NFC

Now that `Value::getPointerDereferenceableBytes` looks beyond just
attributes, the name `isDereferenceableFromAttribute` is misleading.
Just inline the function, since it is small and only used once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271456 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove Value::isPointerDereferenceable; NFCI
Sanjoy Das [Thu, 2 Jun 2016 00:52:48 +0000 (00:52 +0000)]
Remove Value::isPointerDereferenceable; NFCI

... and merge into `Value::getPointerDereferenceableBytes`. This was
suggested by Artur Pilipenko in D20764 -- since we no longer allow loads
of unsized types, there is no need anymore to have this special logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271455 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTry to fix docs build after rL271440
Tamas Berghammer [Thu, 2 Jun 2016 00:26:18 +0000 (00:26 +0000)]
Try to fix docs build after rL271440

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271452 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Rename *UAR* into *UseAfterReturn*
Vitaly Buka [Thu, 2 Jun 2016 00:06:42 +0000 (00:06 +0000)]
[asan] Rename *UAR* into *UseAfterReturn*

Summary:
To improve readability.

PR27453

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271447 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix incorrectly setting kill flag when copying register tuples
Matt Arsenault [Thu, 2 Jun 2016 00:04:30 +0000 (00:04 +0000)]
AMDGPU: Fix incorrectly setting kill flag when copying register tuples

This fixes some verifier errors when trackLivenessAfterRegAlloc is
enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271446 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake MachineCopyPropagation preserve CFG
Matt Arsenault [Thu, 2 Jun 2016 00:04:26 +0000 (00:04 +0000)]
Make MachineCopyPropagation preserve CFG

This doesn't touch it as far as I can tell.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: SIDebuggerInsertNops preserves CFG
Matt Arsenault [Thu, 2 Jun 2016 00:04:22 +0000 (00:04 +0000)]
AMDGPU: SIDebuggerInsertNops preserves CFG

This saves an additional run of the DominatorTree and
MachineLoopInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271444 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agocmake: Fix color diags under ninja if the compiler is "AppleClang"
Justin Bogner [Wed, 1 Jun 2016 23:29:26 +0000 (23:29 +0000)]
cmake: Fix color diags under ninja if the compiler is "AppleClang"

Apparently cmake differentiates between Clang and AppleClang, and we
fail to color our diagnostics if you have the latter. Fix that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271442 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRework r271439. I forgot to save the buffer for editing.
NAKAMURA Takumi [Wed, 1 Jun 2016 23:03:46 +0000 (23:03 +0000)]
Rework r271439. I forgot to save the buffer for editing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271441 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd new LLVM_EXTERNAL_PROJECTS option to cmake
Tamas Berghammer [Wed, 1 Jun 2016 23:00:45 +0000 (23:00 +0000)]
Add new LLVM_EXTERNAL_PROJECTS option to cmake

The new option makes it possible to build external projects as part of
the llvm build without copying (or symlinking) then into llvm/tool with
specifying a few additional cmake variables.

Example usage (2 additional project called foo and bar):
-DLLVM_EXTERNAL_PROJECTS="Foo;Bar"
-DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo
-DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar

Note: This is the extension of the approach we already support for
clang/lldb/poly with adding an option to specify additional supported
projects.

Differential revision: http://reviews.llvm.org/D20838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271440 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMappedBlockStreamTest.cpp: Simplify array initializers.
NAKAMURA Takumi [Wed, 1 Jun 2016 22:59:06 +0000 (22:59 +0000)]
MappedBlockStreamTest.cpp: Simplify array initializers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271439 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid a load for local functions.
Rafael Espindola [Wed, 1 Jun 2016 21:57:11 +0000 (21:57 +0000)]
Avoid a load for local functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271437 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86, AVX2] regenerate checks
Sanjay Patel [Wed, 1 Jun 2016 21:32:56 +0000 (21:32 +0000)]
[x86, AVX2] regenerate checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MemorySSA] Port to new pass manager
Geoff Berry [Wed, 1 Jun 2016 21:30:40 +0000 (21:30 +0000)]
[MemorySSA] Port to new pass manager

Add support for the new pass manager to MemorySSA pass.

Change MemorySSA to be computed eagerly upon construction.

Change MemorySSAWalker to be owned by the MemorySSA object that creates
it.

Reviewers: dberlin, george.burgess.iv

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271432 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSDAG: Drop a redundant replace and move the dead node removal closer. NFC
Justin Bogner [Wed, 1 Jun 2016 20:55:26 +0000 (20:55 +0000)]
SDAG: Drop a redundant replace and move the dead node removal closer. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271429 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAG] Improve legalization of INSERT_SUBVECTOR
Michael Kuperstein [Wed, 1 Jun 2016 20:49:35 +0000 (20:49 +0000)]
[DAG] Improve legalization of INSERT_SUBVECTOR

When the index is known to be constant 0, insert directly into the the low half,
instead of spilling, performing the insert in-memory, and reloading.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271428 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PPC64] Fix SUBFC8 Defs list
Keno Fischer [Wed, 1 Jun 2016 20:31:07 +0000 (20:31 +0000)]
[PPC64] Fix SUBFC8 Defs list

Fix PR27943 "Bad machine code: Using an undefined physical register".
SUBFC8 implicitly defines the CR0 register, but this was omitted in
the instruction definition.

Patch by Jameson Nash <jameson@juliacomputing.com>

Reviewers: hfinkel
Differential Revision: http://reviews.llvm.org/D20802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271425 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SCEV] Keep SCEVExpander insert points consistent.
Geoff Berry [Wed, 1 Jun 2016 20:03:09 +0000 (20:03 +0000)]
[SCEV] Keep SCEVExpander insert points consistent.

Summary:
Make sure that the SCEVExpander Builder insert point and any
saved/restored insert points are kept consistent (i.e. their Instruction
and BasicBlock match) when moving instructions in SCEVExpander.

This fixes an issue triggered by
http://reviews.llvm.org/D18001 [LSR] Create fewer redundant instructions.

Test case will be added in reapply commit of above change:
http://reviews.llvm.org/D18480 Reapply [LSR] Create fewer redundant instructions.

Reviewers: sanjoy

Subscribers: mzolotukhin, sanjoy, qcolombet, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271424 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Claim NoAlias if two GEPs index different fields of the same struct"
Daniel Berlin [Wed, 1 Jun 2016 18:55:32 +0000 (18:55 +0000)]
Revert "Claim NoAlias if two GEPs index different fields of the same struct"

This reverts commit 2d5d6493f43eb68493a3852b8c226ac9fafdc7eb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Recognize builtin allocation functions.
George Burgess IV [Wed, 1 Jun 2016 18:39:54 +0000 (18:39 +0000)]
[CFLAA] Recognize builtin allocation functions.

This patch extends CFLAA to recognize allocation functions such as
malloc, free, etc, so we can treat them more aggressively.

Patch by Jia Chen.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271421 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] silence warnings about moving from a temporary.
Zachary Turner [Wed, 1 Jun 2016 18:18:55 +0000 (18:18 +0000)]
[pdb] silence warnings about moving from a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271420 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Simplify StreamArray operator++
David Majnemer [Wed, 1 Jun 2016 18:13:08 +0000 (18:13 +0000)]
[CodeView] Simplify StreamArray operator++

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Make sure StreamRef::readBytes doesn't read too much
David Majnemer [Wed, 1 Jun 2016 18:13:06 +0000 (18:13 +0000)]
[CodeView] Make sure StreamRef::readBytes doesn't read too much

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271418 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PDB] Make ModStream::symbols report errors
David Majnemer [Wed, 1 Jun 2016 18:13:04 +0000 (18:13 +0000)]
[PDB] Make ModStream::symbols report errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271417 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PDB] Silence sign comparison warnings in MappedBlockStreamTest
David Majnemer [Wed, 1 Jun 2016 18:13:02 +0000 (18:13 +0000)]
[PDB] Silence sign comparison warnings in MappedBlockStreamTest

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271416 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoClaim NoAlias if two GEPs index different fields of the same struct
Daniel Berlin [Wed, 1 Jun 2016 18:12:01 +0000 (18:12 +0000)]
Claim NoAlias if two GEPs index different fields of the same struct

Patch by Taewook Oh

Summary: Patch for Bug 27478. Make BasicAliasAnalysis claims NoAlias if two GEPs index different fields of the same structure.

Reviewers: hfinkel, dberlin

Subscribers: dberlin, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBetter fix for PR27903.
Than McIntosh [Wed, 1 Jun 2016 17:55:10 +0000 (17:55 +0000)]
Better fix for PR27903.

Summary:
Re-enable lifetime-start-on-first-use for stack coloring,
but explicitly disable it for slots with more than one start
or end lifetime marker.

Bug: 27903

Reviewers: wmi, tejohnson, qcolombet, gbiv

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271412 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix the NDEBUG build
Reid Kleckner [Wed, 1 Jun 2016 17:31:24 +0000 (17:31 +0000)]
Fix the NDEBUG build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271411 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] For some IVs, use vector phis instead of widening in the loop body
Michael Kuperstein [Wed, 1 Jun 2016 17:16:46 +0000 (17:16 +0000)]
[LV] For some IVs, use vector phis instead of widening in the loop body

Previously, whenever we needed a vector IV, we would create it on the fly,
by splatting the scalar IV and adding a step vector. Instead, we can create a
real vector IV. This tends to save a couple of instructions per iteration.

This only changes the behavior for the most basic case - integer primary
IVs with a constant step.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271410 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Translate basic DITypes to CV type records
Reid Kleckner [Wed, 1 Jun 2016 17:05:51 +0000 (17:05 +0000)]
[codeview] Translate basic DITypes to CV type records

Summary:
This is meant to be the tiniest step towards DIType to CV type index
translation that I could come up with. Whenever translation fails, we use type
index zero, which is the unknown type.

Reviewers: aaboud, zturner

Subscribers: llvm-commits, amccarth

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271408 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReduce dependence on pointee types when deducing dereferenceability
Sanjoy Das [Wed, 1 Jun 2016 16:47:45 +0000 (16:47 +0000)]
Reduce dependence on pointee types when deducing dereferenceability

Summary:
Change some of the internal interfaces in Loads.cpp to keep track of the
number of bytes we're trying to prove dereferenceable using an explicit
`Size` parameter.

Before this, the `Size` parameter was implicitly inferred from the
pointee type of the pointer whose dereferenceability we were trying to
prove, causing us to be conservative around bitcasts. This was
unfortunate since bitcast instructions are no-ops and should never
break optimizations.  With an explicit `Size` parameter, we're more
precise (as shown in the test cases), and the code is simpler.

We should eventually move towards a `DerefQuery` struct that groups
together a base pointer, an offset, a size and an alignment; but this
patch is a first step.

Reviewers: apilipenko, dblaikie, hfinkel, reames

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271406 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] when an invalid flag is given, warn, but don't crash
Kostya Serebryany [Wed, 1 Jun 2016 16:41:12 +0000 (16:41 +0000)]
[libFuzzer] when an invalid flag is given, warn, but don't crash

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271404 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IR] Disallow loading and storing unsized types
Sanjoy Das [Wed, 1 Jun 2016 16:13:10 +0000 (16:13 +0000)]
[IR] Disallow loading and storing unsized types

Summary:
It isn't clear what is the operational meaning of loading or storing an
unsized types, since it cannot be lowered into something meaningful.
Since there does not seem to be any practical need for it either, make
such loads and stores illegal IR.

Reviewers: majnemer, chandlerc

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271402 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for std::vector.
NAKAMURA Takumi [Wed, 1 Jun 2016 14:26:54 +0000 (14:26 +0000)]
MappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271397 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate usage(), make sure srcdir is really empty.
Joerg Sonnenberger [Wed, 1 Jun 2016 14:16:00 +0000 (14:16 +0000)]
Update usage(), make sure srcdir is really empty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271396 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added non-temporal store tests for all 512-bit vector types
Simon Pilgrim [Wed, 1 Jun 2016 13:58:00 +0000 (13:58 +0000)]
[X86][SSE] Added non-temporal store tests for all 512-bit vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271393 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added non-temporal store tests for all 256-bit vector types
Simon Pilgrim [Wed, 1 Jun 2016 13:20:25 +0000 (13:20 +0000)]
[X86][SSE] Added non-temporal store tests for all 256-bit vector types

Also added KNL AVX-512 checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added non-temporal store tests for all 128-bit integer vector types
Simon Pilgrim [Wed, 1 Jun 2016 13:05:00 +0000 (13:05 +0000)]
[X86][SSE] Added non-temporal store tests for all 128-bit integer vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdding back-end support to two bit scanning intrinsics
Michael Zuckerman [Wed, 1 Jun 2016 12:02:37 +0000 (12:02 +0000)]
Adding back-end support to two bit scanning intrinsics

Adding LLVM back-end support to two intrinsics dealing with bit scan: _bit_scan_forward and _bit_scan_reverse.
Their functionality is as described in Intel intrinsics guide:
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_forward&expand=371,370
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_reverse&expand=371,370

Commit on behalf of Omer Paparo Bivas

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271386 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Add additional matching for UBFX instructions
Oliver Stannard [Wed, 1 Jun 2016 12:01:01 +0000 (12:01 +0000)]
[ARM] Add additional matching for UBFX instructions

This adds an additional matcher to select UBFX(..) from SRL(AND(..)) in
ARMISelDAGToDAG to help with code size.

Patch by David Green.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271384 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix off-by-one error in max integer functions
Dylan McKay [Wed, 1 Jun 2016 11:15:25 +0000 (11:15 +0000)]
Fix off-by-one error in max integer functions

I recently added these functions, but implemented them poorly. This
fixes that.

Sorry for the spam.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271380 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Fix up the definition of the integer max function"
Dylan McKay [Wed, 1 Jun 2016 09:39:42 +0000 (09:39 +0000)]
Revert "Fix up the definition of the integer max function"

This reverts commit eadf45dafe4597589f0f07f665bb4d1faf7a63fe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271376 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix up the definition of the integer max function
Dylan McKay [Wed, 1 Jun 2016 09:21:42 +0000 (09:21 +0000)]
Fix up the definition of the integer max function

Technically they were returning MAXIMUM+1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271375 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] Allow passing of empty structs.
Chris Dewhurst [Wed, 1 Jun 2016 08:48:56 +0000 (08:48 +0000)]
[Sparc] Allow passing of empty structs.

Passing an empty struct as a function call argument is now supported.

unit tests for various scenarios added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271374 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd max/min functions to MathExtras.h
Dylan McKay [Wed, 1 Jun 2016 07:58:15 +0000 (07:58 +0000)]
Add max/min functions to MathExtras.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271371 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r271362 "[AVX512] Remove masked load intrinsics. Clang now emits generic maske...
Craig Topper [Wed, 1 Jun 2016 05:57:55 +0000 (05:57 +0000)]
Revert r271362 "[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead."

Looks like something isn't quite right still. Also forgot to move the test cases to an autoupgrade test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271363 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsic...
Craig Topper [Wed, 1 Jun 2016 05:35:16 +0000 (05:35 +0000)]
[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead.

The intrinsics will be autoupgraded to the same generic masked loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271362 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDwarfDebug: Simplify. NFC.
Peter Collingbourne [Wed, 1 Jun 2016 02:58:40 +0000 (02:58 +0000)]
DwarfDebug: Simplify. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271360 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC] Rename EmitFill to emitFill
Petr Hosek [Wed, 1 Jun 2016 01:59:58 +0000 (01:59 +0000)]
[MC] Rename EmitFill to emitFill

This is to match the overloaded variants as well as the new style.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271359 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIR: Allow multiple global metadata attachments with the same type.
Peter Collingbourne [Wed, 1 Jun 2016 01:17:57 +0000 (01:17 +0000)]
IR: Allow multiple global metadata attachments with the same type.

This will be necessary to allow the global merge pass to attach
multiple debug info metadata nodes to global variables once we reverse
the edge from DIGlobalVariable to GlobalVariable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271358 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReference gdb python type printer scripts from SmallString, SmallVector, ArrayRef...
David Blaikie [Wed, 1 Jun 2016 01:02:32 +0000 (01:02 +0000)]
Reference gdb python type printer scripts from SmallString, SmallVector, ArrayRef, and StringRef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271357 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Fix broken size check in isAlias
Matt Arsenault [Wed, 1 Jun 2016 01:00:36 +0000 (01:00 +0000)]
DAGCombiner: Fix broken size check in isAlias

This should have been converting the size to bytes, but wasn't really.
These should probably all be using getStoreSize instead.

I haven't been able to come up with a meaningful testcase for this.
I can trigger it using combinations of struct loads and stores,
but can't observe a difference in non-broken testcases.

isAlias is only really used during store merging, so I'm not sure how
to get into the vector splitting situation the comment describes
since store merging is only done before type legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271356 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDebugInfoPDBTests: Update libdeps for r271346.
NAKAMURA Takumi [Wed, 1 Jun 2016 00:30:15 +0000 (00:30 +0000)]
DebugInfoPDBTests: Update libdeps for r271346.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271355 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[obj2yaml] One more attempt at fixing msan
Chris Bieneman [Wed, 1 Jun 2016 00:10:19 +0000 (00:10 +0000)]
[obj2yaml] One more attempt at fixing msan

Bot URL:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11834/steps/check-llvm%20msan/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271353 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm-pdbdump-fuzzer: fix the build
Kostya Serebryany [Tue, 31 May 2016 23:39:31 +0000 (23:39 +0000)]
llvm-pdbdump-fuzzer: fix the build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271352 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Add conversion to/from RuntimeDyld::SymbolInfo for JITSymbol.
Lang Hames [Tue, 31 May 2016 23:14:26 +0000 (23:14 +0000)]
[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

8 years agoAdd support for metadata attachments for global variables.
Peter Collingbourne [Tue, 31 May 2016 23:01:54 +0000 (23:01 +0000)]
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

8 years ago[pdb] Add unit tests for PDB MappedBlockStream and zero copy
Zachary Turner [Tue, 31 May 2016 22:41:52 +0000 (22:41 +0000)]
[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

8 years agoCodeGen: Refactor renameDisconnectedComponents() as a pass
Matthias Braun [Tue, 31 May 2016 22:38:06 +0000 (22:38 +0000)]
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

8 years agoSpeculative build fix for codeview type dumper API change
Reid Kleckner [Tue, 31 May 2016 22:32:54 +0000 (22:32 +0000)]
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

8 years ago[X86]: Add a pattern that uses GR16_ABCD rather than GR32_ABCD to avoid falsely marki...
Kevin B. Smith [Tue, 31 May 2016 22:00:12 +0000 (22:00 +0000)]
[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

8 years agoARM: Improve/fix comment in recently added test.
Matthias Braun [Tue, 31 May 2016 21:59:59 +0000 (21:59 +0000)]
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

8 years agoARM: Do not attempt to modify register class of physregs.
Matthias Braun [Tue, 31 May 2016 21:39:12 +0000 (21:39 +0000)]
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

8 years ago[obj2yaml] Trying to make msan happy
Chris Bieneman [Tue, 31 May 2016 21:00:08 +0000 (21:00 +0000)]
[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

8 years ago[SLP] Pass in correct alignment when query memory access cost
Guozhi Wei [Tue, 31 May 2016 20:41:19 +0000 (20:41 +0000)]
[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

8 years agoChange llvm-objdump, llvm-nm and llvm-size when reporting an object file error
Kevin Enderby [Tue, 31 May 2016 20:35:34 +0000 (20:35 +0000)]
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

8 years ago[CMake] Update to requiring CMake 3.4.3
Chris Bieneman [Tue, 31 May 2016 20:21:32 +0000 (20:21 +0000)]
[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

8 years ago[CFLAA] Don't link GEP pointers to GEP indices.
George Burgess IV [Tue, 31 May 2016 19:55:05 +0000 (19:55 +0000)]
[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

8 years ago[CodeGen] Promote FMINNAN/FMAXNAN like other binops.
Ahmed Bougacha [Tue, 31 May 2016 18:50:25 +0000 (18:50 +0000)]
[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

8 years ago[CodeGen] Don't mark FMINNUM/FMAXNUM Expand twice. NFC.
Ahmed Bougacha [Tue, 31 May 2016 18:50:21 +0000 (18:50 +0000)]
[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

8 years ago[Docs] CodeGen has supported vector icmp/fcmp for a long time.
Ahmed Bougacha [Tue, 31 May 2016 18:50:05 +0000 (18:50 +0000)]
[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

8 years ago[codeview] Improve readability of type record assembly
Reid Kleckner [Tue, 31 May 2016 18:45:36 +0000 (18:45 +0000)]
[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

8 years agoDelete AArch64II::MO_CONSTPOOL.
Rafael Espindola [Tue, 31 May 2016 18:31:14 +0000 (18:31 +0000)]
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

8 years ago[codeview] Add a CVTypeDumper::dump(ArrayRef<uint8_t>) overload
Reid Kleckner [Tue, 31 May 2016 18:15:23 +0000 (18:15 +0000)]
[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

8 years ago[PM] BDCE: Fix caching of analyses.
Davide Italiano [Tue, 31 May 2016 17:53:22 +0000 (17:53 +0000)]
[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

8 years ago[mips] Remove tests which should have been deleted.
Simon Dardis [Tue, 31 May 2016 17:52:29 +0000 (17:52 +0000)]
[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

8 years ago[PM] ADCE: Fix caching of analyses.
Davide Italiano [Tue, 31 May 2016 17:39:39 +0000 (17:39 +0000)]
[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

8 years ago[mips] Enforce compact branch register restrictions
Simon Dardis [Tue, 31 May 2016 17:34:42 +0000 (17:34 +0000)]
[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

8 years ago[obj2yaml][yaml2obj] Support for reading and dumping the MachO export trie
Chris Bieneman [Tue, 31 May 2016 17:26:36 +0000 (17:26 +0000)]
[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

8 years agoFix a crash in MergeFunctions related to ordering of weak/strong functions
Erik Eckstein [Tue, 31 May 2016 17:20:23 +0000 (17:20 +0000)]
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

8 years ago[esan|cfrag] Create the skeleton of cfrag variable for the runtime
Qin Zhao [Tue, 31 May 2016 17:14:02 +0000 (17:14 +0000)]
[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

8 years agoAMDGPU: Remove unused address space
Matt Arsenault [Tue, 31 May 2016 16:57:45 +0000 (16:57 +0000)]
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

8 years agoAdd a use of shouldAssumeDSOLocal to ARM.
Rafael Espindola [Tue, 31 May 2016 15:31:55 +0000 (15:31 +0000)]
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

8 years ago[Hexagon] Disable expanding MUX instructions that define a subregister
Krzysztof Parzyszek [Tue, 31 May 2016 14:27:10 +0000 (14:27 +0000)]
[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

8 years agoDo not modify a std::vector while looping it.
Yaron Keren [Tue, 31 May 2016 13:45:05 +0000 (13:45 +0000)]
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