Commit Graph

232056 Commits

Author SHA1 Message Date
Craig Topper 12e322a8cf [X86] Remove the llvm.x86.sse2.storel.dq intrinsic. It hasn't been used in a long time.
llvm-svn: 270677
2016-05-25 06:56:32 +00:00
Gerolf Hoflehner 613e704190 [Support] Reapply cleanup r270643
llvm-svn: 270674
2016-05-25 06:23:45 +00:00
David Majnemer 124bdb7497 [FunctionAttrs] Volatile loads should disable readonly
A volatile load has side effects beyond what callers expect readonly to
signify.  For example, it is not safe to reorder two function calls
which each perform a volatile load to the same memory location.

llvm-svn: 270671
2016-05-25 05:53:04 +00:00
Gerolf Hoflehner 7c1841a55e [Support] revert previous commit r270643
llvm-svn: 270670
2016-05-25 05:51:05 +00:00
Zachary Turner d3076ab36f [llvm-pdbdump] Decipher the remaining PDB streams.
We know at least know the meaning of every stream of the
PDB file.  Yay!

llvm-svn: 270669
2016-05-25 05:49:48 +00:00
Saleem Abdulrasool 546e64affd Revert "llvm-objdump: support dumping AUX records for weak externals"
Revert it until we can figure out the endianness issue.

llvm-svn: 270667
2016-05-25 05:45:02 +00:00
Bob Wilson 34cc8eb307 Rename a variable to avoid shadowing function parameter. NFC.
llvm-svn: 270666
2016-05-25 05:42:00 +00:00
Bob Wilson f4f54e3178 arc-repeated-use-of-weak should not warn about IBOutlet properties
Revision r211132 was supposed to disable -Warc-repeated-use-of-weak for
Objective-C properties marked with the IBOutlet attribute. Those properties
are supposed to be weak but they are only accessed from the main thread
so there is no risk of asynchronous updates setting them to nil. That
combination makes -Warc-repeated-use-of-weak very noisy. The previous
change only handled one kind of access to weak IBOutlet properties.
Instead of trying to add checks for all the different kinds of property
accesses, this patch removes the previous special case check and adds a
check at the point where the diagnostic is reported. rdar://21366461

llvm-svn: 270665
2016-05-25 05:41:57 +00:00
Craig Topper f70a61ff3f [X86] Update test cases to make sure storeu builtins use the storeu instrinsics. We were previously matching on other stores in the IR from this being an -O0 test.
We should probably look into making the storeu builtins just emit a normal store with an alignment of 1.

llvm-svn: 270664
2016-05-25 05:26:23 +00:00
Saleem Abdulrasool 7f9a9ebdbc Object: ensure that structures are fully defined
Ensure that the unused fields are explicitly stated when defining the types.
Add some compile time assertions about the size requirements for the structure
types.

llvm-svn: 270663
2016-05-25 05:23:02 +00:00
Jason Molenda ec90b5d030 Include <mutex> in Process.h - Jim's change in r270593 added a std::mutex
ivar and this header is needed for it to compile on linux, judging by the
build bots.

llvm-svn: 270662
2016-05-25 05:14:16 +00:00
Zachary Turner c9972c64f5 [llvm-pdbdump] Dump the IPI stream and all records.
llvm-svn: 270661
2016-05-25 04:35:22 +00:00
Rui Ueyama c789b631f3 Really define --export-dynamic-symbol= as an alias to --export-dynamic-symbol.
Thanks to Sean for pointing it out.

llvm-svn: 270660
2016-05-25 04:29:55 +00:00
Rui Ueyama 02fcf11a9c Fix comment.
llvm-svn: 270659
2016-05-25 04:29:53 +00:00
Jason Molenda b667c20222 Add support for arm64 compact unwind tables, used on darwin arm64
systems (ios, tvos, watchos).  It's a simple format to use now that
I have i386/x86_64 supported already.

The unwind instructions are only valid at call sites -- that is,
when lldb is unwinding a frame in the middle of the stack.  It
cannot be used for the currently executing frame; it has no information
about prologues/epilogues/etc.

<rdar://problem/12062336> 

llvm-svn: 270658
2016-05-25 04:20:28 +00:00
Rui Ueyama e66f45c6eb Reduce code duplication.
llvm-svn: 270657
2016-05-25 04:10:14 +00:00
Rui Ueyama b12b158f20 pdbdump: fix bug in name hash table.
name_ids() did not return all IDs but only the first NameCount items.
The number of non-zero entries in IDs vector is NameCount, but it
does not mean that all non-zero entries are at the beginning of IDs
vector.

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

llvm-svn: 270656
2016-05-25 04:07:17 +00:00
Zachary Turner c59261ca37 [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).

llvm-svn: 270655
2016-05-25 03:53:16 +00:00
Saleem Abdulrasool 82dd8bae71 test: use a binary file instead
Generate the obj rather than use yaml2obj.  Hopefully, this fixes the PPC64 test
failures.

llvm-svn: 270654
2016-05-25 03:48:07 +00:00
Zachary Turner 85ed80b9e6 [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.

llvm-svn: 270653
2016-05-25 03:43:17 +00:00
Rui Ueyama 2487f19258 Add `static` to a file-scope function.
llvm-svn: 270652
2016-05-25 03:40:02 +00:00
Rui Ueyama dadda2fe08 Add a few options for compatibility with GNU.
llvm-svn: 270651
2016-05-25 03:38:16 +00:00
Derek Bruening 88639859db Add working set base runtime library
Summary:
Adds the base runtime library for the working set tool.
Adds slowpath code for updating the shadow memory.

To be added in the future:
+ Scan memory and report the total size.
+ Take samples for intermediate values.

Reviewers: aizatsky

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

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

llvm-svn: 270650
2016-05-25 02:04:04 +00:00
Saleem Abdulrasool dc8842eb7f Support: remove outdated comment
This information is in the latest version of the specification.

llvm-svn: 270649
2016-05-25 01:59:36 +00:00
Saleem Abdulrasool e7e467aaa9 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).

llvm-svn: 270648
2016-05-25 01:59:32 +00:00
Davide Italiano 655a145e83 [PM] Port BDCE to the new pass manager.
llvm-svn: 270647
2016-05-25 01:57:04 +00:00
Nirav Dave e003bb7ead 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

llvm-svn: 270646
2016-05-25 01:45:42 +00:00
Eugene Zelenko 2b8e41705e Fix some Include What You Use warnings in examples; other minor fixes.
Differential revision: http://reviews.llvm.org/D20607

llvm-svn: 270645
2016-05-25 01:18:36 +00:00
Matthias Braun 4c994ee42b 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.

llvm-svn: 270644
2016-05-25 01:18:00 +00:00
Gerolf Hoflehner 1ac739b2b5 [Support] Cleanup of an ancient Darwin work-around in Signals.inc (PR26174)
Patch by Jeremy Huddleston Sequoia

llvm-svn: 270643
2016-05-25 00:54:39 +00:00
Hans Wennborg debfed9ef0 clang-cl: Fix unused argument warning when combining /O2 and /Ob2
llvm-svn: 270642
2016-05-25 00:43:45 +00:00
Derek Bruening 293772e72e [esan|wset] Add working set tool driver flags
Summary:
Adds a new -fsanitize=efficiency-working-set flag to enable esan's working
set tool.  Adds appropriate tests for the new flag.

Reviewers: aizatsky

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

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

llvm-svn: 270641
2016-05-25 00:41:24 +00:00
Derek Bruening 5662b93985 [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

llvm-svn: 270640
2016-05-25 00:17:24 +00:00
Kostya Serebryany ff2e6badbd [libFuzzer] print stats if we crash on empty input
llvm-svn: 270639
2016-05-25 00:15:36 +00:00
Richard Smith b910e56604 Revert r270569 (teach llvm-mc to generate compressed debug sections in zlib
style). It appears that current ELF linkers are not ready for this.

llvm-svn: 270638
2016-05-25 00:14:12 +00:00
Zachary Turner 172d59c105 [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.

llvm-svn: 270637
2016-05-25 00:12:48 +00:00
Zachary Turner 9f054d424f [codeview] Add support for S_EXPORT symbol.
llvm-svn: 270636
2016-05-25 00:12:40 +00:00
Dan Gohman d530f68d45 [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
Peter Collingbourne a9f38983e8 docs: Document how safestack handles setjmp and exceptions.
llvm-svn: 270634
2016-05-24 23:38:02 +00:00
Hans Wennborg 9464491aa7 Rename test/CodeGen/inline-optim.cc to .c and provide a triple
llvm-svn: 270633
2016-05-24 23:37:56 +00:00
Mike Aizatsky af432a45e3 [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
Derek Bruening 515c15c207 [esan|cfrag] Add test struct-simple.cpp
Summary: Adds a new test struct-simple.cpp for testing the
cache-fragmentation tool with a multi-compilation-unit application.

Patch by Qin Zhao.

Reviewers: bruening

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

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

llvm-svn: 270631
2016-05-24 23:03:52 +00:00
Michael Zolotukhin 8f7a242c7b 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 7216dd4668 [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 4caa1bf0bd [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 0b872d9399 [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 ab885c56e2 [libfuzzer][doc] documenting running libfuzzer tests.
Differential Revision: http://reviews.llvm.org/D20594

llvm-svn: 270626
2016-05-24 22:25:46 +00:00
Eric Christopher d83af71b3a Make the altivec intrinsics that require immediate constant propagation
macros rather than functions.

Unfortunately couldn't come up with a simple testcase that didn't need
code generation to verify what was going on.

llvm-svn: 270625
2016-05-24 22:25:06 +00:00
Derek Bruening 7004e06b80 [esan] Add compilation unit init/exit routines.
Summary:
Adds processCompilationUnitInit and processCompilationUnitExit
for compilation unit init/exit.

Adds a tool-specific argument passed to esan_init.

Adds the dtor and esan_exit called from the dtor.

A test will be added separately (adding it here results in failure until
the corresponding compilation patch is in place).

Reviewers: aizatsky

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

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

llvm-svn: 270624
2016-05-24 22:22:20 +00:00
Haicheng Wu 90a55651e6 [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