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

132277 Commits

Author SHA1 Message Date
Dan Gohman
e46ddfaa34 [WebAssembly] Put __stack_pointer in the offset field of loads and stores.
Instead of this:

i32.const       $push10=, __stack_pointer
i32.load        $push11=, 0($pop10)

Emit this:

i32.const       $push10=, 0
i32.load        $push11=, __stack_pointer($pop10)

It's not currently clear which is better, though there's a chance the second
form may be better at overall compression. We can revisit this when we have
more data; for now it makes sense to make PEI consistent with isel.

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

llvm-svn: 270635
2016-05-24 23:47:41 +00:00
Mike Aizatsky
785d92e27f [libfuzzer] Trying random unit prefixes during corpus load.
Differential Revision: http://reviews.llvm.org/D20301

llvm-svn: 270632
2016-05-24 23:14:29 +00:00
Michael Zolotukhin
82048571c5 Re-enable "[LoopUnroll] Enable advanced unrolling analysis by default" one more time.
This reverts commit r270577.

llvm-svn: 270630
2016-05-24 23:00:05 +00:00
Michael Zolotukhin
7bf254c21f [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst.
This fixes PR27847. Now for real.

llvm-svn: 270629
2016-05-24 22:59:58 +00:00
Zachary Turner
4aa4d6e21a [codeview] Add support for new type records.
This adds support for parsing and dumping the following
symbol types:

S_LPROCREF
S_ENVBLOCK
S_COMPILE2
S_REGISTER
S_COFFGROUP
S_SECTION
S_THUNK32
S_TRAMPOLINE

As of this patch, the test PDB files no longer have any unknown
symbol types.

llvm-svn: 270628
2016-05-24 22:58:46 +00:00
Derek Bruening
f77c9c162c [esan] Add calls from the ctor/dtor to the runtime library
Summary:
Adds createEsanInitToolGV for creating a tool-specific variable passed
to the runtime library.

Adds dtor "esan.module_dtor" and inserts calls from the dtor to
"__esan_exit" in the runtime library.

Updates the EfficiencySanitizer test.

Patch by Qin Zhao.

Reviewers: aizatsky

Subscribers: bruening, kcc, vitalybuka, eugenis, llvm-commits

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

llvm-svn: 270627
2016-05-24 22:48:24 +00:00
Mike Aizatsky
5c882cb2b9 [libfuzzer][doc] documenting running libfuzzer tests.
Differential Revision: http://reviews.llvm.org/D20594

llvm-svn: 270626
2016-05-24 22:25:46 +00:00
Haicheng Wu
5a1aef2909 [MBP] Factor out the optimizations on branch conditions and unanalyzable branches. NFCI.
The benefits of this patch are

-- We call AnalyzeBranch() to optimize unanalyzable branches, but the result of
   AnalyzeBranch() is not used. Now the result is useful.

-- Before the layout of all the MBBs is set, the result of AnalyzeBranch() is
   not correct and needs to be fixed before using it to optimize the branch
   conditions. Now this optimization is called after the layout, the code used
   to fix the result of AnalyzeBranch() is not needed.

-- The branch condition of the last block is not optimized before. Now it is
   optimized.

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

llvm-svn: 270623
2016-05-24 22:16:14 +00:00
Eric Christopher
c4c729b71f There's no reason to use _ to name variables different just for construction.
llvm-svn: 270622
2016-05-24 22:15:54 +00:00
Matthias Braun
2c464b94e5 LiveIntervalAnalysis: Fix handleMove() re-using the wrong value number
This fixes http://llvm.org/PR27856

llvm-svn: 270619
2016-05-24 21:54:01 +00:00
David Blaikie
cc40d4c91f DWARF: Omit DW_AT_APPLE attributes (except ObjC ones) when not targeting LLDB
These attributes aren't used by other debuggers (& may be confused with
other DWARF extensions) so they just waste space (about 1.5% on .dwo
file size on a random large program I tested).

We could remove the ObjC property ones too, but I figured they were
probably more necessary when trying to understand ObjC (I could be wrong
though) & so any debugger interested in working with ObjC would use
them, perhaps? (also, there are some legacy tests in Clang that test for
them - making it one of those annoying cross-project commits and/or
cleanup to refactor those tests)

llvm-svn: 270613
2016-05-24 21:19:28 +00:00
Sanjoy Das
75054c6c8d [GuardWidening] Tighten the interface of the RangeCheck struct; NFC
Make `GuardWideningImpl::RangeCheck` into a class and add accessors.

llvm-svn: 270611
2016-05-24 20:54:45 +00:00
Zachary Turner
05becfe923 Remove unused global variable.
llvm-svn: 270610
2016-05-24 20:48:18 +00:00
Zachary Turner
4f6bada416 [llvm-pdbdump] Rework command line options.
When dumping huge PDB files, too many of the options were grouped
together so you would get neverending spew of output.  This patch
introduces more granular display options so you can only dump the
fields you actually care about.

llvm-svn: 270607
2016-05-24 20:31:48 +00:00
Chris Bieneman
837c08b0ff Add libxar to LLVM_SYSTEM_LIBS if available
This should fix PR27855. We have some terrible hacks in the CMake to add linking SYSTEM_LIBS to all tools. I think we need a better way to do this in the future.

llvm-svn: 270605
2016-05-24 20:19:05 +00:00
Peter Collingbourne
665c2772fd Add FIXMEs to all derived classes of std::error_category.
This helps make clear that we're moving away from std::error_code.

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

llvm-svn: 270604
2016-05-24 20:13:46 +00:00
Teresa Johnson
19d7a21c83 [ThinLTO] Handle empty exports list for module.
We might have an empty exports list for a module and shouldn't assert
when checking if a symbol is exported.

llvm-svn: 270600
2016-05-24 19:12:48 +00:00
Kostya Serebryany
51a780a910 [libFuzzer] add a license header to afl/afl_driver.cpp
llvm-svn: 270598
2016-05-24 19:05:25 +00:00
Zachary Turner
8f47ac2281 [codeview, pdb] Dump symbol records in publics stream
Differential Revision: http://reviews.llvm.org/D20580
Reviewed By: ruiu

llvm-svn: 270597
2016-05-24 18:55:14 +00:00
Xinliang David Li
6976ddd1e6 [profile] Fix runtime hook linkage bug for COFF
Patch by: Johan Engelen

the user hook has linkonceODR linkage and it needs to be
in comdatAny group.

llvm-svn: 270596
2016-05-24 18:47:38 +00:00
Teresa Johnson
751b460b85 [ThinLTO] Fix bot failures by avoiding threaded map modifications
Ensure multiple threads won't have to modify map, probable cause of
bot failures from r270584 such as:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13095

llvm-svn: 270595
2016-05-24 18:44:01 +00:00
Konstantin Zhuravlyov
480521dd43 [AMDGPU][NFC] Rename ReserveTrapVGPRs -> ReserveRegs
Differential Revision: http://reviews.llvm.org/D20081

llvm-svn: 270594
2016-05-24 18:37:18 +00:00
Zachary Turner
ad9a9a6f5e Fix build errors
llvm-svn: 270587
2016-05-24 17:44:29 +00:00
Chad Rosier
24b2269c8b [InstCombine] Clean up and FileCheckize test case.
llvm-svn: 270586
2016-05-24 17:35:49 +00:00
Zachary Turner
8a810b70e5 Dump symbol record details in llvm-pdbdump
This makes use of the newly introduced `CVSymbolVisitor` to dump details
of each type of symbol record in the symbol streams.  Future patches will
bring this visitor based dumping to the publics stream, as well as
creating a `SymbolDumpDelegate` to print more information about
relocations etc.

Differential Revision: http://reviews.llvm.org/D20545
Reviewed By: ruiu

llvm-svn: 270585
2016-05-24 17:30:25 +00:00
Teresa Johnson
5cc2580600 [ThinLTO] Change ODR resolution and internalization to be index-based
Summary:
This patch changes the ODR resolution and internalization to be based on
updates to the Index, which are consumed by the backend portion of the
transformations.

It will be followed by an NFC change to move these out of libLTO's
ThinLTOCodeGenerator so that it can be used by other linkers
(gold and lld) and by ThinLTO distributed backends.

The global summary-based portions use callbacks so that the client can
determine the prevailing copy and other information in a client-specific
way. Eventually, with the API being developed in D20268, these may be
modified to use information such as symbol resolutions, supplied by the
clients to the API.

Reviewers: joker-eph

Subscribers: joker.eph, pcc, llvm-commits

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

llvm-svn: 270584
2016-05-24 17:24:25 +00:00
Sanjoy Das
341c647013 [IRCE] Return a Value*, not SCEV* from parseRangeCheck; NFC
This is better layering, since the caller needs to check if the index
was an add-rec anyway.

llvm-svn: 270582
2016-05-24 17:19:56 +00:00
Sanjay Patel
70a0c5d649 fix typos; NFC
llvm-svn: 270579
2016-05-24 16:51:26 +00:00
Hans Wennborg
1bb7a310ec Revert r270518, which re-enabled "[LoopUnroll] Enable advanced unrolling analysis by default.
Chromium builds are still hitting the assert in PR27874.

llvm-svn: 270577
2016-05-24 16:10:12 +00:00
George Rimar
d5d6468ed7 Recommit r270070 ([llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.)
Now, after landing r270560, r270557, r270320 it is a proper time.

Original commit message:
[llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.

Before this patch llvm-mc generated zlib-gnu styled sections. 
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.

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

llvm-svn: 270569
2016-05-24 15:19:35 +00:00
Sanjay Patel
d1d88e8e3a [ValueTracking, InstSimplify] extend isKnownNonZero() to handle vector constants
Similar in spirit to D20497 :
If all elements of a constant vector are known non-zero, then we can say that the
whole vector is known non-zero.

It seems like we could extend this to FP scalar/vector too, but isKnownNonZero()
says it only works for integers and pointers for now.

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

llvm-svn: 270562
2016-05-24 14:18:49 +00:00
Simon Pilgrim
98f098a7dc [InstCombine][X86][SSE41] The SSE41 PMOVSX intrinsics are auto upgraded now and aren't handled by InstCombine any more
llvm-svn: 270561
2016-05-24 13:52:44 +00:00
George Rimar
fe7a808865 [MC/ELF] - Fixed insufficient compression.s test
Main problem that .debug_info
section was used to check that llvm-dwarfdump is able to decompress
data that was compressed with llvm-mc tool. This section was not compressed
actually, because consumes more space in compressed view.

I changed testcase to use .debug_str section which is one that
is really compressed. So currently test do what is probably was expected to do:
checks that "data"->llvm-mc->llvm-dwarfdump->dumps back initial "data".

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

llvm-svn: 270560
2016-05-24 13:45:29 +00:00
Than McIntosh
bb4b34bbb7 Rework/enhance stack coloring data flow analysis.
Replace bidirectional flow analysis to compute liveness with forward
analysis pass. Treat lifetimes as starting when there is a first
reference to the stack slot, as opposed to starting at the point of the
lifetime.start intrinsic, so as to increase the number of stack
variables we can overlap.

Reviewers: gbiv, qcolumbet, wmi
Differential Revision: http://reviews.llvm.org/D18827

Bug: 25776
llvm-svn: 270559
2016-05-24 13:23:44 +00:00
Simon Pilgrim
8e50b9376f [X86][SSE] Added vector sitofp/uitofp folded load tests
llvm-svn: 270558
2016-05-24 13:07:23 +00:00
George Rimar
368dbdd031 Recommit r270547 ([llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.)
Fix was:
1) Had to regenerate dwarfdump-test-zlib.elf-x86-64, dwarfdump-test-zlib-gnu.elf-x86-64
(because llvm-symbolizer-zlib.test uses that inputs for its purposes and failed).
2) Updated llvm-symbolizer-zlib.test (updated used call function address to match new files + 
added one more check for newly created dwarfdump-test-zlib-gnu.elf-x86-64 binary input).
3) Updated comment in dwarfdump-test-zlib.cc.

Original commit message:
[llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.

Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style. 
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.

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

llvm-svn: 270557
2016-05-24 12:48:46 +00:00
Sam Kolton
5c1a0d6afe [AMDGPU] Assembler: rework parsing of optional operands.
Summary:
Change process of parsing of optional operands. All optional operands use same parsing method - parseOptionalOperand().
No default values are added to OperandsVector.
Get rid of WORKAROUND_USE_DUMMY_OPERANDS_INSTEAD_MUTIPLE_DEFAULT_OPERANDS.

Reviewers: tstellarAMD, vpykhtin, artem.tamazov, nhaustov

Subscribers: arsenm, kzhuravl

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

llvm-svn: 270556
2016-05-24 12:38:33 +00:00
Artem Tamazov
068739d10c [AMDGPU][llvm-mc] Disassembler: support for TTMP/TBA/TMA registers.
Differential Revision: http://reviews.llvm.org/D20476

llvm-svn: 270552
2016-05-24 12:05:16 +00:00
Igor Breger
29f643cd8e [llvm][AVX512][intrinsics] Fix vperm{b|w|d|q|ps|pd} intrinsics. Index is second argument to buildin function but it is first instruction operand.
Differential Revision: http://reviews.llvm.org/D20515

llvm-svn: 270548
2016-05-24 11:06:22 +00:00
George Rimar
4ec7157416 Revert r270543 ("Recommit r270540")
Failed build bot in another test.
I am sorry for noise.
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/23679/testReport/junit/LLVM/DebugInfo/llvm_symbolizer_zlib_test/

llvm-svn: 270547
2016-05-24 11:03:10 +00:00
George Rimar
cb4104aa11 Recommit r270540
fix: forgot to commit the updated dwarfdump-test-zlib.elf-x86-64

Original commit message:
[llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.

Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style. 
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.

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

llvm-svn: 270543
2016-05-24 10:46:43 +00:00
Sagar Thakur
5eb36c5e30 [MIPS][LLVM-MC] Fix Disassemble of Negative Offset
Patch by Nitesh Jain.

Summary: The type of Imm in MipsDisassembler.cpp was incorrect since SignExtend64 return int64_t type.As per the MIPSr6 doc ,the offset is added to the address of the instruction following the branch (not the branch itself), to form a PC-relative effective target address hence “4” is added to the offset. The offset of some test case are update to reflect the changes due to “ + 4 ” offset and new test case for negative offset are added.

Reviewers: dsanders, vkalintiris
Differential Revision: http://reviews.llvm.org/D17540

llvm-svn: 270542
2016-05-24 09:57:10 +00:00
George Rimar
eaa1b15204 Revert r270540 "[llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style."
it broked bot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/5036

llvm-svn: 270541
2016-05-24 09:44:44 +00:00
George Rimar
4be95a7436 [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.
Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style. 
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.

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

llvm-svn: 270540
2016-05-24 09:28:36 +00:00
Simon Pilgrim
de7240c8f6 [CostModel][X86][XOP] Added XOP costmodel for BITREVERSE
Now that we have a nice fast VPPERM solution. Added framework for future intrinsic costs as well.

llvm-svn: 270537
2016-05-24 08:17:50 +00:00
Zachary Turner
10ec45b080 Remove unused variable breaking -Werror builds.
llvm-svn: 270529
2016-05-24 03:32:34 +00:00
Michael Zolotukhin
5d004fcebe Revert "Revert r270478 "[LoopUnroll] Enable advanced unrolling analysis by default.""
This reverts commit r270512 and reapplies r270478. Originally it caused
PR27847, but it was fixed in r270517.

llvm-svn: 270518
2016-05-24 01:22:20 +00:00
Michael Zolotukhin
32f621fe89 [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst.
This fixes PR27847.

llvm-svn: 270517
2016-05-24 00:51:01 +00:00
Zachary Turner
5844629626 Remove unused variable.
llvm-svn: 270516
2016-05-24 00:06:04 +00:00
Evgeniy Stepanov
96274274e7 [msan] Add a test for vector compare x86 intrinsics.
This was actually meant to go in with r267966, but I forgot to
git add the file. Better late than never.

llvm-svn: 270515
2016-05-24 00:04:23 +00:00