Kamil Rytarowski [Fri, 28 Apr 2017 00:29:54 +0000 (00:29 +0000)]
Resurrect the standalone build of LLDB
Switch includes "llvm/Config/config.h" to "llvm/Config/llvm-config.h".
Tested on NetBSD 7.99.70 amd64
llvm-svn: 301603
Argyrios Kyrtzidis [Fri, 28 Apr 2017 00:25:06 +0000 (00:25 +0000)]
[ARCMigrate] When applying changes from remap files, disable the 'adjustRemovals' functionality of EditedSource
'adjustRemovals' is used to avoid situation when removing a range inadvertently causes 2 separate identifiers to get joined into one.
But it is not useful when the edits are character precise, as is the case with the remap files.
llvm-svn: 301602
George Burgess IV [Thu, 27 Apr 2017 23:59:45 +0000 (23:59 +0000)]
Use a consistent style. NFC
llvm-svn: 301601
Tim Hammerquist [Thu, 27 Apr 2017 23:09:08 +0000 (23:09 +0000)]
integrate SBTrace changes into Xcode project
llvm-svn: 301600
Davide Italiano [Thu, 27 Apr 2017 23:09:01 +0000 (23:09 +0000)]
[SROA] Fix nondeterminism exposed by Simon's r299221.
Use a SmallSetSetVector instead of a SmallPtrSet as iterating
over the latter is not stable ('<' relies on addresses).
llvm-svn: 301599
Rui Ueyama [Thu, 27 Apr 2017 23:03:22 +0000 (23:03 +0000)]
COFF ICF: Merge only functions. Do not merge read-only data.
This seems to be the behavior of the MSVC linker. Previously, this
incompatibility caused nasty issues in chromium build a few times.
Differential Revision: https://reviews.llvm.org/D30363
llvm-svn: 301598
Bruno Cardoso Lopes [Thu, 27 Apr 2017 22:29:14 +0000 (22:29 +0000)]
[Modules] Improve diagnostics for incomplete umbrella
One of the -Wincomplete-umbrella warnings diagnoses when a header is present in
the directory but it's not present in the umbrella header. Currently, this
warning only happens on top level modules; any submodule using an umbrella
header does not get this warning. Fix that by also considering the submodules.
Differential Revision: https://reviews.llvm.org/D32576
rdar://problem/
22623686
llvm-svn: 301597
Bruno Cardoso Lopes [Thu, 27 Apr 2017 22:29:10 +0000 (22:29 +0000)]
[Modules] Refactor logic for incomplete umbrella warnings. NFC
llvm-svn: 301596
Frederich Munch [Thu, 27 Apr 2017 22:10:57 +0000 (22:10 +0000)]
Fix a few pedantic warnings.
Reviewers: zturner, hansw, hans
Reviewed By: hans
Subscribers: hans, llvm-commits
Differential Revision: https://reviews.llvm.org/D32611
llvm-svn: 301595
Sanjay Patel [Thu, 27 Apr 2017 21:55:03 +0000 (21:55 +0000)]
[InstCombine] fix matcher to bind to specific operand (PR32830)
Matching any random value would be very wrong:
https://bugs.llvm.org/show_bug.cgi?id=32830
llvm-svn: 301594
Duncan P. N. Exon Smith [Thu, 27 Apr 2017 21:49:45 +0000 (21:49 +0000)]
Headers: Make the type of SIZE_MAX the same as size_t
size_t is usually defined as unsigned long, but on 64-bit platforms,
stdint.h currently defines SIZE_MAX using "ull" (unsigned long long).
Although this is the same width, it doesn't necessarily have the same
alignment or calling convention. It also triggers printf warnings when
using the format flag "%zu" to print SIZE_MAX.
This changes SIZE_MAX to reuse the compiler-provided __SIZE_MAX__, and
provides similar fixes for the other integers:
- INTPTR_MIN
- INTPTR_MAX
- UINTPTR_MAX
- PTRDIFF_MIN
- PTRDIFF_MAX
- INTMAX_MIN
- INTMAX_MAX
- UINTMAX_MAX
- INTMAX_C()
- UINTMAX_C()
... and fixes the typedefs for intptr_t and uintptr_t to use
__INTPTR_TYPE__ and __UINTPTR_TYPE__ instead of int32_t, effectively
reverting r89224, r89226, and r89237 (r89221 already having been
effectively reverted).
We can probably also kill __INTPTR_WIDTH__, __INTMAX_WIDTH__, and
__UINTMAX_WIDTH__ in a follow-up, but I was hesitant to delete all the
per-target CHECK lines in this commit since those might serve their own
purpose.
rdar://problem/
11811377
llvm-svn: 301593
Duncan P. N. Exon Smith [Thu, 27 Apr 2017 21:41:51 +0000 (21:41 +0000)]
Preprocessor: Suppress -Wnonportable-include-path for header maps
If a file search involves a header map, suppress
-Wnonportable-include-path. It's firing lots of false positives for
framework authors internally, and it's not trivial to fix.
Consider a framework called "Foo" with a main (installed) framework header
"Foo/Foo.h". It's atypical for "Foo.h" to actually live inside a
directory called "Foo" in the source repository. Instead, the
build system generates a header map while building the framework.
If Foo.h lives at the top-level of the source repository (common), and
the git repo is called ssh://some.url/foo.git, then the header map will
have something like:
Foo/Foo.h -> /Users/myname/code/foo/Foo.h
where "/Users/myname/code/foo" is the clone of ssh://some.url/foo.git.
After #import <Foo/Foo.h>, the current implementation of
-Wnonportable-include-path will falsely assume that Foo.h was found in a
nonportable way, because of the name of the git clone (.../foo/Foo.h).
However, that directory name was not involved in the header search at
all.
This commit adds an extra parameter to Preprocessor::LookupFile and
HeaderSearch::LookupFile to track if the search used a header map,
making it easy to suppress the warning. Longer term, once we find a way
to avoid the false positive, we should turn the warning back on.
rdar://problem/
28863903
llvm-svn: 301592
Sanjoy Das [Thu, 27 Apr 2017 20:55:07 +0000 (20:55 +0000)]
Specify something that's true in practice
llvm-svn: 301591
Vedant Kumar [Thu, 27 Apr 2017 20:48:17 +0000 (20:48 +0000)]
[ubsan] Make the cast overflow message less redundant
llvm-svn: 301589
Evgeniy Stepanov [Thu, 27 Apr 2017 20:27:33 +0000 (20:27 +0000)]
[asan] Fix dead stripping of globals on Linux (compiler-rt).
Third attempt. See the description of the corresponding commit in
LLVM for more details.
llvm-svn: 301588
Evgeniy Stepanov [Thu, 27 Apr 2017 20:27:27 +0000 (20:27 +0000)]
[asan] Fix dead stripping of globals on Linux.
Use a combination of !associated, comdat, @llvm.compiler.used and
custom sections to allow dead stripping of globals and their asan
metadata. Sometimes.
Currently this works on LLD, which supports SHF_LINK_ORDER with
sh_link pointing to the associated section.
This also works on BFD, which seems to treat comdats as
all-or-nothing with respect to linker GC. There is a weird quirk
where the "first" global in each link is never GC-ed because of the
section symbols.
At this moment it does not work on Gold (as in the globals are never
stripped).
This is a second re-land of r298158. This time, this feature is
limited to -fdata-sections builds.
llvm-svn: 301587
Evgeniy Stepanov [Thu, 27 Apr 2017 20:27:23 +0000 (20:27 +0000)]
[asan] Put ctor/dtor in comdat.
When possible, put ASan ctor/dtor in comdat.
The only reason not to is global registration, which can be
TU-specific. This is not the case when there are no instrumented
globals. This is also limited to ELF targets, because MachO does
not have comdat, and COFF linkers may GC comdat constructors.
The benefit of this is a lot less __asan_init() calls: one per DSO
instead of one per TU. It's also necessary for the upcoming
gc-sections-for-globals change on Linux, where multiple references to
section start symbols trigger quadratic behaviour in gold linker.
This is a second re-land of r298756. This time with a flag to disable
the whole thing to avoid a bug in the gold linker:
https://sourceware.org/bugzilla/show_bug.cgi?id=19002
llvm-svn: 301586
Tim Northover [Thu, 27 Apr 2017 20:22:40 +0000 (20:22 +0000)]
libclang: remove unused variable.
llvm-svn: 301585
Kostya Kortchinsky [Thu, 27 Apr 2017 20:21:16 +0000 (20:21 +0000)]
[scudo] Move thread local variables into their own files
Summary:
This change introduces scudo_tls.h & scudo_tls_linux.cpp, where we move the
thread local variables used by the allocator, namely the cache, quarantine
cache & prng. `ScudoThreadContext` will hold those. This patch doesn't
introduce any new platform support yet, this will be the object of a later
patch. This also changes the PRNG so that the structure can be POD.
Reviewers: kcc, dvyukov, alekseyshl
Reviewed By: dvyukov, alekseyshl
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D32440
llvm-svn: 301584
Simon Pilgrim [Thu, 27 Apr 2017 20:19:00 +0000 (20:19 +0000)]
[X86][SSE] Add tests for broadcast from larger vector loads
llvm-svn: 301583
Tobias Grosser [Thu, 27 Apr 2017 20:08:16 +0000 (20:08 +0000)]
[ScopInfo] Consider only write-free dereferencable loads as invariant
When we introduced in r297375 support for hoisting loads that are known
to be dereferencable without any conditional guard, we forgot to keep the check
to verify that no other write into the very same location exists. This
change ensures now that dereferencable loads are allowed to access everything,
but can only be hoisted in case no conflicting write exists.
This resolves llvm.org/PR32778
Reported-by: Huihui Zhang <huihuiz@codeaurora.org>
llvm-svn: 301582
Chris Bieneman [Thu, 27 Apr 2017 19:56:54 +0000 (19:56 +0000)]
Fixing Windows bot
URL:
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/8700
llvm-svn: 301581
Chris Bieneman [Thu, 27 Apr 2017 19:45:16 +0000 (19:45 +0000)]
NFC. Add comment about debugserver usage
This just adds a comment to SocketAddress about it being used by debugserver and the implications of that.
If we need to make changes to this class that make it unsuitable for debugserver we can re-implement the minimal abstractions we need from this file in debugserver. I would prefer not to do that because code duplication is bad. Nuff said.
llvm-svn: 301580
Chris Bieneman [Thu, 27 Apr 2017 19:45:13 +0000 (19:45 +0000)]
Fix GreenDragon bots
We don't actually need to include Compiler.h here because it is only used on Windows and Windows/PosixAPI.h includes it.
llvm-svn: 301579
Zachary Turner [Thu, 27 Apr 2017 19:38:38 +0000 (19:38 +0000)]
[llvm-readobj] Dump COFF Resources section.
This patch dumps the raw bytes of the .rsrc sections that
are present in COFF object and executable files. Subsequent
patches will parse this information and dump in a more human
readable format.
Differential Revision: https://reviews.llvm.org/D32463
Patch By: Eric Beckmann
llvm-svn: 301578
George Rokos [Thu, 27 Apr 2017 18:54:00 +0000 (18:54 +0000)]
[OpenMP] libomptarget: test correction for use with OpenMP 4.5
Differential Revision: https://reviews.llvm.org/D32562
Thanks to Sergey Dmitriev for submitting the patch.
llvm-svn: 301577
Chandler Carruth [Thu, 27 Apr 2017 18:45:20 +0000 (18:45 +0000)]
[PM/LoopUnswitch] Introduce a new, simpler loop unswitch pass.
Currently, this pass only focuses on *trivial* loop unswitching. At that
reduced problem it remains significantly better than the current loop
unswitch:
- Old pass is worse than cubic complexity. New pass is (I think) linear.
- New pass is much simpler in its design by focusing on full unswitching. (See
below for details on this).
- New pass doesn't carry state for thresholds between pass iterations.
- New pass doesn't carry state for correctness (both miscompile and
infloop) between pass iterations.
- New pass produces substantially better code after unswitching.
- New pass can handle more trivial unswitch cases.
- New pass doesn't recompute the dominator tree for the entire function
and instead incrementally updates it.
I've ported all of the trivial unswitching test cases from the old pass
to the new one to make sure that major functionality isn't lost in the
process. For several of the test cases I've worked to improve the
precision and rigor of the CHECKs, but for many I've just updated them
to handle the new IR produced.
My initial motivation was the fact that the old pass carried state in
very unreliable ways between pass iterations, and these mechansims were
incompatible with the new pass manager. However, I discovered many more
improvements to make along the way.
This pass makes two very significant assumptions that enable most of these
improvements:
1) Focus on *full* unswitching -- that is, completely removing whatever
control flow construct is being unswitched from the loop. In the case
of trivial unswitching, this means removing the trivial (exiting)
edge. In non-trivial unswitching, this means removing the branch or
switch itself. This is in opposition to *partial* unswitching where
some part of the unswitched control flow remains in the loop. Partial
unswitching only really applies to switches and to folded branches.
These are very similar to full unrolling and partial unrolling. The
full form is an effective canonicalization, the partial form needs
a complex cost model, cannot be iterated, isn't canonicalizing, and
should be a separate pass that runs very late (much like unrolling).
2) Leverage LLVM's Loop machinery to the fullest. The original unswitch
dates from a time when a great deal of LLVM's loop infrastructure was
missing, ineffective, and/or unreliable. As a consequence, a lot of
complexity was added which we no longer need.
With these two overarching principles, I think we can build a fast and
effective unswitcher that fits in well in the new PM and in the
canonicalization pipeline. Some of the remaining functionality around
partial unswitching may not be relevant today (not many test cases or
benchmarks I can find) but if they are I'd like to add support for them
as a separate layer that runs very late in the pipeline.
Purely to make reviewing and introducing this code more manageable, I've
split this into first a trivial-unswitch-only pass and in the next patch
I'll add support for full non-trivial unswitching against a *fixed*
threshold, exactly like full unrolling. I even plan to re-use the
unrolling thresholds, as these are incredibly similar cost tradeoffs:
we're cloning a loop body in order to end up with simplified control
flow. We should only do that when the total growth is reasonably small.
One of the biggest changes with this pass compared to the previous one
is that previously, each individual trivial exiting edge from a switch
was unswitched separately as a branch. Now, we unswitch the entire
switch at once, with cases going to the various destinations. This lets
us unswitch multiple exiting edges in a single operation and also avoids
numerous extremely bad behaviors, where we would introduce 1000s of
branches to test for thousands of possible values, all of which would
take the exact same exit path bypassing the loop. Now we will use
a switch with 1000s of cases that can be efficiently lowered into
a jumptable. This avoids relying on somehow forming a switch out of the
branches or getting horrible code if that fails for any reason.
Another significant change is that this pass actively updates the CFG
based on unswitching. For trivial unswitching, this is actually very
easy because of the definition of loop simplified form. Doing this makes
the code coming out of loop unswitch dramatically more friendly. We
still should run loop-simplifycfg (at the least) after this to clean up,
but it will have to do a lot less work.
Finally, this pass makes much fewer attempts to simplify instructions
based on the unswitch. Something like loop-instsimplify, instcombine, or
GVN can be used to do increasingly powerful simplifications based on the
now dominating predicate. The old simplifications are things that
something like loop-instsimplify should get today or a very, very basic
loop-instcombine could get. Keeping that logic separate is a big
simplifying technique.
Most of the code in this pass that isn't in the old one has to do with
achieving specific goals:
- Updating the dominator tree as we go
- Unswitching all cases in a switch in a single step.
I think it is still shorter than just the trivial unswitching code in
the old pass despite having this functionality.
Differential Revision: https://reviews.llvm.org/D32409
llvm-svn: 301576
Eli Friedman [Thu, 27 Apr 2017 18:39:08 +0000 (18:39 +0000)]
[GlobalOpt] Correctly update metadata when localizing a global.
Just calling dropAllReferences leaves pointers to the ConstantExpr
behind, so we would eventually crash with a null pointer dereference.
Differential Revision: https://reviews.llvm.org/D32551
llvm-svn: 301575
Teresa Johnson [Thu, 27 Apr 2017 18:25:22 +0000 (18:25 +0000)]
Memory intrinsic value profile optimization: Improve debug output (NFC)
Summary:
Misc improvements to debug output. Fix a couple typos and also dump the
value profile before we make any profitability checks.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32607
llvm-svn: 301574
Sean Callanan [Thu, 27 Apr 2017 18:10:29 +0000 (18:10 +0000)]
Added an Importer test for in-class member initializers.
llvm-svn: 301573
Frederich Munch [Thu, 27 Apr 2017 18:05:29 +0000 (18:05 +0000)]
Limit disabling of warnings emitted from r301571 by checking __GNUC__.
llvm-svn: 301572
Frederich Munch [Thu, 27 Apr 2017 17:33:50 +0000 (17:33 +0000)]
Fix warnings from test added in r301562 on Windows (when built without exceptions).
llvm-svn: 301571
Vedant Kumar [Thu, 27 Apr 2017 17:30:58 +0000 (17:30 +0000)]
[Profile] Add off-by-default -Wprofile-instr-missing warning
Clang warns that a profile is out-of-date if it can't find a profile
record for any function in a TU. This warning became noisy after llvm
started allowing dead-stripping of instrumented functions.
To fix this, this patch changes the existing profile out-of-date warning
(-Wprofile-instr-out-of-date) so that it only complains about mismatched
data. Further, it introduces a new, off-by-default warning about missing
function data (-Wprofile-instr-missing).
Differential Revision: https://reviews.llvm.org/D28867
llvm-svn: 301570
Vassil Vassilev [Thu, 27 Apr 2017 17:23:53 +0000 (17:23 +0000)]
Sync with changes from r300825 in clang.
Generate the better include paths. Instead of #include <llvm_header.h> doxygen
produces #include "llvm/Folder/llvm_header.h"
Patch by Yuka Takahashi (D32342)!
llvm-svn: 301569
Argyrios Kyrtzidis [Thu, 27 Apr 2017 17:23:04 +0000 (17:23 +0000)]
[libclang] Enhance clang_Cursor_isDynamicCall and clang_Cursor_getReceiverType to handle ObjC property references
Also enhance clang_Cursor_getReceiverType to handle C++ method calls.
llvm-svn: 301568
Hans Wennborg [Thu, 27 Apr 2017 17:19:07 +0000 (17:19 +0000)]
clang-cl: Alias /d1reportAllClassLayout to -fdump-record-layouts (PR32826)
llvm-svn: 301567
Sanjoy Das [Thu, 27 Apr 2017 17:17:16 +0000 (17:17 +0000)]
Use a pointer type for target frame indices during statepoint lowering
Summary:
The type of the target frame index is intptr, not the type of the value we're
going to store into it. Without this change we crash in the attached test case
when trying to type-legalize a TargetFrameIndex.
Patchpoint lowering types the target frame index as intptr as well.
Reviewers: reames, bogner, arsenm
Subscribers: arsenm, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D32256
llvm-svn: 301566
Peter Collingbourne [Thu, 27 Apr 2017 17:04:05 +0000 (17:04 +0000)]
cmake: Touch $GIT_DIR/logs/HEAD if it does not already exist.
Apparently some git tools (such as "repo") may not create this file.
Patch by Quentin Neill.
llvm-svn: 301565
Hans Wennborg [Thu, 27 Apr 2017 17:02:25 +0000 (17:02 +0000)]
Fix -Wpedantic about extra semicolons in CGStmtOpenMP.cpp
llvm-svn: 301564
Vassil Vassilev [Thu, 27 Apr 2017 16:58:33 +0000 (16:58 +0000)]
Remove leaking UnknownPragmaHandlers right after we are done with them.
The UnknownPragmaHandlers added by DoPrintPreprocessedInput conflict with the
real PragmaHandlers from clang::Parser because they try to handle the same
#pragma directives. This makes it impossible to use a Preprocessor (that was
previously passed to DoPrintPreprocessedInput), as an Preprocessor for a
clang::Parser instance which is what we currently do in cling.
This patch removes the added UnknownPragmaHandler to avoid conflicts these
conflicts and leave the PragmaHandlers of the Preprocessors in a the same state
as before calling DoPrintPreprocessedInput.
Patch by Raphael Isemann (D32486)!
llvm-svn: 301563
Frederich Munch [Thu, 27 Apr 2017 16:55:24 +0000 (16:55 +0000)]
Refactor DynamicLibrary so searching for a symbol will have a defined order and
libraries are properly unloaded when llvm_shutdown is called.
Summary:
This was mostly affecting usage of the JIT, where storing the library handles in
a set made iteration unordered/undefined. This lead to disagreement between the
JIT and native code as to what the address and implementation of particularly on
Windows with stdlib functions:
JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s
JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv
Native: getenv("TEST") -> NULL // called ucrt.dll, getenv
Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows
not giving priority to the process' symbols as it did on Unix.
Reviewers: chapuni, v.g.vassilev, lhames
Reviewed By: lhames
Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits
Differential Revision: https://reviews.llvm.org/D30107
llvm-svn: 301562
Xinliang David Li [Thu, 27 Apr 2017 16:34:00 +0000 (16:34 +0000)]
[PartialInlining]: Improve partial inlining to handle complex conditions
Differential Revision: http://reviews.llvm.org/D32249
llvm-svn: 301561
Tim Northover [Thu, 27 Apr 2017 16:21:50 +0000 (16:21 +0000)]
TSan: update line number after XFAIL on iOS.
llvm-svn: 301560
Chris Bieneman [Thu, 27 Apr 2017 16:13:58 +0000 (16:13 +0000)]
Update GDB remote command regex for IPv6
This updates the regular expression used to match host/port pairs for the gdb-remote command to also match IPv6 addresses.
The IPv6 address matcher is very generic and does not really check for structural validity of the address. It turns out that IPv6 addresses are very complicated.
llvm-svn: 301559
Michael Kruse [Thu, 27 Apr 2017 16:13:03 +0000 (16:13 +0000)]
[CMake] Use object library to build the two flavours of Polly.
Polly comes in two library flavors: One loadable module to use the
LLVM framework -load mechanism, and another one that host applications
can link to. These have very different requirements for Polly's
own dependencies.
The loadable module assumes that all its LLVM dependencies are already
available in the address space of the host application, and is not allowed
to bring in its own copy of any LLVM library (including the NVPTX
backend in case of Polly-ACC).
The non-module library is intended to be linked to using
target_link_libraries. CMake would then resolve all of its dependencies,
including NVPTX and ensure that only a single instance of each library
will be used.
Differential Revision: https://reviews.llvm.org/D32442
llvm-svn: 301558
Zachary Turner [Thu, 27 Apr 2017 16:12:16 +0000 (16:12 +0000)]
[CodeView] Isolate Debug Info Fragments into standalone classes.
Previously parsing of these were all grouped together into a
single master class that could parse any type of debug info
fragment.
With writing forthcoming, the complexity of each individual
fragment is enough to warrant them having their own classes so
that reading and writing of each fragment type can be grouped
together, but isolated from the code for reading and writing
other fragment types.
In doing so, I found a place where parsing code was duplicated
for the FileChecksums fragment, across llvm-readobj and the
CodeView library, and one of the implementations had a bug.
Now that the codepaths are merged, the bug is resolved.
Differential Revision: https://reviews.llvm.org/D32547
llvm-svn: 301557
Zachary Turner [Thu, 27 Apr 2017 16:11:47 +0000 (16:11 +0000)]
[Support] Make BinaryStreamArray extractors stateless.
Instead, we now pass a context memeber through the extraction
process.
llvm-svn: 301556
Zachary Turner [Thu, 27 Apr 2017 16:11:19 +0000 (16:11 +0000)]
Rename some PDB classes.
We have a lot of very similarly named classes related to
dealing with module debug info. This patch has NFC, it just
renames some classes to be more descriptive (albeit slightly
more to type). The mapping from old to new class names is as
follows:
Old | New
ModInfo | DbiModuleDescriptor
ModuleSubstream | ModuleDebugFragment
ModStream | ModuleDebugStream
With the corresponding Builder classes renamed accordingly.
Differential Revision: https://reviews.llvm.org/D32506
llvm-svn: 301555
Sanjay Patel [Thu, 27 Apr 2017 16:10:20 +0000 (16:10 +0000)]
[x86] add minimal tests for potential size-changing vsel transforms; NFC
llvm-svn: 301554
Chris Bieneman [Thu, 27 Apr 2017 16:04:26 +0000 (16:04 +0000)]
[CMake] Abstract Config.h generation for Xcode
This patch abstracts the generation of Config.h and creates a dummy project entry point to allow generation of LLDB's Config header without performing a full CMake configuration.
This will enable the Xcode project to generate LLDB's Config header.
llvm-svn: 301553
Philip Pfaffe [Thu, 27 Apr 2017 16:03:42 +0000 (16:03 +0000)]
[Polly][Cmake] Add missing include paths to exported cmake config
llvm-svn: 301552
Sam Kolton [Thu, 27 Apr 2017 15:42:38 +0000 (15:42 +0000)]
[AMDGPU] DPP: add support for GFX9
Reviewers: artem.tamazov
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
Differential Revision: https://reviews.llvm.org/D32588
llvm-svn: 301551
Alexey Bataev [Thu, 27 Apr 2017 15:10:33 +0000 (15:10 +0000)]
[OPENMP] Add a check for iterator not reached the end of stack, NFC.
Add an extra check for the iterator during checks of the data-sharing
attributes.
llvm-svn: 301549
Argyrios Kyrtzidis [Thu, 27 Apr 2017 15:05:18 +0000 (15:05 +0000)]
[index] Mark the ObjC implicit accessor method definitions as 'dynamic' as well
llvm-svn: 301548
Alexey Bataev [Thu, 27 Apr 2017 14:46:26 +0000 (14:46 +0000)]
[OPENMP] Improve performance of the hasDSA() function, NFC.
Remove some unneccesary code from the function after the fix for ASAN
buildbots.
llvm-svn: 301547
Krzysztof Parzyszek [Thu, 27 Apr 2017 14:38:21 +0000 (14:38 +0000)]
Fix typo and place comment close to its target
Patch by Wei-Ren Chen.
Differential Revision: https://reviews.llvm.org/D32594
llvm-svn: 301546
Aaron Ballman [Thu, 27 Apr 2017 14:33:01 +0000 (14:33 +0000)]
Fixing a malformed RST table to get the documentation bot back to green.
llvm-svn: 301545
Simon Pilgrim [Thu, 27 Apr 2017 14:25:04 +0000 (14:25 +0000)]
Fixed assert message to correctly refer to MRMSrcReg4VOp3Frm/MRMSrcMeg4VOp3Frm.
llvm-svn: 301544
Rafael Espindola [Thu, 27 Apr 2017 14:21:09 +0000 (14:21 +0000)]
Also match the output on 32 bit systems.
llvm-svn: 301543
Alex Lorenz [Thu, 27 Apr 2017 13:47:03 +0000 (13:47 +0000)]
[libclang] Pass in the -fallow-editor-placeholders option
This will suppress any live diagnostics caused by editor placeholders in Xcode.
rdar://
31833579
llvm-svn: 301542
Rafael Espindola [Thu, 27 Apr 2017 13:32:09 +0000 (13:32 +0000)]
Add missing FileCheck, update CHECK lines and avoid subshell.
llvm-svn: 301541
Zoran Jovanovic [Thu, 27 Apr 2017 13:10:48 +0000 (13:10 +0000)]
[mips][microMIPS] Adding code size reduction pass for MicroMIPS
Author: milena.vujosevic.janicic
Reviewers: sdardis
The code implements size reduction pass for MicroMIPS.
Load and store instructions are examined and transformed, if possible.
lw32 instruction is transformed into 16-bit instruction lwsp
sw32 instruction is transformed into 16-bit instruction swsp
Arithmetic instrcutions are examined and transformed, if possible.
addu32 instruction is transformed into 16-bit instruction addu16
subu32 instruction is transformed into 16-bit instruction subu16
Differential Revision: https://reviews.llvm.org/D15144
llvm-svn: 301540
NAKAMURA Takumi [Thu, 27 Apr 2017 13:08:48 +0000 (13:08 +0000)]
clang/test/Modules/malformed-overload.m: Make sure module cache is clean.
llvm-svn: 301539
Martin Probst [Thu, 27 Apr 2017 13:07:24 +0000 (13:07 +0000)]
clang-format: [JS] parse async function declarations.
Summary:
Previously, clang-format would accidentally parse an async function
declaration as a function expression, and thus not insert an unwrapped
line for async functions, causing subsequent functions to run into the
function:
async function f() {
x();
} function g() { ...
With this change, async functions get parsed as top level function
declarations and get their own unwrapped line context.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D32590
llvm-svn: 301538
Nitesh Jain [Thu, 27 Apr 2017 12:27:42 +0000 (12:27 +0000)]
[LLDB][MIPS] Forgot to add check in commit rl301530
Reviewers: ki.stfu, labath
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 301537
Haojian Wu [Thu, 27 Apr 2017 12:22:33 +0000 (12:22 +0000)]
Fix asan failures on OpenMP.
llvm-svn: 301536
Oren Ben Simhon [Thu, 27 Apr 2017 12:01:00 +0000 (12:01 +0000)]
[X86] Support of no_caller_saved_registers attribute
Implements the Clang part for no_caller_saved_registers attribute as appears here:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=
5ed3cc7b66af4758f7849ed6f65f4365be8223be.
Differential Revision: https://reviews.llvm.org/D31871
llvm-svn: 301535
Pavel Labath [Thu, 27 Apr 2017 11:32:25 +0000 (11:32 +0000)]
TCPSocket: add back support for "*" address
before r301492, we could specify "*:1234" as an address to lldb-server
and it would interpret that as "any". I am not sure that's a good idea,
but we have usages of that in the test suite, and without this the
remote test suite fails.
I'm adding that back, as it does not seem it was an intended side-effect
of that change, but I am open to removing it in the future, after
discussion and test suite fixup.
llvm-svn: 301534
Jonas Paulsson [Thu, 27 Apr 2017 11:01:18 +0000 (11:01 +0000)]
[SystemZ] Remove incorrect assert in SystemZTTIImpl
In getCmpSelInstrCost(), CondTy may actually be scalar while ValTy is a
vector when LoopVectorizer is the caller. Therefore the assert that CondTy
must be a vector type if ValTy is was wrong and is now removed.
Review: Ulrich Weigand
llvm-svn: 301533
Alex Lorenz [Thu, 27 Apr 2017 10:43:48 +0000 (10:43 +0000)]
[ObjC] Disallow vector parameters and return values in Objective-C methods
for iOS < 9 and OS X < 10.11 X86 targets
This commit adds a new error that disallows methods that have parameters/return
values with a vector type for some older X86 targets. This diagnostic is
needed because objc_msgSend doesn't support SIMD vector registers/return values
on X86 in iOS < 9 and OS X < 10.11. Note that we don't necessarily know if the
vector argument/return value will use a SIMD register, so instead we chose to
be conservative and prohibit all vector types.
rdar://
21662309
Differential Revision: https://reviews.llvm.org/D28670
llvm-svn: 301532
Diana Picus [Thu, 27 Apr 2017 10:23:30 +0000 (10:23 +0000)]
[ARM] GlobalISel: Fix extended stack operands
Fix a crash when trying to extend a value passed as a sign- or
zero-extended stack parameter. The cause of the crash was that we were
setting the size of the loaded value to 32 bits, and then tyring to
extend again to 32 bits.
This patch addresses the issue by also introducing a G_TRUNC after the
load. This will leave the unused bits to their original values set by
the caller, while being consistent about the types. For values that are
not extended, we just use a smaller load.
llvm-svn: 301531
Nitesh Jain [Thu, 27 Apr 2017 10:21:46 +0000 (10:21 +0000)]
[LLDB][MIPS] Fix TestMiExec.py failure.
Reviewers: ki.stfu, labath
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
Differential Revision: https://reviews.llvm.org/D32340
llvm-svn: 301530
Andrew V. Tischenko [Thu, 27 Apr 2017 10:20:35 +0000 (10:20 +0000)]
2 tests that were lost in rL301390
llvm-svn: 301529
George Rimar [Thu, 27 Apr 2017 10:00:39 +0000 (10:00 +0000)]
[ELF] - Modify testcase because of llvm-dwarfdump dump format change.
llvm-dwarfdump format changed in r301527
llvm-svn: 301528
George Rimar [Thu, 27 Apr 2017 10:00:13 +0000 (10:00 +0000)]
[llvm-dwarfdump] - Change format for .gdb_index dump.
It is useful to output size of ranges when address ranges
section of .gdb_index is dumped.
It helps to compare outputs produced by different linkers,
for example. In that case address ranges can look very different,
when they are the same at fact. Difference comes from different
low address because of different address of .text.
Differential revision: https://reviews.llvm.org/D32492
llvm-svn: 301527
Yaron Keren [Thu, 27 Apr 2017 09:56:39 +0000 (09:56 +0000)]
Constify SourceManager input to MacroInfo::getDefinitionLengthSlow, NFC.
llvm-svn: 301526
Haojian Wu [Thu, 27 Apr 2017 09:20:46 +0000 (09:20 +0000)]
Don't hard-code "modules-cache-path" in the test.
llvm-svn: 301525
Pavel Labath [Thu, 27 Apr 2017 08:49:19 +0000 (08:49 +0000)]
Fix build for clang r301507
LangStandard::lang_opencl -> LangStandard::lang_opencl10
llvm-svn: 301524
Igor Breger [Thu, 27 Apr 2017 08:02:03 +0000 (08:02 +0000)]
[GlobalISel][X86] handle not symmetric G_COPY
Summary: handle not symmetric G_COPY
Reviewers: zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D32420
llvm-svn: 301523
Nick Lewycky [Thu, 27 Apr 2017 07:27:36 +0000 (07:27 +0000)]
In the expression evaluator, visit the index of an ArraySubscriptExpr even if we can't evaluate the base, if the evaluation mode tells us to continue evaluation.
llvm-svn: 301522
Clement Courbet [Thu, 27 Apr 2017 07:22:30 +0000 (07:22 +0000)]
[CodeGen][NFC] Rename 'Src' to 'Val'.
'Src' looks like it was borrowed from memcpy, 'Val' makes more sense for
memset and is consistent with naming within the function.
Differential Revision: https://reviews.llvm.org/D32580
llvm-svn: 301521
Nick Lewycky [Thu, 27 Apr 2017 07:11:09 +0000 (07:11 +0000)]
In the expression evaluator, descend into both the true and false expressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation mode that says we should continue evaluating.
llvm-svn: 301520
Hongbin Zheng [Thu, 27 Apr 2017 06:42:14 +0000 (06:42 +0000)]
[Polly] Do not introduce address space cast
Do not introduce address space cast in IslNodeBuilder::preloadUnconditionally.
Differential Revision: https://reviews.llvm.org/D32581
llvm-svn: 301519
Sanjoy Das [Thu, 27 Apr 2017 06:02:18 +0000 (06:02 +0000)]
Use accessors for ValueHandleBase::V; NFC
This changes code that touches ValueHandleBase::V to go through
getValPtr and (newly added) setValPtr. This functionality will be
used later, but also seemed like a generally good cleanup.
I also renamed the field to Val, but that's just to make it obvious
that I fixed all the uses.
llvm-svn: 301518
Craig Topper [Thu, 27 Apr 2017 05:48:29 +0000 (05:48 +0000)]
[Metadata] Fix typos in comments. NFC
llvm-svn: 301517
Craig Topper [Thu, 27 Apr 2017 04:51:25 +0000 (04:51 +0000)]
[InstCombine] Use APInt bit counting methods to avoid a temporary APInt. NFC
llvm-svn: 301516
Rui Ueyama [Thu, 27 Apr 2017 04:50:08 +0000 (04:50 +0000)]
Recommend users use readelf instead of objdump to dump .comment contents.
readelf's output is much easier to read than objdump's as you can see below.
$ readelf --string-dump .comment foo
String dump of section '.comment':
[ 1] GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
[ 2c] clang version 5.0.0
[ 41] Linker: LLD 5.0.0
$ objdump -j .comment -s foo
Contents of section .comment:
0000
00474343 3a202855 62756e74 7520342e .GCC: (Ubuntu 4.
0010
382e342d 32756275 6e747531 7e31342e 8.4-2ubuntu1~14.
0020
30342e33 2920342e 382e3400 636c616e 04.3) 4.8.4.clan
0030
67207665 7273696f 6e20352e 302e3020 g version 5.0.0
0040
004c696e 6b65723a 204c4c44 20352e30 .Linker: LLD 5.0
0050 2e3000 .0.
llvm-svn: 301515
Rui Ueyama [Thu, 27 Apr 2017 04:01:36 +0000 (04:01 +0000)]
Simplify BinaryFile::parse and add comments.
llvm-svn: 301514
Rui Ueyama [Thu, 27 Apr 2017 04:01:14 +0000 (04:01 +0000)]
Remove needless type conversions.
llvm-svn: 301513
Rui Ueyama [Thu, 27 Apr 2017 03:45:33 +0000 (03:45 +0000)]
Make StringSaver::save less ambiguous.
Previously, an expression such as Saver.save(std::string("foo") + "bar")
didn't compile because there is an ambiguity as to whether the argument
is of const Twine& or StringRef.
llvm-svn: 301512
Konstantin Zhuravlyov [Thu, 27 Apr 2017 03:22:44 +0000 (03:22 +0000)]
AMDGPU: Fix assert in scheduler
Assert is triggered if DBG_VALUE is first instruction in BB
Differential Revision: https://reviews.llvm.org/D32572
llvm-svn: 301511
Ahmed Bougacha [Thu, 27 Apr 2017 02:09:44 +0000 (02:09 +0000)]
[Support] Fix overflow in SLEB128 decoding.
decodeULEB128 was fixed in r216268, but decodeSLEB128 always had the
same issue, which is now exposed in r301369.
llvm-svn: 301510
Ahmed Bougacha [Thu, 27 Apr 2017 02:09:42 +0000 (02:09 +0000)]
[Support] clang-format LEB128.h. NFC.
llvm-svn: 301509
Duncan P. N. Exon Smith [Thu, 27 Apr 2017 01:47:22 +0000 (01:47 +0000)]
Darwin: Define __STDC_NO_THREADS__ on Darwin targets
Darwin doesn't support C11 threads.h. Define `__STDC_NO_THREADS__` so
that users can check for it.
rdar://problem/
18461003
llvm-svn: 301508
Richard Smith [Thu, 27 Apr 2017 01:17:05 +0000 (01:17 +0000)]
Improve diagnostics for bad -std= flag.
Don't list deprecated -std= values (c++0x etc). Only produce one line of output
per standard, even if we know it by multiple names.
In passing, add missing -std=gnu++03 alias (supported by GCC), and add new
spelling '-std=cl1.0' for OpenCL 1.0 for consistency with the other values,
with the same meaning as the preexisting '-std=cl'.
llvm-svn: 301507
Chris Bieneman [Thu, 27 Apr 2017 00:47:19 +0000 (00:47 +0000)]
One more try at the whole compiling thing...
Need to actually use the right type in both parts of the cast.
llvm-svn: 301506
Chandler Carruth [Thu, 27 Apr 2017 00:28:03 +0000 (00:28 +0000)]
Disable GVN Hoist due to still more bugs being found in it. There is
also a discussion about exactly what we should do prior to re-enabling
it.
The current bug is http://llvm.org/PR32821 and the discussion about this
is in the review thread for r300200.
llvm-svn: 301505
Chris Bieneman [Thu, 27 Apr 2017 00:23:41 +0000 (00:23 +0000)]
One more attempt to fix the broken bots.
llvm-svn: 301504
NAKAMURA Takumi [Thu, 27 Apr 2017 00:09:42 +0000 (00:09 +0000)]
clang/Lex/PPCallbacks.h: Fix a warning in r301472. [-Wdocumentation]
llvm-svn: 301503
Chris Bieneman [Thu, 27 Apr 2017 00:03:27 +0000 (00:03 +0000)]
Fix Windows bots broken by r301492
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/8644/
llvm-svn: 301502