Sylvestre Ledru [Sun, 5 Mar 2017 07:46:24 +0000 (07:46 +0000)]
Revert commit r296967, no typo
llvm-svn: 296984
Craig Topper [Sun, 5 Mar 2017 01:08:19 +0000 (01:08 +0000)]
[SimplifyCFG] Use APInt::operator| instead of APInt::Or. NFC
I'm looking to improve operator| to support rvalue references and may remove APInt::Or.
llvm-svn: 296982
Craig Topper [Sun, 5 Mar 2017 01:08:16 +0000 (01:08 +0000)]
[DAGCombine] Use APInt::operator|(uint64_t) instead of creating a temporary APInt and calling APInt::Or. NFC
This is more efficient by itself. But this is prep for a future patch that may remove APInt::Or while making operator| support rvalue references similar to add/sub.
llvm-svn: 296981
John McCall [Sat, 4 Mar 2017 21:46:14 +0000 (21:46 +0000)]
GCC workaround: use explicit qualification to avoid injected class name.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52625
llvm-svn: 296980
John McCall [Sat, 4 Mar 2017 21:26:29 +0000 (21:26 +0000)]
Refactor ConstantInitBuilder to allow other frontends to more
easily extend the aggregate-builder API. Stupid missing language
features.
Also add APIs for constructing a relative reference and computing
the offset of a position from the start of the initializer.
llvm-svn: 296979
Sanjay Patel [Sat, 4 Mar 2017 20:35:19 +0000 (20:35 +0000)]
[x86] don't require a zext when forming ADC/SBB
The larger goal is to move the ADC/SBB transforms currently in
combineX86SetCC() to combineAddOrSubToADCOrSBB() because we're
creating ADC/SBB in lots of places where we shouldn't.
This was intended to be an NFC change, but avx-512 has something
strange going on. It doesn't seem like any of the affected tests
should really be using SET+TEST or ADC; a simple ADD could replace
several instructions. But that's another bug...
llvm-svn: 296978
Sanjay Patel [Sat, 4 Mar 2017 19:18:09 +0000 (19:18 +0000)]
[DAGCombiner] allow transforming (select Cond, C +/- 1, C) to (add(ext Cond), C)
select Cond, C +/- 1, C --> add(ext Cond), C -- with a target hook.
This is part of the ongoing process to obsolete D24480. The motivation is to
canonicalize to select IR in InstCombine whenever possible, so we need to have a way to
undo that easily in codegen.
PowerPC is an obvious winner for this kind of transform because it has fast and complete
bit-twiddling abilities but generally lousy conditional execution perf (although this might
have changed in recent implementations).
x86 also sees some wins, but the effect is limited because these transforms already mostly
exist in its target-specific combineSelectOfTwoConstants(). The fact that we see any x86
changes just shows that that code is a mess of special-case holes. We may be able to remove
some of that logic now.
My guess is that other targets will want to enable this hook for most cases. The likely
follow-ups would be to add value type and/or the constants themselves as parameters for the
hook. As the tests in select_const.ll show, we can transform any select-of-constants to
math/logic, but the general transform for any 2 constants needs one more instruction
(multiply or 'and').
ARM is one target that I think may not want this for most cases. I see infinite loops there
because it wants to use selects to enable conditionally executed instructions.
Differential Revision: https://reviews.llvm.org/D30537
llvm-svn: 296977
Zachary Turner [Sat, 4 Mar 2017 18:53:09 +0000 (18:53 +0000)]
Try to fix thread name truncation on non-Windows.
llvm-svn: 296976
Argyrios Kyrtzidis [Sat, 4 Mar 2017 17:54:56 +0000 (17:54 +0000)]
[index] C++: Improve handling of typedefs as base names in C++ class declarations
Report the typedef as reference, and desugar it to report the underlying class as an
implicit 'base' reference.
Reporting the underlying base class for 'base' relations matches the ObjC handling and
leads to a simpler model.
llvm-svn: 296975
Argyrios Kyrtzidis [Sat, 4 Mar 2017 17:54:53 +0000 (17:54 +0000)]
[index] ObjC: Improve handling of typedefs as base names in ObjC interface declarations
- Report the typedef reference occurrence
- Mark super or protocol references as 'implicit' when they come from a typedef.
llvm-svn: 296974
Kamil Rytarowski [Sat, 4 Mar 2017 17:42:46 +0000 (17:42 +0000)]
Improve the Threading code on NetBSD
Do not include <sys/user.h> on NetBSD. It's dead file and will be removed.
No need to include <sys/sysctl.h> in this code context on NetBSD.
llvm-svn: 296973
Zachary Turner [Sat, 4 Mar 2017 16:42:25 +0000 (16:42 +0000)]
Truncate thread names if they're too long.
llvm-svn: 296972
Daniel Berlin [Sat, 4 Mar 2017 14:08:47 +0000 (14:08 +0000)]
DebugCounter: Initialize skip to 0, not -1
llvm-svn: 296971
Sylvestre Ledru [Sat, 4 Mar 2017 14:06:26 +0000 (14:06 +0000)]
Replaced UserNullMacros with NullMacros in modernize-use-nullptr check docs
By patch Peter Goldsborough on https://github.com/llvm-mirror/clang-tools-extra/pull/14
See https://github.com/llvm-mirror/clang-tools-extra/blob/
2cd835ee5bcd6c4944d7e30826668ec38db40b38/clang-tidy/modernize/UseNullptrCheck.cpp#L466
llvm-svn: 296970
Sylvestre Ledru [Sat, 4 Mar 2017 14:01:38 +0000 (14:01 +0000)]
Fix a typo. Patch by fcrick on github https://github.com/llvm-mirror/llvm/pull/23
llvm-svn: 296969
Sylvestre Ledru [Sat, 4 Mar 2017 14:00:44 +0000 (14:00 +0000)]
Remove redundant code block and update comment.
By patch zoren here: https://github.com/llvm-mirror/llvm/pull/20
llvm-svn: 296968
Sylvestre Ledru [Sat, 4 Mar 2017 13:56:11 +0000 (13:56 +0000)]
Fix a typo. Thanks to huangml. Reported here: https://github.com/llvm-mirror/llvm/pull/6
llvm-svn: 296967
Simon Pilgrim [Sat, 4 Mar 2017 12:50:47 +0000 (12:50 +0000)]
[X86][SSE] Enable post-legalize vXi64 shuffle combining on 32-bit targets
Long ago (2010 according to svn blame), combineShuffle probably needed to prevent the accidental creation of illegal i64 types but there doesn't appear to be any combines that can cause this any more as they all have their own legality checks.
Differential Revision: https://reviews.llvm.org/D30213
llvm-svn: 296966
Eric Fiselier [Sat, 4 Mar 2017 12:28:12 +0000 (12:28 +0000)]
Fix nonsense comment
llvm-svn: 296965
Florian Hahn [Sat, 4 Mar 2017 12:00:35 +0000 (12:00 +0000)]
[legalize-types] Remove stale entries from SoftenedFloats.
Summary:
When replacing a SDValue, we should remove the replaced value from
SoftenedFloats (and possibly the other maps as well?).
When we revisit a Node because it needs analyzing again, we have to
remove all result values from SoftenedFloats (and possibly other maps?).
This fixes the fp128 test failures with expensive checks for X86.
I think we probably should also remove the values from the other maps
(PromotedIntegers and so on), let me know what you think.
Reviewers: baldrick, bogner, davidxl, ab, arsenm, pirama, chh, RKSimon
Reviewed By: chh
Subscribers: danalbert, wdng, srhines, hfinkel, sepavloff, llvm-commits
Differential Revision: https://reviews.llvm.org/D29265
llvm-svn: 296964
Sean Callanan [Sat, 4 Mar 2017 08:05:54 +0000 (08:05 +0000)]
Project file fixes after movement of Data* and removal of ThisThread.cpp
llvm-svn: 296963
Evgeny Stupachenko [Sat, 4 Mar 2017 05:20:02 +0000 (05:20 +0000)]
Add test missed in r296770.
Differential Revision: http://reviews.llvm.org/D27004
From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 296962
Daniel Berlin [Sat, 4 Mar 2017 03:23:41 +0000 (03:23 +0000)]
Fix bug in bisect-skip-count not using passed-in arguments
llvm-svn: 296961
Eric Fiselier [Sat, 4 Mar 2017 03:23:15 +0000 (03:23 +0000)]
Fully Reformat fallback_malloc.cpp
This patch fully reformats fallback_malloc.cpp. Previously the test
was a mess of different styles and indentations. This made it very
hard to work in and read. Therefore I felt it was best to re-format
the whole thing.
Unfortuantly this means some history will be lost, but hopefully
much of it will still be accessible after ignoring whitespace changes.
llvm-svn: 296960
Evgeny Stupachenko [Sat, 4 Mar 2017 03:14:05 +0000 (03:14 +0000)]
Set option enabling LSR alternative way to resolve complex solution to false.
Differential Revision: http://reviews.llvm.org/D29862
From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 296959
Richard Trieu [Sat, 4 Mar 2017 03:04:15 +0000 (03:04 +0000)]
[ODRHash] Try again to fix build bot.
llvm-svn: 296958
Eric Fiselier [Sat, 4 Mar 2017 03:03:27 +0000 (03:03 +0000)]
Add missing UNSUPPORTED for -fno-exception mode
llvm-svn: 296957
Richard Trieu [Sat, 4 Mar 2017 02:42:41 +0000 (02:42 +0000)]
Handle null QualType better in Stmt::Profile
If the QualType is null, calling ASTContext::getCanonicalType on it will lead
to an assert. This was found while testing a new use for Stmt::Profile, so
there is no test case for this.
llvm-svn: 296956
Eric Fiselier [Sat, 4 Mar 2017 02:29:25 +0000 (02:29 +0000)]
Attempt to suppress test failures on OS X
llvm-svn: 296955
Eric Fiselier [Sat, 4 Mar 2017 02:15:37 +0000 (02:15 +0000)]
Fix CMake configuration errors on OS X
llvm-svn: 296954
Richard Trieu [Sat, 4 Mar 2017 02:05:13 +0000 (02:05 +0000)]
[ODRHash] Change test to try to appease buildbot.
llvm-svn: 296953
Eric Fiselier [Sat, 4 Mar 2017 02:04:45 +0000 (02:04 +0000)]
[libcxxabi] Fix alignment of allocated exceptions in 32 bit builds
Summary:
In 32 bit builds on a 64 bit system `std::malloc` does not return correctly aligned memory. This leads to undefined behavior.
This patch switches to using `posix_memalign` to allocate correctly aligned memory instead.
Reviewers: mclow.lists, danalbert, jroelofs, compnerd
Reviewed By: compnerd
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25417
llvm-svn: 296952
Sean Callanan [Sat, 4 Mar 2017 01:48:43 +0000 (01:48 +0000)]
Disable the lldb-mi tests on remote platforms.
Currently on remote platforms the lldb-mi tests fail, which means they time out.
Given how many of the lldb-mi tests there are, this means a long wait.
llvm-svn: 296951
Matthias Braun [Sat, 4 Mar 2017 01:40:40 +0000 (01:40 +0000)]
X86ISelLowering: Only perform copy elision on legal types.
This fixes cases where i1 types were not properly legalized yet and lead
to the creating of 0-sized stack slots.
This fixes http://llvm.org/PR32136
llvm-svn: 296950
Peter Collingbourne [Sat, 4 Mar 2017 01:38:05 +0000 (01:38 +0000)]
Fix build.
llvm-svn: 296949
Peter Collingbourne [Sat, 4 Mar 2017 01:34:53 +0000 (01:34 +0000)]
WholeProgramDevirt: Implement exporting for uniform ret val opt.
Differential Revision: https://reviews.llvm.org/D29846
llvm-svn: 296948
Zachary Turner [Sat, 4 Mar 2017 01:31:29 +0000 (01:31 +0000)]
Fix a bug in the dep analysis script.
It wasn't always normalizing slashes correctly, so you'd end
up with the same thing in the map twice.
llvm-svn: 296947
Zachary Turner [Sat, 4 Mar 2017 01:31:06 +0000 (01:31 +0000)]
Delete LLDB's code for getting / setting thread name.
This is now functionality in LLVM, and all callers have
already been updated to use the LLVM functions.
llvm-svn: 296946
Peter Collingbourne [Sat, 4 Mar 2017 01:31:01 +0000 (01:31 +0000)]
WholeProgramDevirt: Implement exporting for single-impl devirtualization.
Differential Revision: https://reviews.llvm.org/D29811
llvm-svn: 296945
Zachary Turner [Sat, 4 Mar 2017 01:30:38 +0000 (01:30 +0000)]
Add dependency on DynamicLoaderStatic to Utility.
llvm-svn: 296944
Zachary Turner [Sat, 4 Mar 2017 01:30:05 +0000 (01:30 +0000)]
Move DataBuffer / DataExtractor and friends from Core -> Utility.
llvm-svn: 296943
Eric Fiselier [Sat, 4 Mar 2017 01:29:51 +0000 (01:29 +0000)]
teach LIT how to detect the glibc version
llvm-svn: 296942
Zachary Turner [Sat, 4 Mar 2017 01:28:55 +0000 (01:28 +0000)]
Move UUID from Core -> Utility.
llvm-svn: 296941
Eric Fiselier [Sat, 4 Mar 2017 01:26:41 +0000 (01:26 +0000)]
Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cpp
llvm-svn: 296940
Peter Collingbourne [Sat, 4 Mar 2017 01:23:30 +0000 (01:23 +0000)]
WholeProgramDevirt: Add any unsuccessful llvm.type.checked.load devirtualizations to the list of llvm.type.test users.
Any unsuccessful llvm.type.checked.load devirtualizations will be translated
into uses of llvm.type.test, so we need to add the resulting llvm.type.test
intrinsics to the function summaries so that the LowerTypeTests pass will
export them.
Differential Revision: https://reviews.llvm.org/D29808
llvm-svn: 296939
Jim Ingham [Sat, 4 Mar 2017 01:15:24 +0000 (01:15 +0000)]
Fix the macOS build all the way after r296909.
llvm-svn: 296938
Laszlo Nagy [Sat, 4 Mar 2017 01:08:05 +0000 (01:08 +0000)]
[scan-build-py] create decorator for compiler wrapper methods
Differential Revision: https://reviews.llvm.org/D29260
llvm-svn: 296937
Eric Fiselier [Sat, 4 Mar 2017 01:02:35 +0000 (01:02 +0000)]
Turn on -Wunused-function and cleanup occurances
llvm-svn: 296936
Daniel Berlin [Sat, 4 Mar 2017 00:44:43 +0000 (00:44 +0000)]
NewGVN: Be consistent in what order we compare operands for swapping.
NFC.
llvm-svn: 296935
Eli Friedman [Sat, 4 Mar 2017 00:42:55 +0000 (00:42 +0000)]
[MISched] Remove unused arguments. NFC.
llvm-svn: 296934
Sanjay Patel [Sat, 4 Mar 2017 00:18:31 +0000 (00:18 +0000)]
[x86] check for commuted add pattern to find ADC/SBB
llvm-svn: 296933
Richard Trieu [Sat, 4 Mar 2017 00:08:58 +0000 (00:08 +0000)]
[ODRHash] Add support for detecting different method properties.
Now print diagnostics for static, virtual, inline, volatile, and const
differences in methods. Also use DeclarationName instead of IdentifierInfo
for additional robustness in diagnostic printing.
llvm-svn: 296932
Sanjay Patel [Sat, 4 Mar 2017 00:06:37 +0000 (00:06 +0000)]
[x86] add test to show failed recognition of commuted pattern; NFC
llvm-svn: 296931
Zachary Turner [Fri, 3 Mar 2017 23:52:09 +0000 (23:52 +0000)]
Fix DataExtractor failures.
Some code that doesn't get compiled on Windows had some references
that needed updating, and I missed those.
llvm-svn: 296930
Pirama Arumuga Nainar [Fri, 3 Mar 2017 23:48:15 +0000 (23:48 +0000)]
Restrict test arch-specific-libdir.c to Linux
Summary: This fails on Windows due to dependence on path separators.
Reviewers: rnk, srhines
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30595
llvm-svn: 296929
Matthias Braun [Fri, 3 Mar 2017 23:27:20 +0000 (23:27 +0000)]
RegAllocGreedy: Follow-up to r296722
We can now end up in situations where we initiate LiveIntervalUnion
queries with different SubRanges against the same register unit, so the
assert() no longer holds in all cases. Just recalculate now when we know
the cache is out of date.
llvm-svn: 296928
Pirama Arumuga Nainar [Fri, 3 Mar 2017 23:20:49 +0000 (23:20 +0000)]
Add arch-specific directory to search path
Summary:
This change adds an arch-specific subdirectory in <ResourceDir>/lib/<OS>
to the linker search path. This path also gets added as '-rpath' for
native compilation if a runtime is linked in as a shared object. This
allows arch-specific libraries to be installed alongside clang.
Reviewers: danalbert, cbergstrom, javed.absar
Subscribers: srhines
Differential Revision: https://reviews.llvm.org/D30015
llvm-svn: 296927
Hans Wennborg [Fri, 3 Mar 2017 23:19:31 +0000 (23:19 +0000)]
Revert r296865 "[ARM] fpscr read/write intrinsics not aware of each other"
It caused PR32134: "Cannot select: intrinsic %llvm.arm.get.fpscr".
llvm-svn: 296926
Tim Hammerquist [Fri, 3 Mar 2017 23:17:29 +0000 (23:17 +0000)]
Fix Darwin failures introduced in r296909
llvm-svn: 296925
Sean Callanan [Fri, 3 Mar 2017 23:13:30 +0000 (23:13 +0000)]
Fixed repo.py to not send git errors to stderr.
Some repos are not git repos, so git is expected
to fail. These errors should not go to stderr,
because Xcode interprets them as failures.
llvm-svn: 296924
Tim Northover [Fri, 3 Mar 2017 23:05:47 +0000 (23:05 +0000)]
GlobalISel: constrain G_INSERT to inserting just one value per instruction.
It's much easier to reason about single-value inserts and no-one was actually
using the variadic variants before.
llvm-svn: 296923
Eric Fiselier [Fri, 3 Mar 2017 22:47:45 +0000 (22:47 +0000)]
Remove the buildit and testit scripts; they haven't been supported in years
llvm-svn: 296922
Tim Northover [Fri, 3 Mar 2017 22:46:09 +0000 (22:46 +0000)]
GlobalISel: add merge/unmerge nodes for legalization.
These are simplified variants of the current G_SEQUENCE and G_EXTRACT, which
assume the individual parts will be contiguous, homogeneous, and occupy the
entirity of the larger register. This makes reasoning about them much easer
since you only have to look at the first register being merged and the result
to know what the instruction is doing.
I intend to gradually replace all uses of the more complicated sequence/extract
with these (or single-element insert/extracts), and then remove the older
variants. For now we start with legalization.
llvm-svn: 296921
Zachary Turner [Fri, 3 Mar 2017 22:40:46 +0000 (22:40 +0000)]
Add a script to dump out all project inter-dependencies.
llvm-svn: 296920
Eric Fiselier [Fri, 3 Mar 2017 22:35:58 +0000 (22:35 +0000)]
Fix hash requirements check in __hash_table.
r296565 attempted to add better diagnostics when an unordered container
is instantiated with a hash that doesn't meet the Hash requirements.
However I mistakenly checked the wrong set of requirements. Specifically
it checked if the hash met the requirements for specializations of
std::hash. However these requirements are stricter than the generic
Hash requirements.
This patch fixes the assertions to only check the Hash requirements.
llvm-svn: 296919
Sanjay Patel [Fri, 3 Mar 2017 22:35:11 +0000 (22:35 +0000)]
[x86] refactor combineAddOrSubToADCOrSBB(); NFCI
The comments were wrong, and this is not an obvious transform.
This hopefully makes it clearer that we're missing the commuted
patterns for adds. It's less clear that this is actually a good
transform for all micro-arch.
This is prep work for trying to clean up the current adc/sbb
codegen because it's definitely not happening optimally.
llvm-svn: 296918
Krzysztof Parzyszek [Fri, 3 Mar 2017 22:21:02 +0000 (22:21 +0000)]
Silence a warning, NFC
llvm-svn: 296917
Rong Xu [Fri, 3 Mar 2017 21:56:34 +0000 (21:56 +0000)]
[PGO] Text format profile reader needs to clear the value profile
Summary:
Reset the ValueData for each function to avoid using the ones in
the previous function.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits, xur
Differential Revision: https://reviews.llvm.org/D30479
llvm-svn: 296916
Krzysztof Parzyszek [Fri, 3 Mar 2017 21:53:12 +0000 (21:53 +0000)]
Detect the existence of pthread_{s,g}etname_np in libpthread on Linux
Older Linux distributions may not have those functions.
llvm-svn: 296915
Zachary Turner [Fri, 3 Mar 2017 21:49:38 +0000 (21:49 +0000)]
Fix Threading path when LLVM_ENABLE_THREADS=0.
llvm-svn: 296914
Mehdi Amini [Fri, 3 Mar 2017 21:28:05 +0000 (21:28 +0000)]
un-Xfail Fuzzer test that decided to pass on Green Dragon
It may be flacky, I'll turn it into unsupported if it fails again.
llvm-svn: 296913
Peter Collingbourne [Fri, 3 Mar 2017 21:22:06 +0000 (21:22 +0000)]
MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI.
llvm-svn: 296912
Chris Bieneman [Fri, 3 Mar 2017 21:11:55 +0000 (21:11 +0000)]
[ObjectYAML] [DWARF] Abstract DWARF Initial Length values
In the DWARF 4 Spec section 7.2.2, data in many DWARF sections, and some DWARF structures start with "Initial Length Values", which are a 32-bit length, and an optional 64-bit length if the 32 bit value == UINT32_MAX.
This patch abstracts the Initial Length type in YAML, and extends its use to all the DWARF structures that are supported in the DWARFYAML code that have Initial Length values.
llvm-svn: 296911
Zachary Turner [Fri, 3 Mar 2017 20:57:05 +0000 (20:57 +0000)]
Isolate Target-specific functionality of DataExtractor.
In an effort to move the various DataBuffer / DataExtractor
classes from Core -> Utility, we have to separate the low-level
functionality from the higher level functionality. Only a
few functions required anything other than reading/writing
raw bytes, so those functions are separated out into a
more appropriate area. Specifically, Dump() and DumpHexBytes()
are moved into free functions in Core/DumpDataExtractor.cpp,
and GetGNUEHPointer is moved into a static function in the
only file that it's referenced from.
Differential Revision: https://reviews.llvm.org/D30560
llvm-svn: 296910
Zachary Turner [Fri, 3 Mar 2017 20:56:28 +0000 (20:56 +0000)]
Move Log from Core -> Utility.
All references to Host and Core have been removed, so this
class can now safely be lowered into Utility.
Differential Revision: https://reviews.llvm.org/D30559
llvm-svn: 296909
Sanjay Patel [Fri, 3 Mar 2017 20:48:54 +0000 (20:48 +0000)]
[x86] regenerate checks; NFC
llvm-svn: 296908
Peter Collingbourne [Fri, 3 Mar 2017 20:25:30 +0000 (20:25 +0000)]
LTO: Hash the set of imported symbols for each module.
This set may affect code generation and is sensitive to link order (and
possibly in the future to the linker's choice of prevailing symbol), so we
need to include it.
Differential Revision: https://reviews.llvm.org/D30586
llvm-svn: 296907
Zachary Turner [Fri, 3 Mar 2017 20:21:59 +0000 (20:21 +0000)]
[Windows] Remove the #include <eh.h> hack.
Prior to MSVC 2015 we had to manually include this header any
time we were going to include <thread> or <future> due to a
bug in MSVC's STL implementation. This has been fixed in MSVC
for some time now, and we require VS 2015 minimum, so we can
remove this across all subprojects.
llvm-svn: 296906
Matthias Braun [Fri, 3 Mar 2017 19:05:34 +0000 (19:05 +0000)]
RegisterCoalescer: Simplify subrange splitting code; NFC
- Use slightly better variable names / compute in a more direct way.
llvm-svn: 296905
Zachary Turner [Fri, 3 Mar 2017 18:55:24 +0000 (18:55 +0000)]
Teach lit to expand glob expressions.
This will enable removing hacks throughout the codebase
in clang and compiler-rt that feed multiple inputs to a
testing utility by globbing, all of which are either disabled
on Windows currently or using xargs / find hacks.
Differential Revision: https://reviews.llvm.org/D30380
llvm-svn: 296904
Sanjoy Das [Fri, 3 Mar 2017 18:53:09 +0000 (18:53 +0000)]
Fix a compiler warning
llvm-svn: 296903
Zachary Turner [Fri, 3 Mar 2017 18:38:22 +0000 (18:38 +0000)]
Add missing #includes for FreeBSD.
llvm-svn: 296902
Krzysztof Parzyszek [Fri, 3 Mar 2017 18:30:54 +0000 (18:30 +0000)]
Make TargetInstrInfo::isPredicable take a const reference, NFC
llvm-svn: 296901
Mike Aizatsky [Fri, 3 Mar 2017 18:22:20 +0000 (18:22 +0000)]
[sancov] better input parameters validation
Differential Revision: https://reviews.llvm.org/D30370
llvm-svn: 296900
Zachary Turner [Fri, 3 Mar 2017 18:21:04 +0000 (18:21 +0000)]
Try again to appease the FreeBSD bot.
The actual logic was wrong, not just the type conversion.
This should get it correct.
llvm-svn: 296899
Sanjoy Das [Fri, 3 Mar 2017 18:19:15 +0000 (18:19 +0000)]
[LoopUnrolling] Peel loops with invariant backedge Phi input
Summary:
If a loop contains a Phi node which has an invariant input from back
edge, it is profitable to peel such loops (rather than unroll them) to
use the advantage that this Phi is always invariant starting from 2nd
iteration. After the 1st iteration is peeled, other optimizations can
potentially simplify calculations with this invariant.
Patch by Max Kazantsev!
Reviewers: sanjoy, apilipenko, igor-laevsky, anna, mkuper, reames
Reviewed By: mkuper
Subscribers: mkuper, mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D30161
llvm-svn: 296898
Sanjoy Das [Fri, 3 Mar 2017 18:19:10 +0000 (18:19 +0000)]
[LoopUnrolling] Re-prioritize Peeling and Partial unrolling
Summary:
In current implementation the loop peeling happens after trip-count based partial unrolling and may
sometimes not happen at all due to it (for example, if trip count is known, but UP.Partial = false). This
is generally bad, the more than there are some situations where peeling is profitable even if the partial
unrolling is disabled.
This patch is a NFC which reorders peeling and partial unrolling application and prepares the code for
implementation of the said optimizations.
Patch by Max Kazantsev!
Reviewers: sanjoy, anna, reames, apilipenko, igor-laevsky, mkuper
Reviewed By: mkuper
Subscribers: mkuper, llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D30243
llvm-svn: 296897
Dominic Chen [Fri, 3 Mar 2017 18:02:02 +0000 (18:02 +0000)]
Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.
Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin
Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits
Differential Revision: https://reviews.llvm.org/D30373
llvm-svn: 296895
Sanjay Patel [Fri, 3 Mar 2017 17:58:39 +0000 (17:58 +0000)]
[x86] clean up materializeSBB(); NFCI
This is producing SBB where it is obviously not necessary, so it needs to be limited.
llvm-svn: 296894
Zachary Turner [Fri, 3 Mar 2017 17:56:14 +0000 (17:56 +0000)]
Try to appease the FreeBSD bots.
pthread_self() returns a pthread_t, but we were setting it to
an int. It seems the cast to int when calling sysctl is still
the correct thing to do, though.
llvm-svn: 296892
Zachary Turner [Fri, 3 Mar 2017 17:39:24 +0000 (17:39 +0000)]
Don't bring in llvm/Support/thread.h in Threading.cpp
Doing so defines the type llvm::thread. On FreeBSD, we need
to call a macro which references its own ::thread type, which
causes an ambiguity due to ADL when inside of the llvm namespace.
Since we don't even need this unless LLVM_ENABLE_THREADS == 1,
we don't even need this type anyway, as it is always equal to
std::thread, so we can just use that directly.
llvm-svn: 296891
Zachary Turner [Fri, 3 Mar 2017 17:24:55 +0000 (17:24 +0000)]
Add #include for unistd.h on Linux.
llvm-svn: 296890
Mehdi Amini [Fri, 3 Mar 2017 17:24:29 +0000 (17:24 +0000)]
Fix libc++ test to pass in C++03 mode
Was hitting: "error: scalar initializer cannot be empty"
llvm-svn: 296889
Piotr Padlewski [Fri, 3 Mar 2017 17:16:11 +0000 (17:16 +0000)]
[clang-tidy] Yet another docs fixes
llvm-svn: 296888
Zachary Turner [Fri, 3 Mar 2017 17:15:17 +0000 (17:15 +0000)]
[Support] Provide access to current thread name/thread id.
Applications often need the current thread id when making
system calls, and some operating systems provide the notion
of a thread name, which can be useful in enabling better
diagnostics when debugging or logging.
This patch adds an accessor for the thread id, and "best effort"
getters and setters for the thread name. Since this is
non critical functionality, no error is returned to indicate
that a platform doesn't support thread names.
Differential Revision: https://reviews.llvm.org/D30526
llvm-svn: 296887
Simon Pilgrim [Fri, 3 Mar 2017 17:03:52 +0000 (17:03 +0000)]
Use APInt::setBits instead of OR'ing in a separate APInt::getBitsSet call
llvm-svn: 296886
Pavel Labath [Fri, 3 Mar 2017 17:03:46 +0000 (17:03 +0000)]
Android.rules: fix building on mac
realpath is not available as an executable on mac. I give up, I am just
going to leave the path with ..'s in it.
llvm-svn: 296885
Aleksei Sidorin [Fri, 3 Mar 2017 16:58:53 +0000 (16:58 +0000)]
[Analyzer] Terminate analysis on OpenMP code instead of assertion crash
* ExprEngine assumes that OpenMP statements should never appear in CFG.
However, current CFG doesn't know anything about OpenMP and passes
such statements as CFG nodes causing "UNREACHABLE executed!" crashes.
Since there is no OpenMP implementation in ExprEngine or CFG,
we stop the analysis on OpenMP statements to avoid crashes.
This fixes PR31835.
Differential Revision: https://reviews.llvm.org/D30565
llvm-svn: 296884
Sanjay Patel [Fri, 3 Mar 2017 16:58:51 +0000 (16:58 +0000)]
[x86] regenerate checks; NFC
llvm-svn: 296883
Simon Pilgrim [Fri, 3 Mar 2017 16:56:33 +0000 (16:56 +0000)]
Use APInt::getLowBitsSet instead of APInt::getBitsSet for lower bit mask creation
llvm-svn: 296882