Commit Graph

214486 Commits

Author SHA1 Message Date
Eugene Zelenko ca64d675f1 Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Process/Utility headers; other minor fixes.
llvm-svn: 251676
2015-10-30 00:55:29 +00:00
Alexey Samsonov 46c1ce6ff5 Let the users of LLVMSymbolizer decide whether they want to symbolize inlined frames.
Introduce LLVMSymbolizer::symbolizeInlinedCode() instead of switching
on PrintInlining option passed to the constructor. This will be needed
once we retrun structured data (instead of std::string) from
LLVMSymbolizer and move printing logic out.

llvm-svn: 251675
2015-10-30 00:40:20 +00:00
NAKAMURA Takumi e31e67719c llvm/ExecutionEngine/Orc/LogicalDylib.h: Satisfy Modules.
llvm-svn: 251674
2015-10-30 00:38:01 +00:00
Eugene Zelenko ecf34922f0 Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Symbol; other minor fixes.
llvm-svn: 251673
2015-10-30 00:04:20 +00:00
Alexey Samsonov e46bd74147 [LLVMSymbolize] Simplify SymbolizableObjectFile::symbolizeInlinedCode(). NFC.
llvm-svn: 251672
2015-10-30 00:02:55 +00:00
Filipe Cabecinhas 14323e02e6 Revert "Don't assert if materializing before seeing any function bodies"
This reverts r251667 since it broke the bots.

llvm-svn: 251671
2015-10-30 00:00:58 +00:00
Enrico Granata e5839f3eae Remove two #if0ed regions of code that we were using for an experiment but don't really want
llvm-svn: 251670
2015-10-29 23:53:34 +00:00
Alexey Samsonov 76f7ecb83a [LLVMSymbolize] Move printing the description of a global into a separate function. NFC.
llvm-svn: 251669
2015-10-29 23:49:19 +00:00
Enrico Granata 7a33621fa5 Add a --offset option to memory read that allows one to specify, given a type, how many sizeof(type) bytes to speak before starting to read memory
llvm-svn: 251668
2015-10-29 23:40:24 +00:00
Filipe Cabecinhas bcfd1f0c56 Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no
FUNCTION_BLOCK_ID record) is attached.

Bug found with afl-fuzz

llvm-svn: 251667
2015-10-29 23:37:28 +00:00
John McCall f5ea072e01 Fix the emission of ARC ivar layouts in the non-fragile Mac runtime.
My previous change in this area accidentally broke the rule when
InstanceBegin was not a multiple of the word size.

llvm-svn: 251666
2015-10-29 23:36:14 +00:00
Richard Smith 25cb32091c Revert r249929 ("Split <string.h> out of <cstring>").
This change caused problems when building code like povray that:
a) uses 'using namespace std;'
b) is built on an environment where the C library provides the "wrong"
   (non-const-correct) interface for the str* functions
c) makes an unqualified call to one of those str* functions

A patch is out for review to add a facility to fix this (and to give the
correct signatures for these functions whenever possible, even when the C
library does not do so). This revert is expected to be temporary.

llvm-svn: 251665
2015-10-29 23:32:29 +00:00
Weiming Zhao df8b0d6fc1 Revert "[ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll"
Summary:
This reverts commit 79c37e1a4ff1e634da8f95322f080601b4c815fc.
    
    This test passes locally but fails on the community buildbot. So we will let it
    XFAIL for now.

Patched by Mandeep Singh Grang (mgrang@codeaurora.org)

Reviewers: kparzysz, weimingz

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 251664
2015-10-29 22:34:59 +00:00
Enrico Granata 61024e6c0e Do not accept nullptr descriptions as valid summaries to be printed
llvm-svn: 251663
2015-10-29 22:29:06 +00:00
Alexey Samsonov 8df3a07aa8 [LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).
Summary:
This is mostly NFC. It is a first step in cleaning up LLVMSymbolize
library. It removes "ModuleInfo" class which bundles together ObjectFile
and its debug info context in favor of:
  * abstract SymbolizableModule in public headers;
  * SymbolizableObjectFile subclass in implementation.

Additionally, SymbolizableObjectFile is now created via factory, so we
can properly detect object parsing error at this stage instead of keeping
the broken half-parsed object. As a next step, we would be able to
propagate the error all the way back to the library user.

Further improvements might include:
  * factoring out the logic of finding appropriate file with debug info
    for a given object file, and caching all parsed object files into a
    separate class [A].
  * factoring out DILineInfo rendering [B].
This would make what is now a heavyweight "LLVMSymbolizer" a relatively
straightforward class, that calls into [A] to turn filepath into a
SymbolizableModule, delegates actual symbolization to concrete SymbolizableModule
implementation, and lets [C] render the result.

Reviewers: dblaikie, echristo, rafael

Subscribers: llvm-commits

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

llvm-svn: 251662
2015-10-29 22:21:37 +00:00
Simon Pilgrim 6baace0324 [X86][SSE] Added load+sext tests for 16i1->16i8 and 32i1->32i8
llvm-svn: 251661
2015-10-29 22:19:21 +00:00
Enrico Granata 9eeabff0b5 Add a --language (-l) option to the formatter delete commands in order to allow removing formatters from language categories
This is slightly harder to test because formatters cannot be added to language categories, so deletions are irreversible (in a debugger run)
I plan to add a test case soon, but I need to think about the right approach to obtain one

llvm-svn: 251660
2015-10-29 22:18:05 +00:00
Simon Pilgrim ca56a72af9 [X86][SSE] Shuffle blends with zero
This patch generalizes the zeroing of vector elements with the BLEND instructions. Currently a zero vector will only blend if the shuffled elements are correctly inline, this patch recognises when a vector input is zero (or zeroable) and modifies a local copy of the shuffle mask to support a blend. As a zeroable vector input may not be all zeroes, the zeroable vector is regenerated if necessary.

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

llvm-svn: 251659
2015-10-29 22:11:28 +00:00
Lang Hames 3f88a9ea2c [Orc] Teach IndirectStubsManager to manage an expandable pool of stubs, rather
than a pre-allocated slab of stubs. Also add a convenience method for creating a
single stub, rather than a whole block a time.

llvm-svn: 251658
2015-10-29 22:04:22 +00:00
Jim Ingham 72b5f9bb97 Give the test class it's own name (it was reusing the name from TestCompletions.py).
llvm-svn: 251657
2015-10-29 21:54:50 +00:00
Dehao Chen 7ddf7865b4 clang-format lib/Transforms/Utils/AddDiscriminators.cpp
llvm-svn: 251656
2015-10-29 21:25:33 +00:00
Teresa Johnson bc11ede2c9 Fix test check label.
Summary:
I noticed when manually modifying this test that it was passing when I
expected it to fail. Looks like the combination of LABEL and NOT on the
check does not work. This can also be seen when running FileCheck with
only that one -check-prefix (removing the additional -check-prefix=B):

/usr/local/google/home/tejohnson/llvm/llvm_11_build/./bin/llvm-link -S -internalize -only-needed /usr/local/google/home/tejohnson/llvm/llvm_11_build/test/Linker/Output/link-flags.ll.tmp.b.bc /usr/local/google/home/tejohnson/llvm/llvm_11_build/test/Linker/Output/link-flags.ll.tmp.c.bc | /usr/local/google/home/tejohnson/llvm/llvm_11_build/./bin/FileCheck /usr/local/google/home/tejohnson/llvm/llvm_11/test/Linker/link-flags.ll -check-prefix=CN
error: no check strings found with prefix 'CN:'

The CN prefix checks don't in fact need "LABEL" so remove that.

Reviewers: tra

Subscribers: llvm-commits

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

llvm-svn: 251655
2015-10-29 21:24:38 +00:00
Jonathan Peyton 69e596a5e7 [OMPT] Windows Support for OMPT
The problem is that the ompt_tool() function (which must be implemented by a
performance tool) should be defined in the RTL as well to cover the case when
the tool is not present in the address space of the process. This functionality
is accomplished with weak symbols in Unices. Unfortunately, Windows does not
support weak symbols.

The solution in these changes is to grab the list of all modules loaded by the
process and then search for symbol "ompt_tool()" within them. The function
ompt_tool_windows() performs the search of the ompt_tool symbol. If ompt_tool is
found, then its return value is used to initialize the tool. If ompt_tool is not
found, then ompt_tool_windows() returns NULL and OMPT is thus, disabled.

While doing these changes, the OMPT_SUPPORT detection in CMake was changed to
test for the required featuers for OMPT_SUPPORT, namely: builtin_frame_address()
existence, weak attribute existence and psapi.dll existence. For
LIBOMP_HAVE_OMPT_SUPPORT to be true, it must be that the builtin_frame_address()
intrinsic exists AND one of: either weak attributes exist or psapi.dll exists.

Also, since Process Status API is used I had to add new dependency -- psapi.dll
to the library dependency micro test.

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

llvm-svn: 251654
2015-10-29 20:56:24 +00:00
Nico Weber e8df6750f4 Mark InternalDebugOpt driver options as CoreOptions.
Mostly has the effect of making -ccc-print-phases usable from clang-cl.

llvm-svn: 251653
2015-10-29 20:53:49 +00:00
Weiming Zhao b00cc6217b [ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll
Summary: Refer PR23377. This test was XFAIL'ed for Hexagon as well as ARM. But it has now started passing for ARM.

Reviewers: hans, rengolin, aemerson, kparzysz

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 251652
2015-10-29 20:51:54 +00:00
John McCall 03107a4ef0 Add support for __builtin_{add,sub,mul}_overflow.
Patch by David Grayson!

llvm-svn: 251651
2015-10-29 20:48:01 +00:00
Nico Weber b25423525c Suppress uninteresting output from crash-recovery-modules.m
No behavior change, but it makes this test a bit easier to debug when it fails.

llvm-svn: 251650
2015-10-29 20:43:31 +00:00
Saleem Abdulrasool d006c9368d Sanitizer: define WIN32_LEAN_AND_MEAN
Define WIN32_LEAN_AND_MEAN before including Windows.h.  This is already being
done in some places.  This does it more broadly.  This permits building ASAN on
Linux for Winndows, as well as reduces the amount of included declarations.

llvm-svn: 251649
2015-10-29 20:36:55 +00:00
Eugene Zelenko 406d446e78 Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Target; other minor fixes.
llvm-svn: 251648
2015-10-29 20:33:47 +00:00
Eugene Zelenko cf5f0ee20c Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Target; other minor fixes.
llvm-svn: 251647
2015-10-29 20:12:40 +00:00
Davide Italiano 9b71ef92e7 [ELF2/AArch64] Add relocation tests to ensure we handle overflow correctly.
llvm-svn: 251646
2015-10-29 20:02:27 +00:00
Davide Italiano 3300b798ca [ELF2/AArch64] Implement R_AARCH64_PREL16 and R_AARCH64_PREL32 relocations.
llvm-svn: 251645
2015-10-29 19:55:59 +00:00
George Rimar 8b8222b04c [ELF2] merge-string.s test fixed for win32 configuration.
Differential revision: http://reviews.llvm.org/D14171

llvm-svn: 251644
2015-10-29 19:30:28 +00:00
Daniel Jasper b488a74f99 clang-format: [JS] Add goog.setTestOnly to the list of stuff that
is import-statement-like and shouldn't be wrapped.

llvm-svn: 251643
2015-10-29 19:05:20 +00:00
Enrico Granata 204aa1d980 Add an 'internal' kind of summary to support one-off subclasses of TypeSummaryImpl
llvm-svn: 251642
2015-10-29 18:58:13 +00:00
Lang Hames deadf2a40a [Orc] Rename IndirectStubsManagerBase method 'init' to 'createStubs'.
llvm-svn: 251641
2015-10-29 18:36:27 +00:00
Chandler Carruth c518ebddf3 [FunctionAttrs] Provide a single SCC node set to all of the
transformations in FunctionAttrs rather than building a new one each
time.

This isn't trivial because there are different heuristics from different
passes for exactly what set they want. The primary difference is whether
an *overridable* function completely disables the synthesis of
attributes. I've modeled this by directly testing for overridable, and
using the common set that excludes external and opt-none functions.

This does cause some changes by disabling more optimizations in the face
of opt-none. Specifically, we were still optimizing *calls* to opt-none
functions based on their attributes, just not the bodies. It seems
better to be conservative on both fronts given the intended semanticas
here (best effort to not assume or disturb anything). I've not tried to
test this change as it seems complex, brittle, and not important to the
implicit contract of opt-none. Instead, it seems more like a choice that
should be dictated by the simplified implementation and the change to be
acceptable differences within the space of opt-none.

A big benefit here is that these transformations no longer rely on the
legacy pass manager's SCC types, they just work on generic sets of
function pointers. This will make it easy to re-use their logic in the
new pass manager.

I've also made the transforms static functions instead of members where
trivial while I was touching the signatures.

llvm-svn: 251640
2015-10-29 18:29:15 +00:00
Sylvestre Ledru 43b9571706 add support of the latest Ubuntu (Xenial Xerus)
llvm-svn: 251639
2015-10-29 17:27:55 +00:00
Ehsan Akhgari f16435d85e Add a link to the DXR project
DXR is a project developed at Mozilla that implements a code indexing
and browsing utility on top of libclang that has features such as
call graph querying.

llvm-svn: 251638
2015-10-29 17:20:17 +00:00
Lang Hames 2ed3bf9527 [lld][MachO] Make sure LC_RPATH command size is a multiple of the pointer size.
llvm-svn: 251637
2015-10-29 16:50:26 +00:00
Hafiz Abid Qadeer d122fd8d06 Better handle the arguments common to all MI commands.
Summary:
I observed that eclipse was passing --thread-group for many other commands
then we are currently handling. Looking at the MI documentation, the
following link states that each MI command accept the --thread and
--frame option. Looking at the GDB implementation, it seems that apart
from these 2, --thread-group is also handled the same way.

https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management

So instead of handling those arguments in every comamnds, I have moved
them into the base class and removed them from elsewhere. Now any command
can use these arguments. The patch seems big but most of the changes are
mechanical.

Reviewers: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 251636
2015-10-29 16:30:47 +00:00
Diego Novillo 083becab34 Revert r251593.
The patch in r251593 was only papering over the problem. The actual fix
was committed in r251623.

llvm-svn: 251635
2015-10-29 16:20:38 +00:00
Jonas Paulsson 45d5c673ec [SystemZ] Make the CCRegs regclass non-allocatable.
This was discovered to be necessary while running memchr-01.ll with
-verify-machinstrs, because it is not allowed to have a phys reg live
accross block boundaries while on SSA form, if the register is
allocatable (expect in entry block and landing pads).

In this test case, stringRRE pseudos are expanded after isel by adding
a loop block which produces a live out CC register. To make the test
pass, it was also necessary to not say that StringRRELoop pseudo uses
R0L, this is only true for the StringRRE opcode.

-verify-machineinstrs added to memchr-01.ll test.

New test case int-cmp-51.ll to test that MachineCSE can eliminate
an identical compare (which it couldn't do before).

Reviewed by Ulrich Weigand

llvm-svn: 251634
2015-10-29 16:13:55 +00:00
Vasileios Kalintiris 45faf47e93 [mips] Add support for the new mips-mti-linux toolchain.
The original commit in r249137 added the mips-mti-linux toolchain. However,
the newly added tests of that commit failed in few buildbots. This commit
re-applies the original changes but XFAILs the test file which caused
the buildbot failures. This will allow us to examine what's going wrong
without having to commit/revert large changes.

llvm-svn: 251633
2015-10-29 15:33:53 +00:00
Marek Olsak 6f6d318e16 AMDGPU/SI: handle undef for llvm.SI.packf16
llvm-svn: 251632
2015-10-29 15:29:09 +00:00
Marek Olsak 74d084f466 AMDGPU/SI: use S_OR for fneg (fabs f32)
llvm-svn: 251631
2015-10-29 15:29:05 +00:00
Marek Olsak f924dd6f3c AMDGPU/SI: use S_AND for i1 trunc
llvm-svn: 251630
2015-10-29 15:05:03 +00:00
Zoran Jovanovic 796ed6d937 [mips] wrong opcode for ll/sc instructions on mipsr6 when -integrated-as is used
Summary:
This commit resolves wrong opcodes for ll and sc instructions for r6 architecutres, which were generated in method MipsTargetLowering::emitAtomicBinary.

Author: Jelena.Losic

Reviewers: dsanders

Subscribers: dsanders, llvm-commits

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

llvm-svn: 251629
2015-10-29 14:40:19 +00:00
Pavel Labath 6e813bbf27 Fixup lldb-argdumper cmake build
forgot to rename in one spot.

llvm-svn: 251628
2015-10-29 14:14:24 +00:00
Artyom Skrobov 0ff1ce4038 Recognize that ARM1176JZ[F]-S support TrustZone
Summary:
ARMv6KZ cores were set up incorrectly in ARM.td; also, the SMI mnemonic
(the old name for SMC, as defined in ARMv6KZ) wasn't supported.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 251627
2015-10-29 13:56:19 +00:00