Matt Arsenault [Wed, 21 Oct 2015 21:15:01 +0000 (21:15 +0000)]
AMDGPU: Fix not checking implicit operands in verifyInstruction
When verifying constant bus restrictions, this wasn't catching
uses in implicit operands.
llvm-svn: 250948
Rui Ueyama [Wed, 21 Oct 2015 21:13:35 +0000 (21:13 +0000)]
ELF2: Remove FIXMEs.
These classes are partially written, so almost all features
are FIXMEs. We do not want to add new FIXMEs to the classes
when we add new features to other non-stub classes.
llvm-svn: 250947
Matt Arsenault [Wed, 21 Oct 2015 21:10:12 +0000 (21:10 +0000)]
Use numeric_limits instead of LLONG_MAX
This is a build fix for configurations where LLONG_MAX is
not defined in system headers.
llvm-svn: 250946
Matt Arsenault [Wed, 21 Oct 2015 21:10:10 +0000 (21:10 +0000)]
LegalizeDAG: Implement promote for build_vector
This will be used in future commits for AMDGPU to promote
operations on i64 vectors into operations on 32-bit vector
components.
This will be used / tested in future AMDGPU commits.
llvm-svn: 250945
Evgeniy Stepanov [Wed, 21 Oct 2015 20:47:00 +0000 (20:47 +0000)]
Revert "MemorySanitizer does not require PIE."
It actually does require PIE on some targets.
llvm-svn: 250944
Vedant Kumar [Wed, 21 Oct 2015 20:33:31 +0000 (20:33 +0000)]
[Verifier] Minor comment update, NFC
llvm-svn: 250943
Keno Fischer [Wed, 21 Oct 2015 20:22:04 +0000 (20:22 +0000)]
[RuntimeDyld] Ignore ST_FILE symbols when constructing GlobalSymbolTable
Summary: ELF's STT_File symbols may overlap with regular globals in
other files, so we should ignore them here in order to avoid having
bogus entries in the symbol table that confuse us when resolving relocations.
Reviewers: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13888
llvm-svn: 250942
Evgeniy Stepanov [Wed, 21 Oct 2015 20:20:03 +0000 (20:20 +0000)]
MemorySanitizer does not require PIE.
Since r249754 MemorySanitizer should work equally well for PIE and
non-PIE executables.
Beware, with this change -fsanitize=memory no longer adds implicit
-fPIE -pie compiler/linker flags, unless the target defaults to PIE.
llvm-svn: 250941
Lang Hames [Wed, 21 Oct 2015 20:13:41 +0000 (20:13 +0000)]
[Orc] Clean up a comment.
llvm-svn: 250940
Matthias Gehre [Wed, 21 Oct 2015 20:09:02 +0000 (20:09 +0000)]
[clang-tidy] add check cppcoreguidelines-pro-type-vararg
Summary:
This check flags all calls to c-style vararg functions and all use
of va_list, va_start and va_arg.
Passing to varargs assumes the correct type will be read. This is
fragile because it cannot generally be enforced to be safe in the
language and so relies on programmer discipline to get it right.
This rule is part of the "Type safety" profile of the C++ Core
Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type8-avoid-reading-from-varargs-or-passing-vararg-arguments-prefer-variadic-template-parameters-instead
This commits also reverts
"[clang-tidy] add cert's VariadicFunctionDefCheck as cppcoreguidelines-pro-type-vararg-def"
because that check makes the SFINAE use of vararg functions impossible.
Reviewers: alexfh, sbenza, bkramer, aaron.ballman
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13787
llvm-svn: 250939
Joerg Sonnenberger [Wed, 21 Oct 2015 20:05:01 +0000 (20:05 +0000)]
Drop assert that a call with struct return goes to a function with sret
attribute. Clang incorrectly misses it on __muldc3 and friends and the
type system doesn't include it properly either.
llvm-svn: 250938
Eugene Zelenko [Wed, 21 Oct 2015 20:03:58 +0000 (20:03 +0000)]
Revert r250925 in source/Plugins/OperatingSystem/Go to fix MSVC builds failures.
llvm-svn: 250937
Reid Kleckner [Wed, 21 Oct 2015 19:54:40 +0000 (19:54 +0000)]
[WinEH] Add test for llvm.va.start in catchpad
It already works, but we should have a test for it.
This used to be PR23094 in the old model.
llvm-svn: 250936
David Majnemer [Wed, 21 Oct 2015 19:48:47 +0000 (19:48 +0000)]
[Sema] Remove an unreachable llvm_unreachable
No functionality change is intended.
llvm-svn: 250935
Rui Ueyama [Wed, 21 Oct 2015 19:41:03 +0000 (19:41 +0000)]
ELF2: Avoid bitwise-OR hack. NFC.
The previous code is too clever that that needs a bit more
brain power than this new code.
llvm-svn: 250934
Oleksiy Vyalov [Wed, 21 Oct 2015 19:34:26 +0000 (19:34 +0000)]
Add domain socket support to gdb-remote protocol and lldb-server.
http://reviews.llvm.org/D13881
llvm-svn: 250933
Douglas Katzman [Wed, 21 Oct 2015 19:33:54 +0000 (19:33 +0000)]
[Myriad]: Always add -L paths even if -nostdlib is set.
llvm-svn: 250932
Sean Callanan [Wed, 21 Oct 2015 19:31:17 +0000 (19:31 +0000)]
Fix error handling when there are no REPLs installed.
Before, in the absence of any configured REPLs, LLDB would act as if there were
multiple possible REPL options, whereas actually no REPL language is supported.
Now we make a better error.
llvm-svn: 250931
Siva Chandra [Wed, 21 Oct 2015 19:28:08 +0000 (19:28 +0000)]
[SBValue] Add a method GetNumChildren(uint32_t max)
Summary:
Along with this, support for an optional argument to the "num_children"
method of a Python synthetic child provider has also been added. These have
been added with the following use case in mind:
Synthetic child providers currently have a method "has_children" and
"num_children". While the former is good enough to know if there are
children, it does not give any insight into how many children there are.
Though the latter serves this purpose, calculating the number for children
of a data structure could be an O(N) operation if the data structure has N
children. The new method added in this change provide a middle ground.
One can call GetNumChildren(K) to know if a child exists at an index K
which can be as large as the callers tolerance can be. If the caller wants
to know about children beyond K, it can make an other call with 2K. If the
synthetic child provider maintains state about it counting till K
previosly, then the next call is only an O(K) operation. Infact, all
calls made progressively with steps of K will be O(K) operations.
Reviewers: vharron, clayborg, granata.enrico
Subscribers: labath, lldb-commits
Differential Revision: http://reviews.llvm.org/D13778
llvm-svn: 250930
Teresa Johnson [Wed, 21 Oct 2015 19:25:14 +0000 (19:25 +0000)]
Silence Visual C++ warning in function summary parsing code (NFC)
llvm-svn: 250929
Sean Callanan [Wed, 21 Oct 2015 19:14:33 +0000 (19:14 +0000)]
Fixed version of r250913, which actually implements all the static functions.
Thanks to Siva Chandra and Oleksiy Vyalov for pouncing on this.
llvm-svn: 250928
Siva Chandra [Wed, 21 Oct 2015 18:58:01 +0000 (18:58 +0000)]
Revert "Made the REPL choose a default language if only one REPL can be chosen."
Summary: This reverts commit
babd6dd74e316b1fcd9d171d7d8c83845d51a487.
Reviewers: spyffe
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13952
llvm-svn: 250927
Sanjay Patel [Wed, 21 Oct 2015 18:56:06 +0000 (18:56 +0000)]
[x86] move recursive add match for LEA to helper function; NFCI
llvm-svn: 250926
Eugene Zelenko [Wed, 21 Oct 2015 18:46:17 +0000 (18:46 +0000)]
Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13951
llvm-svn: 250925
Yaron Keren [Wed, 21 Oct 2015 18:36:52 +0000 (18:36 +0000)]
Revert r250923 as config.h is not an installed header.
llvm-svn: 250924
Yaron Keren [Wed, 21 Oct 2015 18:28:35 +0000 (18:28 +0000)]
Include llvm/Config/config.h in FileSystem.h as it depends upon HAVE_SYS_STAT_H which is defined (or not) in config.h.
llvm-svn: 250923
David Majnemer [Wed, 21 Oct 2015 18:22:24 +0000 (18:22 +0000)]
[SimplifyCFG] Don't use-after-free an SSA value
SimplifyTerminatorOnSelect didn't consider the possibility that the
condition might be related to one of PHI nodes.
This fixes PR25267.
llvm-svn: 250922
Yaron Keren [Wed, 21 Oct 2015 18:16:01 +0000 (18:16 +0000)]
Rename clang config.h include guard from CONFIG_H to CLANG_CONFIG_H
to make it different from LLVM config.h include guard.
llvm-svn: 250921
Rui Ueyama [Wed, 21 Oct 2015 18:13:47 +0000 (18:13 +0000)]
ELF2: Rename getMostConstrainingVisibility -> getVisibility. NFC.
The previous name was too long.
llvm-svn: 250920
John McCall [Wed, 21 Oct 2015 18:06:47 +0000 (18:06 +0000)]
Fix and stylize the emission of GC/ARC ivar and GC block layout strings.
Specifically, handle under-aligned object references (by explicitly
ignoring them, because this just isn't representable in the format;
yes, this means that GC silently ignores such references), descend
into anonymous structs and unions, stop classifying fields of
pointer-to-strong/weak type as strong/weak in ARC mode, and emit
skips to cover the entirety of block layouts in GC mode. As a
cleanup, extract this code into a helper class, avoid a number of
unnecessary copies and layout queries, generate skips implicitly
instead of explicitly tracking them, and clarify the bitmap-creation
logic.
llvm-svn: 250919
John McCall [Wed, 21 Oct 2015 18:06:43 +0000 (18:06 +0000)]
Unify the ObjC entrypoint caches.
llvm-svn: 250918
John McCall [Wed, 21 Oct 2015 18:06:38 +0000 (18:06 +0000)]
Some minor ARC diagnostic improvements.
llvm-svn: 250917
John McCall [Wed, 21 Oct 2015 18:06:31 +0000 (18:06 +0000)]
In ARC, peephole the initialization of a __weak variable with
a value loaded from a __weak variable into a call to
objc_copyWeak or objc_moveWeak.
llvm-svn: 250916
Zachary Turner [Wed, 21 Oct 2015 17:48:52 +0000 (17:48 +0000)]
Use six to portably handle module renames in Python 2 and 3
llvm-svn: 250915
Rui Ueyama [Wed, 21 Oct 2015 17:47:10 +0000 (17:47 +0000)]
ELF2: Simplify DT_FLAGS{,_1} handling. NFC.
llvm-svn: 250914
Sean Callanan [Wed, 21 Oct 2015 17:43:18 +0000 (17:43 +0000)]
Made the REPL choose a default language if only one REPL can be chosen.
This requires REPLs to enumerate the languages they support.
llvm-svn: 250913
Peter Zotov [Wed, 21 Oct 2015 17:43:02 +0000 (17:43 +0000)]
[OCaml] Expose Llvm.{set_,}unnamed_addr.
Patch by Jacques-Pascal Deplaix <jp.deplaix@gmail.com>
llvm-svn: 250912
Craig Topper [Wed, 21 Oct 2015 17:26:45 +0000 (17:26 +0000)]
[X86] Add AMD mwaitx, monitorx, and clzero instructions to the assembly parser and disassembler.
llvm-svn: 250911
Sanjay Patel [Wed, 21 Oct 2015 17:24:00 +0000 (17:24 +0000)]
[x86] add test case that shows holes in LEA isel
llvm-svn: 250910
Nico Weber [Wed, 21 Oct 2015 17:13:45 +0000 (17:13 +0000)]
clang-format: Teach --sort-includes to interleave #include and #import.
clang accepts both #include and #import for includes (the latter having an
implicit header guard). Let clang-format interleave both types if
--sort-includes is passed. #import is used frequently in Objective-C code.
http://reviews.llvm.org/D13853
llvm-svn: 250909
Kevin Enderby [Wed, 21 Oct 2015 17:13:20 +0000 (17:13 +0000)]
Backing out commit r250906 as it broke lld.
llvm-svn: 250908
Davide Italiano [Wed, 21 Oct 2015 17:09:47 +0000 (17:09 +0000)]
[ELF2] Add support for -z origin.
llvm-svn: 250907
Kevin Enderby [Wed, 21 Oct 2015 16:59:24 +0000 (16:59 +0000)]
This removes the eating of the error in Archive::Child::getSize() when the characters
in the size field in the archive header for the member is not a number. To do this we
have all of the needed methods return ErrorOr to push them up until we get out of lib.
Then the tools and can handle the error in whatever way is appropriate for that tool.
So the solution is to plumb all the ErrorOr stuff through everything that touches archives.
This include its iterators as one can create an Archive object but the first or any other
Child object may fail to be created due to a bad size field in its header.
Thanks to Lang Hames on the changes making child_iterator contain an
ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add
operator overloading for * and -> .
We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash”
and using report_fatal_error() to move the error checking will cause the program to
stop, neither of which are really correct in library code. There are still some uses of
these that should be cleaned up in this library code for other than the size field.
Also corrected the code where the size gets us to the “at the end of the archive”
which is OK but past the end of the archive will return object_error::parse_failed now.
The test cases use archives with text files so one can see the non-digit character,
in this case a ‘%’, in the size field.
llvm-svn: 250906
Benjamin Kramer [Wed, 21 Oct 2015 16:33:15 +0000 (16:33 +0000)]
Shrink DynTypedNode by one pointer from 40 to 32 bytes (on x86_64).
The MemoizationData cache was introduced to avoid a series of enum
compares at the cost of making DynTypedNode bigger. This change reverts
to using an enum compare but instead of building a chain of comparison
the enum values are reordered so the check can be performed with a
simple greater than. The alternative would be to steal a bit from the
enum but I think that's a more complex solution and not really needed
here.
I tried this on several large .cpp files with clang-tidy and didn't
notice any performance difference. The test change is due to matchers
being sorted by their node kind.
Differential Revision: http://reviews.llvm.org/D13946
llvm-svn: 250905
Craig Topper [Wed, 21 Oct 2015 16:31:56 +0000 (16:31 +0000)]
Update lld to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC
llvm-svn: 250904
Craig Topper [Wed, 21 Oct 2015 16:31:33 +0000 (16:31 +0000)]
Update clang to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC
llvm-svn: 250903
Craig Topper [Wed, 21 Oct 2015 16:31:31 +0000 (16:31 +0000)]
Use StringRef instead of calling c_str and doing pointer math before eventually creating a StringRef. NFC
llvm-svn: 250902
Craig Topper [Wed, 21 Oct 2015 16:30:42 +0000 (16:30 +0000)]
[Option] Use an ArrayRef to store the Option Infos in OptTable. NFC
llvm-svn: 250901
Vedant Kumar [Wed, 21 Oct 2015 16:03:32 +0000 (16:03 +0000)]
[llvm-cov] Adjust column widths for function and file reports
Previously, we only expanded function and filename column widths when
rendering file reports. This commit makes the change for function
reports as well.
llvm-svn: 250900
Adrian McCarthy [Wed, 21 Oct 2015 14:42:10 +0000 (14:42 +0000)]
Skip TestMultithreaded on Windows.
Differential Revision: http://reviews.llvm.org/D13923
llvm-svn: 250899
Adhemerval Zanella [Wed, 21 Oct 2015 13:08:06 +0000 (13:08 +0000)]
[lsan] [aarch64] Add support for AArch64
This patch add support for leak sanitizer for aarch64. Similar to
MIPS it uses a SizeClassAllocator32 due VMA constraints (aarch64
currently supports 39 and 42-bit VMA).
It also fixes the android build issue.
llvm-svn: 250898
Angel Garcia Gomez [Wed, 21 Oct 2015 12:58:15 +0000 (12:58 +0000)]
Add modernize-use-default check to clang-tidy.
Summary:
Add a check that replaces empty bodies of special member functions with '= default;'.
For now, it is only implemented for the default constructor and the destructor, which are the easier cases.
The copy-constructor and the copy-assignment operator cases will be implemented later.
I applied this check to the llvm code base and found 627 warnings (385 in llvm, 9 in compiler-rt, 220 in clang and 13 in clang-tools-extra).
Applying the fixes didn't break any build or test, it only caused a -Wpedantic warning in lib/Target/Mips/MipsOptionRecord.h:33 becaused it replaced
virtual ~MipsOptionRecord(){}; to virtual ~MipsOptionRecord()= default;;
Reviewers: klimek
Subscribers: george.burgess.iv, Eugene.Zelenko, alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13871
llvm-svn: 250897
Pavel Labath [Wed, 21 Oct 2015 12:56:37 +0000 (12:56 +0000)]
Clean up more .dwo files after the tests run
llvm-svn: 250896
Daniel Sanders [Wed, 21 Oct 2015 12:44:14 +0000 (12:44 +0000)]
[mips][mips16] Re-work the inline assembly stubs to work with IAS. NFC.
Summary:
Previously, we were inserting an InlineAsm statement for each line of the
inline assembly. This works for GAS but it triggers prologue/epilogue
emission when IAS is in use. This caused:
.set noreorder
.cpload $25
to be emitted as:
.set push
.set reorder
.set noreorder
.set pop
.set push
.set reorder
.cpload $25
.set pop
which led to assembler errors and caused the test to fail.
The whitespace-after-comma changes included in this patch are necessary to
match the output when IAS is in use.
Reviewers: vkalintiris
Subscribers: rkotler, llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D13653
llvm-svn: 250895
Chandler Carruth [Wed, 21 Oct 2015 12:15:19 +0000 (12:15 +0000)]
[AA] Enhance the new AliasAnalysis infrastructure with an optional
"external" AA wrapper pass.
This is a generic hook that can be used to thread custom code into the
primary AAResultsWrapperPass for the legacy pass manager in order to
allow it to merge external AA results into the AA results it is
building. It does this by threading in a raw callback and so it is
*very* powerful and should serve almost any use case I have come up with
for extending the set of alias analyses used. The only thing not well
supported here is using a *different order* of alias analyses. That form
of extension *is* supportable with the new pass manager, and I can make
the callback structure here more elaborate to support it in the legacy
pass manager if this is a critical use case that people are already
depending on, but the only use cases I have heard of thus far should be
reasonably satisfied by this simpler extension mechanism.
It is hard to test this using normal facilities (the built-in AAs don't
use this for obvious reasons) so I've written a fairly extensive set of
custom passes in the alias analysis unit test that should be an
excellent test case because it models the out-of-tree users: it adds
a totally custom AA to the system. This should also serve as
a reasonably good example and guide for out-of-tree users to follow in
order to rig up their existing alias analyses.
No support in opt for commandline control is provided here however. I'm
really unhappy with the kind of contortions that would be required to
support that. It would fully re-introduce the analysis group
self-recursion kind of patterns. =/
I've heard from out-of-tree users that this will unblock their use cases
with extending AAs on top of the new infrastructure and let us retain
the new analysis-group-free-world.
Differential Revision: http://reviews.llvm.org/D13418
llvm-svn: 250894
Elena Demikhovsky [Wed, 21 Oct 2015 11:50:54 +0000 (11:50 +0000)]
Masked Load/Store optimization for scalar code
When we have to convert the masked.load, masked.store to scalar code, we generate a chain of conditional basic blocks.
I added optimization for constant mask vector.
Differential Revision: http://reviews.llvm.org/D13855
llvm-svn: 250893
Anastasia Stulova [Wed, 21 Oct 2015 10:37:57 +0000 (10:37 +0000)]
[OpenCL] Add test for program scope variable restrictions in OpenCL v2.0
http://reviews.llvm.org/D13105
llvm-svn: 250892
Ewan Crawford [Wed, 21 Oct 2015 10:27:10 +0000 (10:27 +0000)]
[RenderScript] Fix out of bounds warning.
llvm-svn: 250891
Pavel Labath [Wed, 21 Oct 2015 10:17:21 +0000 (10:17 +0000)]
[DataFormatters] Make libc++ list loop detection linear
Summary:
Loop detection code is being called before every element access. Although it tries to cache some
of the data by remembering the loop-free initial segment, every time it needs to increase this
segment, it will start from scratch. For the typical usage pattern, where one accesses the
elements in order, the loop detection will need to be run after every access, resulting in
quadratic behavior. This behavior is noticable even for the default 255 element limit.
In this commit, I rewrite the algorithm to be truly incremental -- it maintains the state of its
loop-detection runners between calls, and reuses them when it needs to check another segment.
This way, each part of the list is scanned only once, resulting in linear behavior.
Also note that I have changed the operator== of ListEntry to do the comparison based on the
value() function (instead of relying on ValueObjectSP equality). In my experiments, I kept
getting different ValueObjectSPs when going through the same element twice.
Reviewers: granata.enrico
Subscribers: lldb-commits, sivachandra
Differential Revision: http://reviews.llvm.org/D13902
llvm-svn: 250890
Benjamin Kramer [Wed, 21 Oct 2015 10:07:26 +0000 (10:07 +0000)]
Revert "[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap."
Putting DynTypedNode in the ParentMap bloats its memory foot print.
Before the void* key had 8 bytes, now we're at 40 bytes per key which
can mean multiple gigabytes increase for large ASTs and this count
doesn't even include all the added TypeLoc nodes. Revert until I come
up with a better data structure.
This reverts commit r250831.
llvm-svn: 250889
Richard Barton [Wed, 21 Oct 2015 10:03:55 +0000 (10:03 +0000)]
Fix __ARM_FP value for sp-only FPUs with Half-precision
The logic for parsing FP capabilities to set __ARM_FP was mistakenly removing
the Half-Precision capability when handling fp-only-sp resulting in a value
of 0x4. Section 6.5.1 of ACLE states that for such FP architectures the value
should be 0x6
llvm-svn: 250888
Daniel Sanders [Wed, 21 Oct 2015 09:58:54 +0000 (09:58 +0000)]
[mips][msa] Remove copy_u.d and move copy_u.w to MSA64.
Summary:
The forwards compatibility strategy employed by MIPS is to consider registers
to be infinitely sign-extended. Then on ISA's with a wider register, the result
of existing instructions are sign-extended to register width and zero-extended
counterparts are added. copy_u.w on MSA32 and copy_u.w on MSA64 violate this
strategy and we have therefore corrected the MSA specs to fix this.
We still keep track of sign/zero-extension during legalization but we now
match copy_s.[wd] where required.
No change required to clang since __builtin_msa_copy_u_[wd] will map to
copy_s.[wd] where appropriate for the target.
Reviewers: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13472
llvm-svn: 250887
Ewan Crawford [Wed, 21 Oct 2015 08:50:42 +0000 (08:50 +0000)]
[RenderScript] New commands to save/load RS allocations to file.
Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file.
And 'language renderscript allocation load' to restore an allocation with the saved data from a binary file.
Binary file format contains a header FileHeader with meta information preceding the raw data.
Reviewed by: jingham, clayborg
Subscribers: lldb-commits, domipheus
Differential Revision: http://reviews.llvm.org/D13903
llvm-svn: 250886
Jonas Paulsson [Wed, 21 Oct 2015 07:39:47 +0000 (07:39 +0000)]
Let MachineVerifier be aware of mem-to-mem instructions.
A mem-to-mem instruction (that both loads and stores), which store to an
FI, cannot pass the verifier since it thinks it is loading from the FI.
For the mem-to-mem instruction, do a looser check in visitMachineOperand()
and only check liveness at the reg-slot while analyzing a frame index operand.
Needed to make CodeGen/SystemZ/xor-01.ll pass with -verify-machineinstrs,
which now runs with this flag.
Reviewed by Evan Cheng and Quentin Colombet.
llvm-svn: 250885
Richard Smith [Wed, 21 Oct 2015 07:13:52 +0000 (07:13 +0000)]
[modules] libstdc++ defines some static inline functions in its internal
headers. If those headers end up being textually included twice into the same
module, we get ambiguity errors.
Work around this by downgrading the ambiguity error to a warning if multiple
identical internal-linkage functions appear in an overload set, and just pick
one of those functions as the lookup result.
llvm-svn: 250884
Mehdi Amini [Wed, 21 Oct 2015 06:11:01 +0000 (06:11 +0000)]
Do not use `dyn_cast<X>` after `isa<X>` (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 250883
Mehdi Amini [Wed, 21 Oct 2015 06:10:55 +0000 (06:10 +0000)]
Revert "Add missing #include, found by modules build."
This reverts commit r250239.
It seems unwanted changes got committed here, and part of
the patch does not seem correct.
For instance RoundUpToAlignment() is called without its returned
value actually used.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 250882
Craig Topper [Wed, 21 Oct 2015 04:52:40 +0000 (04:52 +0000)]
Use range-based for loops. NFC.
llvm-svn: 250881
Craig Topper [Wed, 21 Oct 2015 04:52:38 +0000 (04:52 +0000)]
Use std::find instead of a manual loop.
llvm-svn: 250880
Craig Topper [Wed, 21 Oct 2015 04:52:36 +0000 (04:52 +0000)]
Parse into an unsigned type instead of a signed type and then checking for positive and casting to unsigned. Since we know the string starts with a digit it couldn't be negative anyway. NFCI
llvm-svn: 250879
Craig Topper [Wed, 21 Oct 2015 04:52:34 +0000 (04:52 +0000)]
Fix bad indentation.
llvm-svn: 250878
Krzysztof Parzyszek [Wed, 21 Oct 2015 02:40:06 +0000 (02:40 +0000)]
Tail duplication can mix incompatible registers in phi nodes
Do not tail duplicate blocks where the successor has a phi node,
and the corresponding value in that phi node uses a subregister.
http://reviews.llvm.org/D13922
llvm-svn: 250877
Craig Topper [Wed, 21 Oct 2015 02:34:10 +0000 (02:34 +0000)]
Use ArrayRef and MutableArrayRef instead of a pointer and size. NFC
llvm-svn: 250876
JF Bastien [Wed, 21 Oct 2015 02:23:09 +0000 (02:23 +0000)]
WebAssembly: support imports
C/C++ code can declare an extern function, which will show up as an import in WebAssembly's output. It's expected that the linker will resolve these, and mark unresolved imports as call_import (I have a patch which does this in wasmate).
llvm-svn: 250875
Eugene Zelenko [Wed, 21 Oct 2015 01:42:15 +0000 (01:42 +0000)]
Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.
llvm-svn: 250874
Dehao Chen [Wed, 21 Oct 2015 01:22:27 +0000 (01:22 +0000)]
Tolerate negative offset when matching sample profile.
In some cases (as illustrated in the unittest), lineno can be less than the heade_lineno because the function body are included from some other files. In this case, offset will be negative. This patch makes clang still able to match the profile to IR in this situation.
http://reviews.llvm.org/D13914
llvm-svn: 250873
Eugene Zelenko [Wed, 21 Oct 2015 01:03:30 +0000 (01:03 +0000)]
Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13916
llvm-svn: 250872
Sean Callanan [Wed, 21 Oct 2015 00:36:34 +0000 (00:36 +0000)]
When a REPL creates a new target for itself, it is that target's REPL.
To allow that, I've added a SetREPL call to the Target, which allows a REPL
that just created a target to install itself as the go-to REPL for the
corresponding language.
llvm-svn: 250870
Sean Callanan [Wed, 21 Oct 2015 00:28:44 +0000 (00:28 +0000)]
When target is NULL, provide a debugger so that REPLs can use that to create
their own target.
llvm-svn: 250869
Krzysztof Parzyszek [Tue, 20 Oct 2015 22:57:13 +0000 (22:57 +0000)]
[Hexagon] Bit-based instruction simplification
Analyze bit patterns of operands and values of instructions to perform
various simplifications, dead/redundant code elimination, etc.
llvm-svn: 250868
Krzysztof Parzyszek [Tue, 20 Oct 2015 22:40:57 +0000 (22:40 +0000)]
[Hexagon] Fix isNVStorable flag in .td files
An upper half and a double word cannot be used as value sources in a
new-value store.
llvm-svn: 250867
NAKAMURA Takumi [Tue, 20 Oct 2015 22:36:16 +0000 (22:36 +0000)]
Revert r247977, "clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as "non-clang-driver"."
They, "tests requiring clang-driver", should work in trunk since ps4 driver has been introduced.
llvm-svn: 250866
Rafael Espindola [Tue, 20 Oct 2015 22:08:49 +0000 (22:08 +0000)]
Fix symbol value calculation in SHF_MERGE.
We would get the wrong value if the symbol was in the middle of an entry.
llvm-svn: 250865
Igor Kudrin [Tue, 20 Oct 2015 21:47:58 +0000 (21:47 +0000)]
[ELF2] Determine the order of entries of symbol tables in the finalize() phase.
* Move the responsibility to call SymbolBody::setDynamicSymbolTableIndex()
from the hash table to the dynamic symbol table.
* Hash table is not longer responsible for filling the dynamic symbol table.
* The final order of symbols of both symbol tables is set before writing
phase starts.
* Remove repeaded scan of the symbol table during writting SymbolTableSection.
Differential Revision: http://reviews.llvm.org/D13911
llvm-svn: 250864
Lang Hames [Tue, 20 Oct 2015 21:47:19 +0000 (21:47 +0000)]
[lld][MachO] Fix indentation.
llvm-svn: 250863
David Blaikie [Tue, 20 Oct 2015 21:45:52 +0000 (21:45 +0000)]
Revert "Apply modernize-use-default to clang-tools-extra."
Breaks the build in GCC 4.7.2 (see
http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3 for example)
This reverts commit r250824.
llvm-svn: 250862
Lang Hames [Tue, 20 Oct 2015 21:44:30 +0000 (21:44 +0000)]
[lld][MachO] Fix typo in comment.
llvm-svn: 250861
Igor Laevsky [Tue, 20 Oct 2015 21:33:30 +0000 (21:33 +0000)]
[MemorySanitizer] NFC. Do not use GET_INTRINSIC_MODREF_BEHAVIOR table.
It is now possible to infer intrinsic modref behaviour purely from intrinsic attributes.
This change will allow to completely remove GET_INTRINSIC_MODREF_BEHAVIOR table.
Differential Revision: http://reviews.llvm.org/D13907
llvm-svn: 250860
Zachary Turner [Tue, 20 Oct 2015 21:06:05 +0000 (21:06 +0000)]
Use six to portably assign metaclasses in Python 2 and 3.
llvm-svn: 250859
Zachary Turner [Tue, 20 Oct 2015 21:05:57 +0000 (21:05 +0000)]
Introduce a mechanism for reusing Python modules out of tree.
Right now our Python code does not all share a common root. Tests and
scripts both contain python code that cannot take advantage of reusability
since they are unrelated siblings of each other.
In particular, this presents a problem for wanting to use third party
packages from both sides, since it does not make sense to copy the module
into both places.
This patch solves this by introducing a script lldb_shared.py which is a
very lightweight script that just searches up the tree until it finds a
root, and then imports a module from there. That module knows how to
find all of the shared code that LLDB uses, and adjusts sys.path
accordingly to make them all visible.
llvm-svn: 250858
Zachary Turner [Tue, 20 Oct 2015 21:05:49 +0000 (21:05 +0000)]
Add `six` Python module to lldb/third_party.
Six is a python module designed to smooth the process of porting
Python 2 code to Python 3. Specifically, six provides a consistent
interface to some of the breaking changes between 2 and 3. For example,
the syntax for assigning a metaclass differs in Python 2 and 3. Six
addresses this by providing a single class decorator that will do the
right thing depending on which version of Python is being run.
There are other examples too, such as dealing with renamed modules,
unicode literals, etc.
llvm-svn: 250857
Reid Kleckner [Tue, 20 Oct 2015 21:04:13 +0000 (21:04 +0000)]
Re-land r250592 without rejecting field refs in unevaluated contexts
This time, I went with the first approach from
http://reviews.llvm.org/D6700, where clang actually attempts to form an
implicit member reference from an UnresolvedLookupExpr. We know that
there are only two possible outcomes at this point, a DeclRefExpr of the
FieldDecl or an error, but its safer to reuse the existing machinery for
this.
llvm-svn: 250856
Igor Kudrin [Tue, 20 Oct 2015 20:52:14 +0000 (20:52 +0000)]
[ELF2] Extract calculation of symbol binding as a separate function.
Differential Revision: http://reviews.llvm.org/D13910
llvm-svn: 250855
David Majnemer [Tue, 20 Oct 2015 20:49:21 +0000 (20:49 +0000)]
[-fms-extensions] Allow missing exception specifications in redeclarations as an extension
Microsoft's ATL headers make use of this MSVC extension, add support for
it and issue a diagnostic under -Wmicrosoft-exception-spec.
This fixes PR25265.
llvm-svn: 250854
Simon Pilgrim [Tue, 20 Oct 2015 20:27:23 +0000 (20:27 +0000)]
[X86][SSE] Add 256-bit vector bit rotation tests.
llvm-svn: 250853
Duncan P. N. Exon Smith [Tue, 20 Oct 2015 19:36:39 +0000 (19:36 +0000)]
bugpoint: Remove implicit ilist iterator conversions, NFC
This is the last of the implicit ilist iterator conversions in LLVM.
Still up for debate whether we let these bitrot back:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html
llvm-svn: 250852
Krzysztof Parzyszek [Tue, 20 Oct 2015 19:33:46 +0000 (19:33 +0000)]
[Hexagon] Capture aggregate variables by reference, not value
llvm-svn: 250851
Krzysztof Parzyszek [Tue, 20 Oct 2015 19:30:21 +0000 (19:30 +0000)]
[Hexagon] Do not fall-through if there is no CFG edge
llvm-svn: 250850
Krzysztof Parzyszek [Tue, 20 Oct 2015 19:26:36 +0000 (19:26 +0000)]
[Hexagon] Use symbolic name for subregister instead of hardcoded number
llvm-svn: 250849
Krzysztof Parzyszek [Tue, 20 Oct 2015 19:21:05 +0000 (19:21 +0000)]
[Hexagon] Change Based->Base in getBasedWithImmOffset
llvm-svn: 250848