Commit Graph

132493 Commits

Author SHA1 Message Date
Zachary Turner
3b27e60206 [llvm-pdbdump] Stream 0 isn't actually the MSF superblock.
Oddly enough, I realized we don't actually know what stream
0 is (if anything).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 03:53:16 +00:00
Saleem Abdulrasool
6e695e846d test: use a binary file instead
Generate the obj rather than use yaml2obj.  Hopefully, this fixes the PPC64 test
failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 03:48:07 +00:00
Zachary Turner
ec842a3379 [llvm-pdbdump] Dump stream summary list.
Try to figure out what each stream is, and dump its name.

This gives us a better picture of what streams we still don't
understand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270653 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 03:43:17 +00:00
Saleem Abdulrasool
0dfc65a906 Support: remove outdated comment
This information is in the latest version of the specification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270649 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:59:36 +00:00
Saleem Abdulrasool
d51855e21d llvm-objdump: support dumping AUX records for weak externals
This is a support COFF feature.  Ensure that we can display the weak externals
auxiliary symbol.  It contains useful information (such as the default binding
and how to resolve the symbol).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270648 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:59:32 +00:00
Davide Italiano
abf016e342 [PM] Port BDCE to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270647 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:57:04 +00:00
Nirav Dave
0e9b526d1b Soften assertion in AMDGPU emitPrologue.
[AMDGPU] emitPrologue looks for an unused unallocated SGPR that is not
the scratch descriptor. Continue search if unused register found fails
other requirements.

Reviewers: arsenm, tstellarAMD, nhaehnle

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:45:42 +00:00
Eugene Zelenko
578a1d21a0 Fix some Include What You Use warnings in examples; other minor fixes.
Differential revision: http://reviews.llvm.org/D20607


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:18:36 +00:00
Matthias Braun
20c7e33686 ScheduleDAGInstrs: Fix memory corruption
We have to modify V2SU before inserting new elements into the
CurrentVRegDefs set because that may move V2SU in memory invalidating
the reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 01:18:00 +00:00
Gerolf Hoflehner
b4811e71d7 [Support] Cleanup of an ancient Darwin work-around in Signals.inc (PR26174)
Patch by Jeremy Huddleston Sequoia


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270643 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:54:39 +00:00
Derek Bruening
68075060d6 [esan|wset] EfficiencySanitizer working set tool fastpath
Summary:
Adds fastpath instrumentation for esan's working set tool.  The
instrumentation for an intra-cache-line load or store consists of an
inlined write to shadow memory bits for the corresponding cache line.

Adds a basic test for this instrumentation.

Reviewers: aizatsky

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:17:24 +00:00
Kostya Serebryany
305ed5060f [libFuzzer] print stats if we crash on empty input
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:15:36 +00:00
Richard Smith
e89c000a82 Revert r270569 (teach llvm-mc to generate compressed debug sections in zlib
style). It appears that current ELF linkers are not ready for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270638 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:14:12 +00:00
Zachary Turner
8d473c65c9 [codeview] Add support for new types and symbols.
This patch adds support for:

S_EXPORT
LF_BITFIELD

With this patch, I have run through a couple of gigabytes of PDB
files and cannot find a type or symbol that we do not understand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:12:48 +00:00
Zachary Turner
a02a9cb46b [codeview] Add support for S_EXPORT symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 00:12:40 +00:00
Dan Gohman
04c5ee8513 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 23:47:41 +00:00
Mike Aizatsky
b0d0618635 [libfuzzer] Trying random unit prefixes during corpus load.
Differential Revision: http://reviews.llvm.org/D20301

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 23:14:29 +00:00
Michael Zolotukhin
4b1e009d8e Re-enable "[LoopUnroll] Enable advanced unrolling analysis by default" one more time.
This reverts commit r270577.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270630 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 23:00:05 +00:00
Michael Zolotukhin
50301028f2 [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst.
This fixes PR27847. Now for real.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:59:58 +00:00
Zachary Turner
2d4f33a508 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:58:46 +00:00
Derek Bruening
8d8d0146e5 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:48:24 +00:00
Mike Aizatsky
bfd4119f3c [libfuzzer][doc] documenting running libfuzzer tests.
Differential Revision: http://reviews.llvm.org/D20594

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270626 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:25:46 +00:00
Haicheng Wu
ba6580424f [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:16:14 +00:00
Eric Christopher
a313eee4cf There's no reason to use _ to name variables different just for construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270622 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 22:15:54 +00:00
Matthias Braun
6063d9d32c LiveIntervalAnalysis: Fix handleMove() re-using the wrong value number
This fixes http://llvm.org/PR27856

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 21:54:01 +00:00
David Blaikie
d455d52bca 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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270613 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 21:19:28 +00:00
Sanjoy Das
649349706a [GuardWidening] Tighten the interface of the RangeCheck struct; NFC
Make `GuardWideningImpl::RangeCheck` into a class and add accessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270611 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 20:54:45 +00:00
Zachary Turner
db7b818057 Remove unused global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 20:48:18 +00:00
Zachary Turner
45ab259f8d [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270607 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 20:31:48 +00:00
Chris Bieneman
0658e94613 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 20:19:05 +00:00
Peter Collingbourne
84e27c2068 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270604 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 20:13:46 +00:00
Teresa Johnson
d2a4b77f78 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270600 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 19:12:48 +00:00
Kostya Serebryany
7e463431d7 [libFuzzer] add a license header to afl/afl_driver.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270598 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 19:05:25 +00:00
Zachary Turner
653eb429f5 [codeview, pdb] Dump symbol records in publics stream
Differential Revision: http://reviews.llvm.org/D20580
Reviewed By: ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 18:55:14 +00:00
Xinliang David Li
0f324db0db [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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270596 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 18:47:38 +00:00
Teresa Johnson
82332cd02e [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 18:44:01 +00:00
Konstantin Zhuravlyov
d7b9b912dd [AMDGPU][NFC] Rename ReserveTrapVGPRs -> ReserveRegs
Differential Revision: http://reviews.llvm.org/D20081


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 18:37:18 +00:00
Zachary Turner
7f50c3125c Fix build errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270587 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 17:44:29 +00:00
Chad Rosier
f3100508ee [InstCombine] Clean up and FileCheckize test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 17:35:49 +00:00
Zachary Turner
fe03e32b28 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 17:30:25 +00:00
Teresa Johnson
3dce157450 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270584 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 17:24:25 +00:00
Sanjoy Das
c6ed2a486f [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 17:19:56 +00:00
Sanjay Patel
8de4c9c00b fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 16:51:26 +00:00
Hans Wennborg
79d5d94f04 Revert r270518, which re-enabled "[LoopUnroll] Enable advanced unrolling analysis by default.
Chromium builds are still hitting the assert in PR27874.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 16:10:12 +00:00
George Rimar
93b640c05d 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270569 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 15:19:35 +00:00
Sanjay Patel
e571983e6c [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270562 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 14:18:49 +00:00
Simon Pilgrim
c030892a9e [InstCombine][X86][SSE41] The SSE41 PMOVSX intrinsics are auto upgraded now and aren't handled by InstCombine any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 13:52:44 +00:00
George Rimar
02e0a7d58d [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 13:45:29 +00:00
Than McIntosh
ff0cf25236 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 13:23:44 +00:00
Simon Pilgrim
f36485f7ac [X86][SSE] Added vector sitofp/uitofp folded load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 13:07:23 +00:00