Tim Northover [Mon, 29 Jun 2015 21:42:16 +0000 (21:42 +0000)]
ARM: add correct kill flags when combining stm instructions
When the store sequence being combined actually stores the base register, we
should not mark it as killed until the end.
rdar://
21504262
llvm-svn: 241003
Matthias Braun [Mon, 29 Jun 2015 21:35:51 +0000 (21:35 +0000)]
X86: Rework inline asm integer register specification.
This is a new version of http://reviews.llvm.org/D10260.
It turned out that when you specify an integer register in inline asm on
x86 you get the register of the required type size back. That means that
X86TargetLowering::getRegForInlineAsmConstraint() has to accept any of
the integer registers and adapt its size to the given target size which
may be any 8/16/32/64 bit sized type. Surprisingly that means given a
constraint of "{ax}" and a type of MVT::F32 we need to return X86::EAX.
This change makes this face explicit, the previous code seemed like
working by accident because there it never returned an error once a
register was found. On the other hand this rewrite allows to actually
return errors for invalid situations like requesting an integer register
for an i128 type.
Related to rdar://
21042280
Differential Revision: http://reviews.llvm.org/D10813
llvm-svn: 241002
Chandler Carruth [Mon, 29 Jun 2015 21:35:48 +0000 (21:35 +0000)]
[opt] Devirtualize the SymbolBody type hierarchy and start compacting
its members into the base class.
First, to help motivate this kind of change, understand that in
a self-link, LLD creates 5.5 million defined regular symbol bodies (and
6 million symbol bodies total). A significant portion of its time is
spent allocating the memory for these symbols, and befor ethis patch
the defined regular symbol body objects alone consumed some 420mb of
memory during the self link.
As a consequence, I think it is worth expending considerable effort to
make these objects as memory efficient as possible. This is the first of
several components of that. This change starts with the goal of removing
the virtual functins from SymbolBody so that it can avoid having a vptr
embedded in it when it already contains a "kind" member, and that member
can be much more compact than a vptr.
The primary way of doing this is to sink as much of the logic that we
would have to dispatch for into data in the base class. As part of this,
I made the various flags bits that will pack into a bitfield with the
kind tag. I also sank the Name down to eliminate the dispatch for that,
and used LLVM's RTTI-style dispatch for everything else (most of which
is cold and so doesn't matter terribly if we get minutely worse lowering
than a vtable dispatch).
As I was doing this, I wanted to make the RTTI-dispatch (which would
become much hotter than before) as efficient as possible, so I've
re-organized the tags somewhat. Notably, the common case (regular
defined symbols) is now zero which we can test for faster.
I also needed to rewrite the comparison routine used during resolving
symbols. This proved to be quite complex as the semantics of the
existing one were very subtle due to the back-and-forth virtual dispatch
caused by re-dispatching with reversed operands. I've consolidated it to
a single function and tried to comment it quite a bit more to help
explain what is going on. However, this may need more comments or other
explanations. It at least passes all the regression tests. I'm not
working on Windows, so I can't fully test it.
With all of these changes, the size of a DefinedRegular symbol on
a 64-bit build goes from 80 bytes to 64 bytes, and we save approximately
84mb or 20% of the memory consumed by these symbol bodies during the
link.
The link time appears marginally faster as well, and the profile hotness
of the memory allocation subsystem got a bit better, but there is still
a lot of allocation traffic.
Differential Revision: http://reviews.llvm.org/D10792
llvm-svn: 241001
Chandler Carruth [Mon, 29 Jun 2015 21:32:37 +0000 (21:32 +0000)]
[cleanup] Clean up the flow of creating a symbol body for regular symbols.
This uses a single cast and test to get the section for the symbol, and
uses the cast_or_null<> pattern throughout to handle the known type but
unknown non-null-ness.
No functionality changed.
Differential Revision: http://reviews.llvm.org/D10791
llvm-svn: 241000
Alexey Samsonov [Mon, 29 Jun 2015 21:30:14 +0000 (21:30 +0000)]
[LoopSimplify] Set proper debug location in loop backedge blocks.
Set debug location for terminator instruction in loop backedge block
(which is an unconditional jump to loop header). We can't copy debug
location from original backedges, as there can be several of them,
with different debug info locations. So, we follow the approach of
SplitBlockPredecessors, and copy the debug info from first non-PHI
instruction in the header (i.e. destination block).
This is yet another change for PR23837.
llvm-svn: 240999
Sanjoy Das [Mon, 29 Jun 2015 21:27:36 +0000 (21:27 +0000)]
[FaultMaps] Fix test case.
implicit-null-check-negative.ll had a missing 2>&1. Fix this, and
remove an incorrect test case that this exposes.
llvm-svn: 240998
Rafael Espindola [Mon, 29 Jun 2015 21:26:07 +0000 (21:26 +0000)]
Update for llvm api change.
llvm-svn: 240997
Rafael Espindola [Mon, 29 Jun 2015 21:24:55 +0000 (21:24 +0000)]
Convert obj->getSymbolName to sym->getName.
I doesn't depend on the object anymore.
llvm-svn: 240996
Chandler Carruth [Mon, 29 Jun 2015 21:12:49 +0000 (21:12 +0000)]
[opt] Replace the recursive walk for GC with a worklist algorithm.
This flattens the entire liveness walk from a recursive mark approach to
a worklist approach. It also sinks the worklist management completely
out of the SectionChunk and into the Writer by exposing the ability to
iterato over children of a chunk and over the symbol bodies of relocated
symbols. I'm not 100% happy with the API names, so suggestions welcome
there.
This allows us to use a single worklist for the entire recursive walk
and would also be a natural place to take advantage of parallelism at
some future point.
With this, we completely inline away the GC walk into the
Writer::markLive function and it makes it very easy to profile what is
slow. Currently, time is being wasted checking whether a Chunk isa
SectionChunk (it essentially always is), finding (or skipping)
a replacement for a symbol, and chasing pointers between symbols and
their chunks. There are a bunch of things we can do to fix this, and its
easier to do them after this change IMO.
This change alone saves 1-2% of the time for my self-link of lld.exe
(which I'm running and benchmarking on Linux ironically).
Perhaps more notably, we'll no longer blow out the stack for large
links. =]
Just as an FYI, at this point, I/O is starting to really dominate the
profile. Well over 10% of the time appears to be inside the kernel doing
page table silliness. I think a decent chunk of this can be nuked as
well, but it's a little odd as cross-linking in this way isn't really
the primary goal here.
Differential Revision: http://reviews.llvm.org/D10790
llvm-svn: 240995
Eric Christopher [Mon, 29 Jun 2015 21:00:05 +0000 (21:00 +0000)]
Add support for the x86 builtin __builtin_cpu_supports.
This matches the implementation of the gcc support for the same
feature, including checking the values set up by libgcc at runtime.
The structure looks like this:
unsigned int __cpu_vendor;
unsigned int __cpu_type;
unsigned int __cpu_subtype;
unsigned int __cpu_features[1];
with a set of enums to match various fields that are field out after
parsing the output of the cpuid instruction.
This also adds a set of errors checking for valid input (and cpu).
compiler-rt support for this and the other builtins in this family
(__builtin_cpu_init and __builtin_cpu_is) are forthcoming.
llvm-svn: 240994
Greg Clayton [Mon, 29 Jun 2015 20:42:28 +0000 (20:42 +0000)]
Make sure that SharingPtr.h appears in the LLDB.framework by making it a public header in the LLDB framework target.
This fixes test issues with building lldb/test/api/multithreaded and a few other tests that build against the LLDB.framework in our build directory.
llvm-svn: 240993
Evgeniy Stepanov [Mon, 29 Jun 2015 20:28:55 +0000 (20:28 +0000)]
[asan] Fix SanitizerCommon.PthreadDestructorIterations test on Android L.
On Android L, TSD destructors run 8 times instead of 4.
Back to 4 times on the current master branch (as well as on K).
llvm-svn: 240992
Pawel Bylica [Mon, 29 Jun 2015 20:28:47 +0000 (20:28 +0000)]
[DAGCombiner] Fix & simplify constant folding of sext/zext.
Summary: This patch fixes the cases of sext/zext constant folding in DAG combiner where constans do not fit 64 bits. The fix simply removes un$
Test Plan: New regression test included.
Reviewers: RKSimon
Reviewed By: RKSimon
Subscribers: RKSimon, llvm-commits
Differential Revision: http://reviews.llvm.org/D10607
llvm-svn: 240991
Benjamin Kramer [Mon, 29 Jun 2015 20:21:55 +0000 (20:21 +0000)]
[MMI] Use TinyPtrVector instead of PointerUnion with vector.
Also simplify duplicated code a bit. No functionality change intended.
llvm-svn: 240990
David Majnemer [Mon, 29 Jun 2015 20:13:23 +0000 (20:13 +0000)]
[CodeGen] Remove atomic sugar from record types in isSafeToConvert
We failed to see that we should have deferred the creation of a type
which references a type currently under construction because of atomic
sugar.
This fixes PR23985.
llvm-svn: 240989
Greg Clayton [Mon, 29 Jun 2015 20:08:51 +0000 (20:08 +0000)]
More packet reduction when debugging with GDB server.
- Avoid sending the qfThreadInfo, qsThreadInfo packets if we have a stop reply packet with the threads already (save 2 round trip packets)
- Include the qname, qserial and qkind in the JSON info
- Report the qname, qserial and qkind to the thread so it can cache it to avoid many packets on MacOSX and iOS
- Don't clear all discoverable settings when we exec, just the ones we need to saves 1-5 packets for each exec.
llvm-svn: 240988
Diego Novillo [Mon, 29 Jun 2015 20:03:46 +0000 (20:03 +0000)]
Tidy comment.
llvm-svn: 240987
Michael Kruse [Mon, 29 Jun 2015 19:57:59 +0000 (19:57 +0000)]
[Polly] Add -std=c99 flag only to C source files
Summary: Adding the flag to C++ source files emits a warning, hence we set the compile flag depending on the file's language.
Reviewers: grosser
Subscribers: Meinersbur, pollydev, llvm-commits
Projects: #polly
Differential Revision: http://reviews.llvm.org/D10809
llvm-svn: 240986
Jonathan Peyton [Mon, 29 Jun 2015 19:22:12 +0000 (19:22 +0000)]
Remove _KMP_BUILD_TIME macro from kmp_version.c
At the suggestion of Chandler Carruth, I've removed the timestamp macro,
_KMP_BUILD_TIME, that cmake currently sets to "No_Timestamp" and replaced it with standard
__DATE__ and __TIME__ macros inside kmp_version.c.
llvm-svn: 240985
Douglas Katzman [Mon, 29 Jun 2015 19:12:56 +0000 (19:12 +0000)]
More range-based for loops. NFC
llvm-svn: 240984
Chaoren Lin [Mon, 29 Jun 2015 19:07:35 +0000 (19:07 +0000)]
Rewrite FileSpec::EnumerateDirectory to avoid code duplication.
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10811
llvm-svn: 240983
Chandler Carruth [Mon, 29 Jun 2015 18:50:11 +0000 (18:50 +0000)]
[opt] Hoist the call throuh SymbolBody::getReplacement out of the inline
method to get a SymbolBody and into the callers, and kill now dead
includes.
This removes the need to have the SymbolBody definition when we're
defining the inline method and makes it a better inline method. That was
the only reason for a lot of header includes here. Removing these and
using forward declarations actually uncovers a bunch of cross-header
dependencies that I've fixed while I'm here, and will allow me to
introduce some *important* inline code into Chunks.h that requires the
definition of ObjectFile.
No functionality changed at this point.
Differential Revision: http://reviews.llvm.org/D10789
llvm-svn: 240982
Dan Liew [Mon, 29 Jun 2015 18:45:56 +0000 (18:45 +0000)]
Fix bug #23967. The gtest and gtest_main targets were exported into the
CMake files and should not be by both build systems and also the targets
were also installed by the CMake build system which they should not be.
The problem was that
- the CMake build of LLVM installs and exports the gtest library
targets. We should not being doing this, these are not part of LLVM.
- the Autoconf/Makefile build of LLVM still had gtest libraries in the
installed LLVMConfig.cmake.
These problems would cause problems for an external project because when
calling llvm_map_components_to_libnames(XXX all) ${XXX} would to contain
LLVM's internal gtest libraries.
llvm-svn: 240981
Douglas Katzman [Mon, 29 Jun 2015 18:42:16 +0000 (18:42 +0000)]
Comment fixes. NFC.
- Hexagon options were physically next to to ones that had a
preceding comment saying "Double dash options", which they aren't.
- The 'ld' tool classes are named Linker, not Link.
llvm-svn: 240980
Greg Clayton [Mon, 29 Jun 2015 18:42:02 +0000 (18:42 +0000)]
Fix buildbot failures for:
http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/6152
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/7422
llvm-svn: 240979
Greg Clayton [Mon, 29 Jun 2015 18:29:00 +0000 (18:29 +0000)]
Avoid a recursive function call that could run LLDB out of file descriptors in FileSystem::DeleteDirectory(...).
Fixes include:
- use FileSystem::Unlink() instead of a direct call to ::unlink(...) when deleting files when iterating through the current directory
- save directories from current directory in a list and iterate through those _after_ the current directory has been iterated
- Use new FileSpec::ForEachItemInDirectory() instead of manually iterating across directories with opendir()/readdir()/closedir()
We should switch all code over to using FileSpec::ForEachItemInDirectory(...) in the near future and get rid of FileSpec::EnumerateDirectory().
This is a follow up patch to:
http://reviews.llvm.org/D10787
llvm-svn: 240978
Douglas Gregor [Mon, 29 Jun 2015 18:15:31 +0000 (18:15 +0000)]
Fix a test case broken by my previous commit.
llvm-svn: 240977
Douglas Gregor [Mon, 29 Jun 2015 18:11:42 +0000 (18:11 +0000)]
Make __has_feature(nullability) and __has_extension(nullability) always true.
These are _Underbar_capital-prefixed additions to the language that
shouldn't depend on language standard.
llvm-svn: 240976
Evgeniy Stepanov [Mon, 29 Jun 2015 18:05:31 +0000 (18:05 +0000)]
[asan] Re-enable clang_gcc_abi test at higher opt levels.
PR23971 is fixed.
llvm-svn: 240975
Serge Pavlov [Mon, 29 Jun 2015 17:50:19 +0000 (17:50 +0000)]
Instantiation of local class members.
If a function containing a local class is instantiated, instantiate
all of local class member, including default arguments and exception
specifications.
This change fixes PR21332 and thus implements DR1484.
Differential Revision: http://reviews.llvm.org/D9990
llvm-svn: 240974
Duncan P. N. Exon Smith [Mon, 29 Jun 2015 17:43:26 +0000 (17:43 +0000)]
Simplify .gitignore: projects/* => projects/*/
Avoid listing inclusions (like `!projects/LLVMBuild.txt`) for files
directly underneath `projects/` in `.gitignore`. Instead, change the
`projects/*` exclusion to the more specific `projects/*/`.
llvm-svn: 240973
Jonathan Peyton [Mon, 29 Jun 2015 17:33:03 +0000 (17:33 +0000)]
Remove use of assignment to multiple struct fields using .fieldname (OMPT)
Remove use of assignment to multiple struct fields using .fieldname syntax.
This doesn't work with gcc 4.8 and earlier. Replace with elementwise field assignments.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D10798
llvm-svn: 240972
David Blaikie [Mon, 29 Jun 2015 17:29:50 +0000 (17:29 +0000)]
Account for calling convention specifiers in function definitions in IR test cases
Several tests wouldn't pass when executed on an armv7a_pc_linux triple
due to the non-default arm_aapcs calling convention produced on the
function definitions in the IR output. Account for this with the
application of a little regex.
Patch by Ying Yi.
llvm-svn: 240971
Jonathan Peyton [Mon, 29 Jun 2015 17:28:57 +0000 (17:28 +0000)]
Fix OMPT state maintenance for barriers and missing init of implicit task id.
Fix OMPT support for barriers so that state changes occur even if OMPT_TRACE turned off.
These state changes are needed by performance tools that use callbacks for either
ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end. Change ifdef flag to OMPT_BLAME
for callbacks ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end rather than
OMPT_TRACE -- they were misclassified. Without this patch, when the runtime is compiled with
LIBOMP_OMPT_SUPPORT=true, LIBOMP_OMPT_BLAME=true, and LIBOMP_OMPT_TRACE=false, and a callback
is registered for either ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end, then an
assertion will trip. Fix the scoping of one OMPT_TRACE ifdef, which should not have surrounded
an update of an OMPT state. Add a missing initialization of an OMPT task id for an implicit task.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D10759
llvm-svn: 240970
Douglas Gregor [Mon, 29 Jun 2015 17:25:49 +0000 (17:25 +0000)]
Make __has_extension(assume_nonnull) always true.
llvm-svn: 240969
Ben Langmuir [Mon, 29 Jun 2015 17:09:24 +0000 (17:09 +0000)]
[Modules] Test lock file removed on signal
For r240967.
rdar://problem/
21512307
llvm-svn: 240968
Ben Langmuir [Mon, 29 Jun 2015 17:08:41 +0000 (17:08 +0000)]
Clean up unique lock files on signal and always release the lock
Make sure to remove the unique lock file, which is what the .lock
symlink points to, if there is a signal while the lock is held. This
will release the lock, since the symlink will point to nothing (already
tested in unit tests). For good measure, also clean up the unique lock
file if there is an error or signal before the lock is acquired.
I will add a clang test.
rdar://problem/
21512307
llvm-svn: 240967
Alex Lorenz [Mon, 29 Jun 2015 16:57:06 +0000 (16:57 +0000)]
MIR Serialization: Serialize the register mask machine operands.
This commit implements serialization of the register mask machine
operands. This commit serializes only the call preserved register
masks that are defined by a target, it doesn't serialize arbitrary
register masks.
This commit also extends the TargetRegisterInfo class and TableGen so that
the users of TRI can get the list of all the call preserved register masks and
their names.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10673
llvm-svn: 240966
Dmitry Vyukov [Mon, 29 Jun 2015 16:31:10 +0000 (16:31 +0000)]
sanitizer_common: fix and re-enable signal_segv_handler test
struct sigaction was not initialized. As the result if SA_RESETHAND is set in sa_flags, then the handler is reset after first invocation leading to crash.
Initialize struct sigaction to zero.
Reviewed in http://reviews.llvm.org/D10803
llvm-svn: 240965
Tamas Berghammer [Mon, 29 Jun 2015 16:28:37 +0000 (16:28 +0000)]
Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 240964
Adrian Prantl [Mon, 29 Jun 2015 16:14:36 +0000 (16:14 +0000)]
Remove unnecessary include.
llvm-svn: 240963
Tamas Berghammer [Mon, 29 Jun 2015 16:12:03 +0000 (16:12 +0000)]
Mark AttachResumeTestCase as flaky
llvm-svn: 240962
Benjamin Kramer [Mon, 29 Jun 2015 16:05:00 +0000 (16:05 +0000)]
[SymbolSize] Skip sorting by index, just assign by index.
No functional change intended.
llvm-svn: 240961
Alexander Potapenko [Mon, 29 Jun 2015 15:58:16 +0000 (15:58 +0000)]
[libsanitizer] Replace ReadBinaryName() with ReadBinaryNameCached(),
which caches the executable name upon the first invocation.
This is necessary because Google Chrome (and potentially other programs)
restrict the access to /proc/self/exe on linux.
This change should fix https://code.google.com/p/chromium/issues/detail?id=502974
llvm-svn: 240960
Birunthan Mohanathas [Mon, 29 Jun 2015 15:30:42 +0000 (15:30 +0000)]
clang-format: Add option to break after definition return type for top-level functions only
Differential Revision: http://reviews.llvm.org/D10774
llvm-svn: 240959
Ed Maste [Mon, 29 Jun 2015 15:26:45 +0000 (15:26 +0000)]
Correct failure decorator in test_fd_leak_multitarget
The random module in Python 2.7.8 and later leaks /dev/[u]random into
children. The test is expected to fail, not be flakey.
This will be fixed in Python 2.7.10 for some operating systems, but not
all e.g. OS X 10.4.
llvm.org/pr23983
bugs.freebsd.org/197376
bugs.python.org/issue23458
llvm-svn: 240958
Birunthan Mohanathas [Mon, 29 Jun 2015 15:18:58 +0000 (15:18 +0000)]
clang-format: Adjust Mozilla style defaults
Summary: This makes the Mozilla style defaults more compliant with the Mozilla style guide. A few options were removed in order to use the LLVM style defaults.
Differential Revision: http://reviews.llvm.org/D10771
llvm-svn: 240957
Benjamin Kramer [Mon, 29 Jun 2015 15:18:48 +0000 (15:18 +0000)]
Upgrade JIT listeners for changes in the libObject API.
llvm-svn: 240956
Tobias Grosser [Mon, 29 Jun 2015 14:44:22 +0000 (14:44 +0000)]
Add first support to delinearize A[t%2][i][j]
This is very preliminary support, but it seems to work for the most common case.
When observing more/different test cases, we can work on generalizing this.
llvm-svn: 240955
Tobias Grosser [Mon, 29 Jun 2015 14:44:17 +0000 (14:44 +0000)]
Fix delinearization after it's move to ScalarEvoltion
llvm-svn: 240954
Rui Ueyama [Mon, 29 Jun 2015 14:43:07 +0000 (14:43 +0000)]
COFF: Handle mangled entry symbol name.
Compilers recognize "main" function and don't mangle its name.
But if you use a different function as a user-defined entry name,
and if you didn't define that function with extern C, your entry
point function name is mangled. And the linker has to be able to
find that. This is relatively rare but can happen.
llvm-svn: 240953
Tobias Grosser [Mon, 29 Jun 2015 14:42:48 +0000 (14:42 +0000)]
Move delinearization from SCEVAddRecExpr to ScalarEvolution
The expressions we delinearize do not necessarily have to have a SCEVAddRecExpr
at the outermost level. At this moment, the additional flexibility is not
exploited in LLVM itself, but in Polly we will soon soonish use this
functionality. For LLVM, this change should not affect existing functionality
(which is covered by test/Analysis/Delinearization/)
llvm-svn: 240952
Rafael Espindola [Mon, 29 Jun 2015 14:39:30 +0000 (14:39 +0000)]
Update for llvm api change.
llvm-svn: 240951
Rafael Espindola [Mon, 29 Jun 2015 14:39:25 +0000 (14:39 +0000)]
Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.
This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.
llvm-svn: 240950
Dmitry Vyukov [Mon, 29 Jun 2015 14:38:31 +0000 (14:38 +0000)]
tsan: implement suppressions for top frame only
The new suppression type is called "race_top" and is matched only against top frame in report stacks.
This is required for situations when we want to suppress a race in a "thread pool" or "event loop" implementation.
If we simply use "race:ThreadPool::Execute" suppression, that can suppress everything in the program.
Reviewed in http://reviews.llvm.org/D10686
llvm-svn: 240949
Rui Ueyama [Mon, 29 Jun 2015 14:27:12 +0000 (14:27 +0000)]
COFF: Create an empty file for /pdb.
Most build system depends on existence or time stamp of a file.
This patch is to create an empty file for /pdb:<filename> option
just to satisfy some build rules.
llvm-svn: 240948
Rui Ueyama [Mon, 29 Jun 2015 14:27:10 +0000 (14:27 +0000)]
COFF: Fix /export.
Mangled dllexported symbols may be defined in a library.
If that's the case, we have to read a member file from the library.
llvm-svn: 240947
Pavel Labath [Mon, 29 Jun 2015 14:16:51 +0000 (14:16 +0000)]
dosep.py: Add ability to set default test timout based on target
Summary:
Current default is 10 minutes, which causes the test suite to run very long in
case of test timeouts. On local linux, each test completes in under 90 seconds in the
slowest configuration (debug build of lldb, using debug clang to build
inferiors). I am changing the default to 4m on local targets, while retaining
the 10m timeout for remote ones.
Reviewers: sivachandra, vharron
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10527
llvm-svn: 240946
Rafael Espindola [Mon, 29 Jun 2015 14:12:14 +0000 (14:12 +0000)]
Add a testcase for an invalid file.
We were already checking this, but had no tests.
llvm-svn: 240945
Rafael Espindola [Mon, 29 Jun 2015 14:02:24 +0000 (14:02 +0000)]
Convert an assert that can fail into error checking.
llvm-svn: 240944
Dmitry Vyukov [Mon, 29 Jun 2015 13:56:31 +0000 (13:56 +0000)]
tsan: fix flaky test
See the comment for explanation.
llvm-svn: 240943
Pavel Labath [Mon, 29 Jun 2015 13:51:49 +0000 (13:51 +0000)]
Ignore the .svn directory when building swig wrappers (bug #23917)
llvm-svn: 240942
Asaf Badouh [Mon, 29 Jun 2015 12:51:53 +0000 (12:51 +0000)]
[x86][AVX512CD] Add conflict and lzcnt intrinsics in their 512bit versions
include tests
review
http://reviews.llvm.org/D10795
llvm-svn: 240941
Rafael Espindola [Mon, 29 Jun 2015 12:38:35 +0000 (12:38 +0000)]
Update for llvm change.
llvm-svn: 240940
Rafael Espindola [Mon, 29 Jun 2015 12:38:31 +0000 (12:38 +0000)]
Remove Elf_Sym_Iter.
It was a fairly broken concept for an ELF only class.
An ELF file can have two symbol tables, but they have exactly the same
format. There is no concept of a dynamic or a static symbol. Storing this
on the iterator also makes us do more work per symbol than necessary. To fetch
a name we would:
* Find if we had a static or a dynamic symbol.
* Look at the corresponding symbol table and find the string table section.
* Look at the string table section to fetch its contents.
* Compute the name as a substring of the string table.
All but the last step can be done per symbol table instead of per symbol. This
is a step in that direction.
llvm-svn: 240939
Daniel Marjamaki [Mon, 29 Jun 2015 12:18:11 +0000 (12:18 +0000)]
[clang-tidy] Fix false positives in the macro parentheses checker
Summary:
There were false positives in C++ code where macro argument was a type.
Reviewers: alexfh
Differential Revision: http://reviews.llvm.org/D10801
llvm-svn: 240938
Asaf Badouh [Mon, 29 Jun 2015 12:16:40 +0000 (12:16 +0000)]
[X86][AVX512BW] Add more intrinsics support:
Blend, abs, packs, adds, subs, avg, max, min, permute.
all the intrinsics are covered by tests
review:
http://reviews.llvm.org/D10799
llvm-svn: 240937
Elena Demikhovsky [Mon, 29 Jun 2015 12:14:24 +0000 (12:14 +0000)]
AVX-512: all forms of SCATTER instruction on SKX,
encoding, intrinsics and tests.
llvm-svn: 240936
Pavel Labath [Mon, 29 Jun 2015 11:03:21 +0000 (11:03 +0000)]
Add Support for LLVM_INSTALL_TOOLCHAIN_ONLY (bug #23784)
Support for LLVM_INSTALL_TOOLCHAIN_ONLY is modeled on same functionality
from LLVM and Clang CMake files.
Patch by: Eugene Zelenko
llvm-svn: 240935
Daniel Jasper [Mon, 29 Jun 2015 10:42:59 +0000 (10:42 +0000)]
clang-format: Don't indent relative to unary operators (some more).
Before:
long
aaaaaaaa = !aaaa( // break
aaaaaa);
long
aaaaaaaa = !aa.aa( // break
aaaaaa);
After:
long
aaaaaaaa = !aaaa( // break
aaaaaa);
long
aaaaaaaa = !aa.aa( // break
aaaaaa);
llvm-svn: 240934
Pavel Labath [Mon, 29 Jun 2015 10:30:06 +0000 (10:30 +0000)]
fix lldb-server linking on RHEL 6 (bug #23774)
Patch by: Eugene Zelenko
llvm-svn: 240933
Javed Absar [Mon, 29 Jun 2015 09:53:33 +0000 (09:53 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd
removing default label in switch as it results.
This is part of earlier commit http://reviews.llvm.org/D1064
Subscribers: llvm-commits
llvm-svn: 240932
Igor Breger [Mon, 29 Jun 2015 09:48:56 +0000 (09:48 +0000)]
This is a comment-only change to test commit access
llvm-svn: 240931
Javed Absar [Mon, 29 Jun 2015 09:32:29 +0000 (09:32 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd
Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16.
These are related to half-precision floating-point and single precision.
Reviewers: rengolin, ranjeet.singh
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10645
llvm-svn: 240930
Javed Absar [Mon, 29 Jun 2015 09:30:19 +0000 (09:30 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd
Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16.
These are related to half-precision floating-point and single precision.
Reviewers: rengolin, ranjeet.singh
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10764
llvm-svn: 240929
Elena Demikhovsky [Mon, 29 Jun 2015 09:20:57 +0000 (09:20 +0000)]
AVX-512: Implemented AVX-512 FMA intrinsics and tests.
by Igor Breger
http://reviews.llvm.org/D10797
llvm-svn: 240928
Pavel Labath [Mon, 29 Jun 2015 09:18:17 +0000 (09:18 +0000)]
[linux] Use cmake to detect support process_vm_readv (bug #23918)
Summary:
Some old linux versions do not have process_vm_readv function defined. Even older versions do not
have even the __NR_process_vm_readv syscall number. We use cmake to detect these situations and
fallback appropriately: in the first case, we can issue the syscall manually, while it the latter
case, we need to drop fast memory read support completely.
Test Plan: linux test suite passes
Reviewers: ovyalov, Eugene.Zelenko
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10727
llvm-svn: 240927
Igor Breger [Mon, 29 Jun 2015 09:10:00 +0000 (09:10 +0000)]
AVX-512: Implemented missing encoding and intrinsics for FMA instructions
Added tests for DAG lowering ,encoding and intrinsics
Differential Revision: http://reviews.llvm.org/D10796
llvm-svn: 240926
NAKAMURA Takumi [Mon, 29 Jun 2015 04:50:09 +0000 (04:50 +0000)]
Whitespace.
llvm-svn: 240924
Frederic Riss [Mon, 29 Jun 2015 04:41:58 +0000 (04:41 +0000)]
Delete unused variables.
llvm-svn: 240923
Rui Ueyama [Mon, 29 Jun 2015 01:03:53 +0000 (01:03 +0000)]
COFF: Fix logic to find default entry name or subsystem.
The previous logic to find default entry name or subsystem does not
seem correct (i.e. was not compatible with MSVC linker). Previously,
default entry name was inferred from CRT functions and user-defined
entry functions. Subsystem was inferred from CRT functions.
Default entry name and subsystem are now inferred based on the
following table. Note that we no longer use CRT functions to infer
them.
Entry name Subsystem
main mainCRTStartup console
wmain wmainCRTStartup console
WinMain WinMainCRTStartup windows
wWinMain wWinMainCRTStartup windows
llvm-svn: 240922
David Majnemer [Mon, 29 Jun 2015 00:06:50 +0000 (00:06 +0000)]
[MS ABI] Unify constant and non-constant member pointer conversion
We had two separate paths for member pointer conversion: one which
takes a constant and another which takes an arbitrary value. In the
latter case, we are permitted to construct arbitrary instructions.
It turns out that the bulk of the member pointer conversion is sharable
if we construct an artificial IRBuilder.
llvm-svn: 240921
NAKAMURA Takumi [Sun, 28 Jun 2015 23:14:35 +0000 (23:14 +0000)]
Revert r240872, "Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix later."
This has been fixed since r240912.
llvm-svn: 240920
Rui Ueyama [Sun, 28 Jun 2015 22:16:41 +0000 (22:16 +0000)]
COFF: Allow mangled symbols as arguments for /export.
Usually dllexported symbols are defined with 'extern "C"',
so identifying them is easy. We can just do hash table lookup
to look up exported symbols.
However, C++ non-member functions are also allowed to be exported,
and they can be specified with unmangled name. So, if /export:foo
is given, we need to look up not only "foo" but also its all
mangled names. In MSVC mangling scheme, that means that we need to
look up any symbol which starts with "?foo@@Y".
In this patch, we scan the entire symbol table to search for
a mangled symbol. The symbol table is a DenseMap, and that doesn't
support table lookup by string prefix. This is of course very
inefficient. But that should be probably OK because the user
should always add 'extern "C"' to dllexported symbols.
llvm-svn: 240919
Rui Ueyama [Sun, 28 Jun 2015 22:06:53 +0000 (22:06 +0000)]
COFF: Fix flaky test.
This test was flaky because stdout and stderr can be mixed.
llvm-svn: 240918
Rui Ueyama [Sun, 28 Jun 2015 20:34:09 +0000 (20:34 +0000)]
COFF: Undefined weak aliases are not fatal if /force is given.
llvm-svn: 240917
Rui Ueyama [Sun, 28 Jun 2015 20:07:08 +0000 (20:07 +0000)]
COFF: Add a comment.
llvm-svn: 240916
Rui Ueyama [Sun, 28 Jun 2015 19:56:30 +0000 (19:56 +0000)]
COFF: Add /noentry flag.
This option is sometimes used to create a resource-only DLL that
doesn't need any initialization.
llvm-svn: 240915
Rui Ueyama [Sun, 28 Jun 2015 19:38:10 +0000 (19:38 +0000)]
Fix broken test.
llvm-svn: 240914
Rui Ueyama [Sun, 28 Jun 2015 19:35:15 +0000 (19:35 +0000)]
COFF: Support /force flag.
This option is to ignore remaining undefined symbols and force
the linker to create an output file anyways.
The existing code assumes that there's no undefined symbol after
reportRemainingUndefines(). That assumption is legitimate.
I also don't want to mess up the existing code for this minor feature.
In order to keep it as is, remaining undefined symbols are replaced
with dummy defined symbols.
llvm-svn: 240913
Jingyue Wu [Sun, 28 Jun 2015 18:30:36 +0000 (18:30 +0000)]
[PPC] fixes typos in builtins-ppc-p8vector.c
The extra ] causes %{{[0-9]]*}} to match only %<single digit> such as %1.
llvm-svn: 240912
Matt Arsenault [Sun, 28 Jun 2015 18:16:14 +0000 (18:16 +0000)]
AMDGPU/SI: Fix extra space when printing v_div_fmas_*
llvm-svn: 240911
Jingyue Wu [Sun, 28 Jun 2015 17:45:05 +0000 (17:45 +0000)]
[SLSR] S's basis must have the same type as S
llvm-svn: 240910
Birunthan Mohanathas [Sun, 28 Jun 2015 14:52:34 +0000 (14:52 +0000)]
clang-format: Stop old options from overriding new options
Summary: Depends on D10785.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D10786
llvm-svn: 240909
Birunthan Mohanathas [Sun, 28 Jun 2015 14:52:01 +0000 (14:52 +0000)]
clang-format: Add missing members to FormatStyle::operator==
Summary: Depends on D10784.
Reviewers: djasper
Reviewed By: djasper
Subscribers: dblaikie, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D10785
llvm-svn: 240908
Birunthan Mohanathas [Sun, 28 Jun 2015 14:51:17 +0000 (14:51 +0000)]
clang-format: Alphabetize FormatStyle members
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D10784
llvm-svn: 240907
Asaf Badouh [Sun, 28 Jun 2015 14:30:39 +0000 (14:30 +0000)]
[x86][AVX512]
Add vscalef support
include encoding and intrinsics
review:
http://reviews.llvm.org/D10730
llvm-svn: 240906
Elena Demikhovsky [Sun, 28 Jun 2015 10:53:29 +0000 (10:53 +0000)]
AVX-512: Added all SKX forms of GATHER instructions.
Added intrinsics.
Added encoding and tests.
llvm-svn: 240905
David Majnemer [Sun, 28 Jun 2015 04:23:33 +0000 (04:23 +0000)]
[Driver] x86-64 Windows is always PIC
This fixes PR23963.
llvm-svn: 240902
Rui Ueyama [Sun, 28 Jun 2015 03:05:38 +0000 (03:05 +0000)]
COFF: Remove a function that doesn't do much itself. NFC.
llvm-svn: 240901