1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

132748 Commits

Author SHA1 Message Date
David Majnemer
0e96fed30f [CodeView] Remove superfluous bitmath
llvm-svn: 271495
2016-06-02 06:21:42 +00:00
David Majnemer
d1166dddc2 [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.

llvm-svn: 271494
2016-06-02 06:21:37 +00:00
Kostya Serebryany
c17de491ba [libFuzzer] fix docs
llvm-svn: 271493
2016-06-02 06:06:34 +00:00
Dan Liew
f8604e4ad4 [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

llvm-svn: 271492
2016-06-02 05:48:09 +00:00
Dan Liew
8b5c81728c [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

llvm-svn: 271491
2016-06-02 05:48:02 +00:00
Kostya Serebryany
5977d5803c [libFuzzer] docs: add contact, mention more trophies
llvm-svn: 271490
2016-06-02 05:45:42 +00:00
Zachary Turner
cc571053da [pdb] Parse and dump section map and section contribs
Differential Revision: http://reviews.llvm.org/D20876
Reviewed By: rnk, ruiu

llvm-svn: 271488
2016-06-02 05:07:49 +00:00
Craig Topper
57e5a20592 [AVX512] Add 512-bit load/stores to fast isel.
llvm-svn: 271486
2016-06-02 04:51:37 +00:00
Craig Topper
94770dc6ce [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.

llvm-svn: 271482
2016-06-02 04:19:48 +00:00
Craig Topper
f70345a66d [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.

llvm-svn: 271481
2016-06-02 04:19:45 +00:00
Craig Topper
aa1499b742 [X86] Use uint16_t for a couple arrays of instruction opcodes. NFC
llvm-svn: 271480
2016-06-02 04:19:42 +00:00
Craig Topper
38cb270826 [AVX512] Remove LOADA/LOADU/STOREA/STOREU intrinsic types now that they are unused.
llvm-svn: 271479
2016-06-02 04:19:40 +00:00
Craig Topper
1887664778 [AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead.
The intrinsics will be autoupgraded to the same generic masked loads.

llvm-svn: 271478
2016-06-02 04:19:36 +00:00
Eric Fiselier
6ed176169a 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

llvm-svn: 271468
2016-06-02 01:59:57 +00:00
Xinliang David Li
4dadac7c3c make icall pass name consistent /NFC
llvm-svn: 271467
2016-06-02 01:52:05 +00:00
Kostya Serebryany
e2d6b2454c [libFuzzer] use __sanitizer_print_memory_profile to print the memory profile on OOM
llvm-svn: 271465
2016-06-02 01:33:11 +00:00
Sanjoy Das
97c2cde156 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.

llvm-svn: 271456
2016-06-02 00:52:53 +00:00
Sanjoy Das
23a5b9d8fc 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.

llvm-svn: 271455
2016-06-02 00:52:48 +00:00
Tamas Berghammer
362295709f Try to fix docs build after rL271440
llvm-svn: 271452
2016-06-02 00:26:18 +00:00
Vitaly Buka
d26a4a542b [asan] Rename *UAR* into *UseAfterReturn*
Summary:
To improve readability.

PR27453

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

llvm-svn: 271447
2016-06-02 00:06:42 +00:00
Matt Arsenault
dffa97a6fa AMDGPU: Fix incorrectly setting kill flag when copying register tuples
This fixes some verifier errors when trackLivenessAfterRegAlloc is
enabled.

llvm-svn: 271446
2016-06-02 00:04:30 +00:00
Matt Arsenault
9e3aa7ab9c Make MachineCopyPropagation preserve CFG
This doesn't touch it as far as I can tell.

llvm-svn: 271445
2016-06-02 00:04:26 +00:00
Matt Arsenault
d7671dd7b8 AMDGPU: SIDebuggerInsertNops preserves CFG
This saves an additional run of the DominatorTree and
MachineLoopInfo

llvm-svn: 271444
2016-06-02 00:04:22 +00:00
Justin Bogner
fc9b621e7a 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.

llvm-svn: 271442
2016-06-01 23:29:26 +00:00
NAKAMURA Takumi
db0d754acf Rework r271439. I forgot to save the buffer for editing.
llvm-svn: 271441
2016-06-01 23:03:46 +00:00
Tamas Berghammer
195e842656 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

llvm-svn: 271440
2016-06-01 23:00:45 +00:00
NAKAMURA Takumi
00bd147d8f MappedBlockStreamTest.cpp: Simplify array initializers.
llvm-svn: 271439
2016-06-01 22:59:06 +00:00
Rafael Espindola
c82586e4b5 Avoid a load for local functions.
llvm-svn: 271437
2016-06-01 21:57:11 +00:00
Sanjay Patel
287ac2dfec [x86, AVX2] regenerate checks
llvm-svn: 271434
2016-06-01 21:32:56 +00:00
Geoff Berry
a619b50bd5 [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

llvm-svn: 271432
2016-06-01 21:30:40 +00:00
Justin Bogner
8c460b091d SDAG: Drop a redundant replace and move the dead node removal closer. NFC
llvm-svn: 271429
2016-06-01 20:55:26 +00:00
Michael Kuperstein
1e7dd66dfc [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

llvm-svn: 271428
2016-06-01 20:49:35 +00:00
Keno Fischer
2092f44163 [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

llvm-svn: 271425
2016-06-01 20:31:07 +00:00
Geoff Berry
02cf700a44 [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

llvm-svn: 271424
2016-06-01 20:03:09 +00:00
Daniel Berlin
dc788a2a11 Revert "Claim NoAlias if two GEPs index different fields of the same struct"
This reverts commit 2d5d6493f43eb68493a3852b8c226ac9fafdc7eb.

llvm-svn: 271422
2016-06-01 18:55:32 +00:00
George Burgess IV
135c07fd0f [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

llvm-svn: 271421
2016-06-01 18:39:54 +00:00
Zachary Turner
a2230c62dd [pdb] silence warnings about moving from a temporary.
llvm-svn: 271420
2016-06-01 18:18:55 +00:00
David Majnemer
0d36b051c9 [CodeView] Simplify StreamArray operator++
llvm-svn: 271419
2016-06-01 18:13:08 +00:00
David Majnemer
818581cd0c [CodeView] Make sure StreamRef::readBytes doesn't read too much
llvm-svn: 271418
2016-06-01 18:13:06 +00:00
David Majnemer
73419abbaa [PDB] Make ModStream::symbols report errors
llvm-svn: 271417
2016-06-01 18:13:04 +00:00
David Majnemer
c93b9f9ce9 [PDB] Silence sign comparison warnings in MappedBlockStreamTest
llvm-svn: 271416
2016-06-01 18:13:02 +00:00
Daniel Berlin
5aefd2250a 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

llvm-svn: 271415
2016-06-01 18:12:01 +00:00
Than McIntosh
a03aeb4a97 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

llvm-svn: 271412
2016-06-01 17:55:10 +00:00
Reid Kleckner
62f0351a33 Fix the NDEBUG build
llvm-svn: 271411
2016-06-01 17:31:24 +00:00
Michael Kuperstein
8b4597ae2b [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

llvm-svn: 271410
2016-06-01 17:16:46 +00:00
Reid Kleckner
cdda117215 [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

llvm-svn: 271408
2016-06-01 17:05:51 +00:00
Sanjoy Das
1a00547e1a 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

llvm-svn: 271406
2016-06-01 16:47:45 +00:00
Kostya Serebryany
d3abb64416 [libFuzzer] when an invalid flag is given, warn, but don't crash
llvm-svn: 271404
2016-06-01 16:41:12 +00:00
Sanjoy Das
ace2883be0 [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

llvm-svn: 271402
2016-06-01 16:13:10 +00:00
NAKAMURA Takumi
546766bc6f MappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for std::vector.
llvm-svn: 271397
2016-06-01 14:26:54 +00:00