Commit Graph

230494 Commits

Author SHA1 Message Date
Xinliang David Li d55827f7b2 [PM] code refactoring -- preparation for new PM porting /NFC
llvm-svn: 268851
2016-05-07 05:39:12 +00:00
Eric Fiselier 2266a8d473 Fix memory_resource build for _LIBCPP_HAS_NO_THREADS
llvm-svn: 268850
2016-05-07 05:37:31 +00:00
Mehdi Amini bbedb1495c Fix stripDebugInfo: was modifying "DebugLoc" attached to the intrinsic after deleting it.
Fix MSAN build.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268849
2016-05-07 05:07:47 +00:00
NAKAMURA Takumi 77edc2ef9f MipsELFObjectWriter.cpp: Activate debug printer just for +Asserts. [-Wunused-function]
llvm-svn: 268848
2016-05-07 04:51:51 +00:00
Mehdi Amini 581f0e1451 Refactor stripDebugInfo(Function) to handle intrinsic
This moves the code that handles stripping debug info intrinsic from
 StripDebugInfo(Module) to StripDebugInfo(Function). The latter is
already walking every instructions so it makes sense to do it at the
same time.
This makes also stripDebugInfo(Function) as an API more useful: it
is really dropping every debug info in the Function.
Finally the existing code is trigerring an assertion when the Module
is not fully materialized.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268847
2016-05-07 04:10:52 +00:00
Lang Hames 2a1ee0fc23 [Orc] Fix missing rename from r268845.
llvm-svn: 268846
2016-05-07 03:48:56 +00:00
Lang Hames 4821c24d08 [Orc] Rename OrcArchitectureSupport to OrcABISupport and add Win32 ABI support.
This enables lazy JITing on Windows x86-64.

Patch by David. Thanks David!

llvm-svn: 268845
2016-05-07 03:36:38 +00:00
Eric Fiselier 8dbe074baf Update TS implementation status page
llvm-svn: 268844
2016-05-07 03:24:31 +00:00
NAKAMURA Takumi 31b5db5132 Update \param corresponding to r268819. [-Wdocumentation]
llvm-svn: 268843
2016-05-07 03:12:30 +00:00
Eric Fiselier 4524d6e739 Change allocator<T>::allocate to throw length_error, not bad_alloc
llvm-svn: 268842
2016-05-07 03:12:24 +00:00
Eric Fiselier 522a7f9535 Add experimental container alias templates for PMRs
llvm-svn: 268841
2016-05-07 03:09:55 +00:00
Xinliang David Li 4b30c79723 [profile] Simplify value profile writing
With this patch, value data are longer pre-collected
before writing. The code is simplified and requires
less heap space for dumping.

llvm-svn: 268840
2016-05-07 02:50:11 +00:00
Eric Fiselier 946c9b4920 Fix one more usage of _LIBCPP_HAS_NO_EXCEPTIONS
llvm-svn: 268839
2016-05-07 02:33:25 +00:00
Eric Fiselier 27acf7585d Fix typo it _LIBCPP_NO_EXCEPTIONS macro
llvm-svn: 268838
2016-05-07 02:30:21 +00:00
Vitaly Buka 49bbbd8e7a Revert r268832 "Refactor stripDebugInfo(Function) to handle intrinsic"
It breaks many bots

llvm-svn: 268837
2016-05-07 02:10:59 +00:00
Sanjoy Das 987aaa1374 [ValueTracking] Hoist some computation out of a loop; NFC
There is no need to match the comparison instruction repeatedly.

llvm-svn: 268836
2016-05-07 02:08:24 +00:00
Sanjoy Das 5056e19fce Clean up comment; NFC
llvm-svn: 268835
2016-05-07 02:08:22 +00:00
Sanjoy Das 6082c1a39c Delete trailing whitespace; NFC
llvm-svn: 268834
2016-05-07 02:08:15 +00:00
Vitaly Buka e81d96be6f Revert r268810 becase it brakes msan bot.
16802==WARNING: MemorySanitizer: use-of-uninitialized-value
    lib/Target/ARM/ARMFrameLowering.cpp:1632

llvm-svn: 268833
2016-05-07 01:54:00 +00:00
Mehdi Amini 6eef08138e Refactor stripDebugInfo(Function) to handle intrinsic
This moves the code that handles stripping debug info intrinsic from
 StripDebugInfo(Module) to StripDebugInfo(Function). The latter is
already walking every instructions so it makes sense to do it at the
same time.
This makes also stripDebugInfo(Function) as an API more useful: it
is really dropping every debug info in the Function.
Finally the existing code is trigerring an assertion when the Module
is not fully materialized.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268832
2016-05-07 01:42:36 +00:00
Ahmed Bougacha 04a8fc2e37 [X86] Teach X86FixupBWInsts to promote MOV8rr/MOV16rr to MOV32rr.
This re-applies r268760, reverted in r268794.
Fixes http://llvm.org/PR27670

The original imp-defs assertion was way overzealous: forward all
implicit operands, except imp-defs of the new super-reg def (r268787
for GR64, but also possible for GR16->GR32), or imp-uses of the new
super-reg use.
While there, mark the source use as Undef, and add an imp-use of the
old source reg: that should cover any case of dead super-regs.

At the stage the pass runs, flags are unlikely to matter anyway;
still, let's be as correct as possible.

Also add MIR tests for the various interesting cases.

Original commit message:
Codesize is less (16) or equal (8), and we avoid partial
dependencies.

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

llvm-svn: 268831
2016-05-07 01:11:17 +00:00
Ahmed Bougacha 068ac4af39 [X86] Register and initialize the FixupBW pass.
That lets us use it in MIR tests.

llvm-svn: 268830
2016-05-07 01:11:10 +00:00
Eric Fiselier 15551efd43 Add <experimental/memory_resource>
Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 268829
2016-05-07 01:04:55 +00:00
Jim Ingham 7fa7dc36fe Take the API lock in SBThread::IsValid & SBFrame::IsValid.
The IsValid calls can try to reconstruct the thread & frame, which can 
take various internal locks.  This can cause A/B locking issues with
the Target lock, so these calls need to that the Target lock.

llvm-svn: 268828
2016-05-07 00:54:56 +00:00
Jim Ingham 8bbfdcd181 Remove some lldbassert's from the packet checking code.
Greg says he doesn't need these asserts anymore and since they cause occasional test suite
crashes, out they go.

llvm-svn: 268827
2016-05-07 00:52:18 +00:00
Paul Osmialowski 52bef53f86 Fine tuning of TC* macros
This patch introduces following:
* TCI_* and TCD_* macros for incrementation and decrementation
* Fix for invalid use of TCR_8 in one expression

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

llvm-svn: 268826
2016-05-07 00:00:00 +00:00
Bruno Cardoso Lopes 0df3e04460 [CrashReproducer] Always use realpath for destination
When running reproducer scripts we need that original symlinks from the
source filesystem are reproduced in the VFS so that different virtual
paths can map to the same file, allowing the FileManager to share the
same UID between these virtual entries. This avoids all sorts of module
redefinition errors when using frameworks.

llvm-svn: 268825
2016-05-06 23:58:58 +00:00
Kostya Serebryany ceca476b23 [libFuzzer] modify the docs for startup/init
llvm-svn: 268824
2016-05-06 23:51:28 +00:00
Jim Ingham 9b8eb155d8 Fix the way the ShouldStopHere checker handles the general case of "stepping through line 0 code".
That's good 'cause it means all the different kinds of source line stepping won't leave user in the middle of
compiler implementation code or code inlined from odd places, etc.  But it turns out that the compiler
also marks functions it MIGHT inline as all being of line 0.  That would mean we single step through this code
instead of just stepping out.  That is both inefficient, and more error prone 'cause these little nuggets tend
to be bits of hand-written assembly and the like and are hard to step through.

This change just checks and if the entire function is marked with line 0, we step out rather than step through.

<rdar://problem/25966460>

llvm-svn: 268823
2016-05-06 23:44:10 +00:00
Kostya Serebryany 1ed1aeaa94 [libFuzzer] tweak the documentation about rss_limit
llvm-svn: 268822
2016-05-06 23:41:11 +00:00
Kostya Serebryany 8b8f7a3cda [libFuzzer] enhance -rss_limit_mb and enable by default. Now it will print the OOM reproducer.
llvm-svn: 268821
2016-05-06 23:38:07 +00:00
Bruno Cardoso Lopes b2e2e21b20 [VFS] Add dump methods to the VFS overlay tree
Useful when debugging issues within the VFS overlay.

llvm-svn: 268820
2016-05-06 23:21:57 +00:00
Bruno Cardoso Lopes f08417904d [CrashReproducer] Change module map callback signature. NFC
Use a StringRef instead of a FileEntry in the moduleMapAddHeader
callback to allow more flexibility on what to collect on further
patches. This changes the interface I introduced in r264971.

llvm-svn: 268819
2016-05-06 23:21:50 +00:00
Rong Xu 35723644c2 [PGO] Use rsplit to parse value-data line in text profile file.
The value-data line is <PGOFuncName>:<Count_Value>. PGOFuncName might contain
':' for the internal linkage functions. We therefore need to use rsplit,
rather split, to extract the data from the line. This fixes the error when
merging a text profile file to an indexed profile file.

llvm-svn: 268818
2016-05-06 23:20:58 +00:00
Richard Smith 1037909924 [modules] Attempt to improve performance for declaration merging without a Sema
object in C. Rather than using the DeclContext (which is very slow because it
triggers us to build a lookup table for the DeclContext), use a separate map
from identifiers to decls for this case, containing only the ones we've
actually deserialized. For convenience, this map is implemented as an
IdentifierResolver.

llvm-svn: 268817
2016-05-06 23:14:07 +00:00
Adrian Prantl 85338cbdb6 Implement a safer bitcode upgrade for DISubprogram.
The bitcode upgrade I added for DISubprogram in r266446 was based on the
assumption that the CU node for the subprogram was already materialized by the
time the DISubprogram is visited. This assumption may not hold true as future
versions of LLVM may decide to write out bitcode in a different order. This
patch corrects this by introducing a versioning bit next to the distinct flag to
unambiguously differentiate the new from the old record layouts.

Note for people stabilizing LLVM out-of-tree: This patch introduces a bitcode
incompatibility with llvm trunk revisions from r266446 — this commit. (But
D19987 will ensure that it degrades gracefully).

http://reviews.llvm.org/D20004
rdar://problem/26074194

llvm-svn: 268816
2016-05-06 22:53:06 +00:00
Matthias Braun 22152acf7b DetectDeadLanes: Increase precision when detecting undef inputs
In case of COPY-like instruction we may be able to deduce that a certain
input is unused, based on the used lanes of the register defined by the
instruction.
This even works accross otherwise incompatible copies (no need to have
compatible lanemasks, completely unused operands are still completely
unused). It even makes sense to redo the analysis in this case since we
gained information for a case we previously stopped at because of the
incompatible masks.

llvm-svn: 268815
2016-05-06 22:43:50 +00:00
Matthias Braun 8f429ead58 DetectDeadLanes: Cleanup, assert on some impossible cases.
llvm-svn: 268814
2016-05-06 22:43:46 +00:00
Zachary Turner 5d105a977e Drop error when trying to fallback from PDB to DWARF.
llvm-svn: 268813
2016-05-06 22:29:34 +00:00
Justin Bogner 658c0a21f1 cmake: Avoid continue, apparently that's new
llvm-svn: 268812
2016-05-06 22:22:25 +00:00
Simon Pilgrim 45964c3742 [SLPVectorizer][X86] Regenerated SEXT/ZEXT cast vectorization tests
Added 256-bit vector test as well

llvm-svn: 268811
2016-05-06 22:22:18 +00:00
Weiming Zhao 74f12d31c1 [ARM] Fix Scavenger assert due to underestimated stack size
(this is resubmit of r268529 with minor refactoring. r268529 was reverted
 at r268536 due a memory sanitizer failure.  I have not been able to
 reproduce that failure and I checked all the variable used in my change
 but I could not spot an issue. I did some refactoring and see if it will
 give a clearer hint)

Summary:
Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.

Reviewers: rengolin

Subscribers: vitalybuka, aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits

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

llvm-svn: 268810
2016-05-06 22:20:13 +00:00
Philip Reames 6f4d0088c6 Reapply 267210 with fix for PR27490
Original Commit Message
Extend load/store type canonicalization to handle unordered operations

Extend the type canonicalization logic to work for unordered atomic loads and stores.  Note that while this change itself is fairly simple and low risk, there's a reasonable chance this will expose problems in the backends by suddenly generating IR they wouldn't have seen before.  Anything of this nature will be an existing bug in the backend (you could write an atomic float load), but this will definitely change the frequency with which such cases are encountered.  If you see problems, feel free to revert this change, but please make sure you collect a test case. 

Note that the concern about lowering is now much less likely.  PR27490 proved that we already *were* mucking with the types of ordered atomics and volatiles.  As a result, this change doesn't introduce as much new behavior as originally thought.

llvm-svn: 268809
2016-05-06 22:17:01 +00:00
Zachary Turner 5a1b5ef9eb Make llvm-pdbdump print CV type records
This reuses the CVTypeDumper from libcodeview to dump full
information about type records within a PDB file.

Differential Revision: http://reviews.llvm.org/D20022
Reviewed By: rnk

llvm-svn: 268808
2016-05-06 22:15:42 +00:00
Kostya Serebryany 52b394e981 [libFuzzer] add exeprimental -rss_limit_mb flag to fight against OOMs
llvm-svn: 268807
2016-05-06 21:58:35 +00:00
Justin Bogner e88946223c CMake: generate check targets for lit suites without their own lit.cfgs
Currently our cmake generates targets like check-llvm-unit and
check-llvm-transforms-loopunroll-x86, but not check-llvm-transforms or
check-llvm-transforms-adce. This is because the search for test suites
only lists the ones with a custom lit.cfg or lit.local.cfg.

Instead, we can do something a little smarter - any directory under
test that isn't called Inputs or inside a directory called Inputs is a
test suite.

llvm-svn: 268806
2016-05-06 21:57:30 +00:00
Matthias Braun 71474e8d22 LiveIntervalAnalysis: Fix handleMove() extending liverange for undef inputs
Fix handleMove() incorrectly extending liveranges when an undef input of
a vreg was moved past the (current) end of the liverange.

llvm-svn: 268805
2016-05-06 21:47:41 +00:00
Philip Reames 4a3c3b66d7 [GVN] PRE of unordered loads
Again, fairly simple.  Only change is ensuring that we actually copy the property of the load correctly.  The aliasing legality constraints were already handled by the FRE patches.  There's nothing special about unorder atomics from the perspective of the PRE algorithm itself.

llvm-svn: 268804
2016-05-06 21:43:51 +00:00
Simon Pilgrim 2def0a878a [SLPVectorizer][X86] Added BSWAP/BITREVERSE vectorization tests
llvm-svn: 268803
2016-05-06 21:41:55 +00:00
Zachary Turner 50c58c0d01 Fix LLDB after removal of PDB_ErrorCode
llvm-svn: 268802
2016-05-06 21:35:47 +00:00