Ilia K [Thu, 19 Mar 2015 17:17:26 +0000 (17:17 +0000)]
Fix memory allocating inside signal handler (MI)
Summary:
This patch fixes a memory allocating inside signal handler.
This bug was found by @vharron:
> Hi all,
>
> I noticed these thread sanitizer warnings while running lldb-mi tests on
> Linux.
>
> WARNING: ThreadSanitizer: signal-unsafe call inside of a signal (pid=39721)
>
> #0 operator new(unsigned long) <null>:0 (lldb-mi-3.7.0+0x000000092b9d)
>
> #1 std::string::_Rep::_S_create(unsigned long, unsigned long,
> std::allocator<char> const&) <null>:0 (libstdc++.so.6+0x0000000ba3b8)
>
> #2 CMICmnResources::GetStringFromResource(unsigned int, CMIUtilString&)
> const
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:434
> (lldb-mi-3.7.0+0x00000014ddd8)
>
> #3 CMICmnResources::GetString(unsigned int) const
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:371
> (lldb-mi-3.7.0+0x00000014db81)
>
> #4 sigwinch_handler(int)
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:99
> (lldb-mi-3.7.0+0x0000001589ff)
>
> #5 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int,
> my_siginfo_t*, void*) tsan_interceptors.o:0 (lldb-mi-3.7.0+0x00000009f25f)
>
> #6 void std::this_thread::sleep_for<long, std::ratio<1l, 1000l>
> >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&)
> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/thread:279
> (lldb-mi-3.7.0+0x00000013243e)
>
> #7 CMIDriver::ReadStdinLineQueue()
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:710
> (lldb-mi-3.7.0+0x000000155e62)
>
> #8 CMIDriver::DoMainLoop()
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:631
> (lldb-mi-3.7.0+0x000000155d37)
>
> #9 non-virtual thunk to CMIDriver::DoMainLoop()
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:648
> (lldb-mi-3.7.0+0x000000155fbd)
>
> #10 CMIDriverMgr::DriverMainLoop()
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp:340
> (lldb-mi-3.7.0+0x000000159ee6)
>
> #11 main
> /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:364
> (lldb-mi-3.7.0+0x000000158f60)
Reviewers: vharron, abidh
Reviewed By: abidh
Subscribers: lldb-commits, abidh, vharron
Differential Revision: http://reviews.llvm.org/D8256
llvm-svn: 232735
Ilia K [Thu, 19 Mar 2015 17:13:20 +0000 (17:13 +0000)]
Fix -break-insert for system functions (MI)
Summary:
# Fix -break-insert for system functions
# Fix MiExecTestCase to use -break-insert instead of CLI "b"
# Improve MiBreakTestCase: now it uses printf() instead of in-house function
All tests pass on OS X.
Test Plan:
```
$ bin/lldb-mi --interpreter
(gdb)
-file-exec-and-symbols ~/p/hello
^done
(gdb)
=shlibs-added,shlib-info=[num="1",name="hello",dyld-addr="-",reason="dyld",path="/Users/IliaK/p/hello",loaded_addr="-",dsym-objpath="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello"]
-break-insert -f printf
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"}
(gdb)
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"}
-exec-run
^running
...
*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x7fff8a476910",func="printf",args=[],file="??",fullname="??",line="-1"},thread-id="1",stopped-threads="all"
(gdb)
```
Reviewers: abidh, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8412
llvm-svn: 232734
Marshall Clow [Thu, 19 Mar 2015 17:05:59 +0000 (17:05 +0000)]
Add code to honor the match_not_bol and match_not_eol regex flats. Fixes PR#22651. Thanks to Jim Porter for the report and suggested fix.
llvm-svn: 232733
Artem Belevich [Thu, 19 Mar 2015 17:05:35 +0000 (17:05 +0000)]
Add support for __nvvm_reflect changes in libdevice in CUDA-7.0
Summary:
CUDA 7.0's libdevice uses slightly different IR to call __nvvm_reflect
and that triggers an assertion in nvvm_reflect optimization pass. This
change allows nvvm_reflect pass to deal with both old and new ways to
pass an argument to __nvvm_reflect.
Test Plan: ninja check-all
Reviewers: eliben, echristo
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D8399
llvm-svn: 232732
Reid Kleckner [Thu, 19 Mar 2015 17:03:58 +0000 (17:03 +0000)]
Revert "Improvement on sized deallocation from r230160"
This reverts commit r230580.
extern_weak functions don't appear to work on Darwin (PR22951), so we'll
need to come up with a new approach.
llvm-svn: 232731
Chris Bieneman [Thu, 19 Mar 2015 16:49:44 +0000 (16:49 +0000)]
Fixing dependencies for native tablegen.
The dependencies for cross-built tablegen were a bit confused. This fixes that. The following dependencies are now enforced:
(1) Tablegen tasks depend on the native tablegen
(2) Native tablegen depends on the cross-compiled tablegen
Although the native tablegen doesn't actually require the cross tablegen, having this dependency forces the native tablegen to rebuild whenever the cross tablegen changes.
llvm-svn: 232730
Hans Wennborg [Thu, 19 Mar 2015 16:42:21 +0000 (16:42 +0000)]
Switch lowering: remove unnecessary ConstantInt casts. NFC.
llvm-svn: 232729
Krzysztof Parzyszek [Thu, 19 Mar 2015 16:33:08 +0000 (16:33 +0000)]
[Hexagon] Add support for vector instructions
llvm-svn: 232728
Greg Bedwell [Thu, 19 Mar 2015 16:32:47 +0000 (16:32 +0000)]
[CMake] Don't pass in MSVC warning flags as definitions.
NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.
Differential Revision: http://reviews.llvm.org/D8188
llvm-svn: 232727
Benjamin Kramer [Thu, 19 Mar 2015 16:06:49 +0000 (16:06 +0000)]
Devirtualize Attr and all subclasses.
We know all subclasses in tblgen so just generate a giant switch for
the few virtual methods or turn them into a member variable using spare
bits. The giant jump tables aren't pretty but still much smaller than
a vtable for every attribute, shrinking Release+Asserts clang by ~400k.
Also halves the size of the Attr base class. No functional change
intended.
llvm-svn: 232726
Krzysztof Parzyszek [Thu, 19 Mar 2015 15:18:57 +0000 (15:18 +0000)]
[Hexagon] ENDLOOP is a non-reversible conditional branch
llvm-svn: 232725
Tamas Berghammer [Thu, 19 Mar 2015 14:58:36 +0000 (14:58 +0000)]
Don't close pseudo terminal master file descriptor on EOF
Some application on Linux an all application on android close stdout and
stderr during the libc exit stage. Previously the master file descriptor
of the pseudo terminal used to communicate with the inferior was closed
on an EOF causing a race condition and a possible SIGHUP on process
exit. After this change the master file descriptor will be closed by the
destructor of the GDBRemoteCommunicationServerLLGS class.
Differential revision: http://reviews.llvm.org/D8436
llvm-svn: 232724
Benjamin Kramer [Thu, 19 Mar 2015 14:23:45 +0000 (14:23 +0000)]
Move ThreadSafetyReporter into an anonymous namespace. NFC.
llvm-svn: 232723
Benjamin Kramer [Thu, 19 Mar 2015 14:09:20 +0000 (14:09 +0000)]
Internalize PEI. NFC.
llvm-svn: 232722
Manuel Klimek [Thu, 19 Mar 2015 12:00:22 +0000 (12:00 +0000)]
Add option to switch off putting header modules into the dependency file.
llvm-svn: 232721
Daniel Sanders [Thu, 19 Mar 2015 11:27:23 +0000 (11:27 +0000)]
[sparc] Small fix to r232719 to make 2007-12-17-InvokeAsm.ll pass on the buildbot.
llvm-svn: 232720
Daniel Sanders [Thu, 19 Mar 2015 11:26:05 +0000 (11:26 +0000)]
[sparc] Only support the 'm' inline assembly memory constraint. NFC.
Summary:
SPARC doesn't seem to support any additional constraints. Therefore remove
the target hook.
No functional change intended.
Reviewers: venkatra
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8214
llvm-svn: 232719
Daniel Jasper [Thu, 19 Mar 2015 11:05:08 +0000 (11:05 +0000)]
[InstCombine] Don't fold a GEP into itself through a PHI node
This can only occur (I think) through the back-edge of the loop.
However, folding a GEP into itself means that the value of the previous
iteration needs to be stored in the meantime, thus requiring an
additional register variable to be live, but not actually achieving
anything (the gep still needs to be executed once per loop iteration).
The attached test case is derived from:
typedef unsigned uint32;
typedef unsigned char uint8;
inline uint8 *f(uint32 value, uint8 *target) {
while (value >= 0x80) {
value >>= 7;
++target;
}
++target;
return target;
}
uint8 *g(uint32 b, uint8 *target) {
target = f(b, f(42, target));
return target;
}
What happens is that the GEP stored in incptr2 is folded into itself
through the loop's back-edge and the phi-node stored in loopptr,
effectively incrementing the ptr by "2" in each iteration instead of "1".
In this case, it is actually increasing the number of GEPs required as
the GEP before the loop can't be folded away anymore. For comparison:
With this patch:
define i8* @test4(i32 %value, i8* %buffer) {
entry:
%cmp = icmp ugt i32 %value, 127
br i1 %cmp, label %loop.header, label %exit
loop.header: ; preds = %entry
br label %loop.body
loop.body: ; preds = %loop.body, %loop.header
%buffer.pn = phi i8* [ %buffer, %loop.header ], [ %loopptr, %loop.body ]
%newval = phi i32 [ %value, %loop.header ], [ %shr, %loop.body ]
%loopptr = getelementptr inbounds i8, i8* %buffer.pn, i64 1
%shr = lshr i32 %newval, 7
%cmp2 = icmp ugt i32 %newval, 16383
br i1 %cmp2, label %loop.body, label %loop.exit
loop.exit: ; preds = %loop.body
br label %exit
exit: ; preds = %loop.exit, %entry
%0 = phi i8* [ %loopptr, %loop.exit ], [ %buffer, %entry ]
%incptr3 = getelementptr inbounds i8, i8* %0, i64 2
ret i8* %incptr3
}
Without this patch:
define i8* @test4(i32 %value, i8* %buffer) {
entry:
%incptr = getelementptr inbounds i8, i8* %buffer, i64 1
%cmp = icmp ugt i32 %value, 127
br i1 %cmp, label %loop.header, label %exit
loop.header: ; preds = %entry
br label %loop.body
loop.body: ; preds = %loop.body, %loop.header
%0 = phi i8* [ %buffer, %loop.header ], [ %loopptr, %loop.body ]
%loopptr = phi i8* [ %incptr, %loop.header ], [ %incptr2, %loop.body ]
%newval = phi i32 [ %value, %loop.header ], [ %shr, %loop.body ]
%shr = lshr i32 %newval, 7
%incptr2 = getelementptr inbounds i8, i8* %0, i64 2
%cmp2 = icmp ugt i32 %newval, 16383
br i1 %cmp2, label %loop.body, label %loop.exit
loop.exit: ; preds = %loop.body
br label %exit
exit: ; preds = %loop.exit, %entry
%ptr2 = phi i8* [ %incptr2, %loop.exit ], [ %incptr, %entry ]
%incptr3 = getelementptr inbounds i8, i8* %ptr2, i64 1
ret i8* %incptr3
}
Review: http://reviews.llvm.org/D8245
llvm-svn: 232718
Daniel Jasper [Thu, 19 Mar 2015 09:40:16 +0000 (09:40 +0000)]
clang-format: Fix another bug in wrapping around "*".
Before:
void aaaaa(
aaaaaaaaaaaa*
aaaaaaaaaaaaaa) {} // even violation the column limit
After:
void aaaaa(
aaaaaaaaaaaa*
aaaaaaaaaaaaaa) {}
llvm-svn: 232717
Ed Schouten [Thu, 19 Mar 2015 09:17:21 +0000 (09:17 +0000)]
Don't print debugging messages to stdout.
There is some debugging code in cxa_demangle.cpp that prints messages on
stdout. In general this is not safe, as the program itself may use
stdout to write its output. Change this code to write to stderr.
Differential Revision: http://reviews.llvm.org/D8167
llvm-svn: 232716
Ilia K [Thu, 19 Mar 2015 09:17:06 +0000 (09:17 +0000)]
Fix double (gdb) prompt when command doesn't exist
llvm-svn: 232715
Sylvestre Ledru [Thu, 19 Mar 2015 09:03:58 +0000 (09:03 +0000)]
Add support for kfreebsd. Thanks to Jan Henke
Reported on the Debian BTS:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780106
llvm-svn: 232714
Ilia K [Thu, 19 Mar 2015 08:54:17 +0000 (08:54 +0000)]
Fix error handling in CMIDriver::DoMainLoop after r215223 (MI)
llvm-svn: 232713
Alexey Bataev [Thu, 19 Mar 2015 08:44:10 +0000 (08:44 +0000)]
[OPENMP] Fixed bug in codegen of 'atomic write'.
Fixed codegen for exit/continue order after success/failed atomic cmpxchg instruction for 'atomic write' construct.
llvm-svn: 232712
Tobias Grosser [Thu, 19 Mar 2015 07:43:35 +0000 (07:43 +0000)]
Add some missing __isl_give/__isl_keep annotations
llvm-svn: 232711
Tobias Grosser [Thu, 19 Mar 2015 07:39:34 +0000 (07:39 +0000)]
Add forgotten 'FileCheck' to tiling test cases
These test cases did not verify the CHECK lines at all. We add the FileCheck
and also fix some broken CHECK lines. Being here, we extend the checks to
cover the whole loop structure.
llvm-svn: 232710
Tobias Grosser [Thu, 19 Mar 2015 07:27:29 +0000 (07:27 +0000)]
Update isl to 94d707d
The major improvements are:
- Extended schedule tree support
- AST generation from schedule trees
llvm-svn: 232709
Denis Protivensky [Thu, 19 Mar 2015 06:47:44 +0000 (06:47 +0000)]
[ARM] Implement static (initial exec) TLS model
This includes handling of R_ARM_TLS_IE32 and R_ARM_TLS_LE32 relocs.
Differential Revision: http://reviews.llvm.org/D8353
llvm-svn: 232708
Simon Atanasyan [Thu, 19 Mar 2015 05:44:22 +0000 (05:44 +0000)]
[Mips] Implement R_MIPS_PC21_S2 relocation handling
llvm-svn: 232707
Simon Atanasyan [Thu, 19 Mar 2015 05:44:13 +0000 (05:44 +0000)]
[Mips] Recognize and check compatibility MIPS32R6 / MIPS64R6 ISA's
llvm-svn: 232706
Simon Atanasyan [Thu, 19 Mar 2015 05:44:04 +0000 (05:44 +0000)]
[Mips] Replace "hand-made" function by the `llvm::SignExtend32()` routine
No functional changes.
llvm-svn: 232705
Justin Bogner [Thu, 19 Mar 2015 04:45:16 +0000 (04:45 +0000)]
llvm-cov: Rename -color={always|never} to -use-color[=0]
This is an ugly hack to fix the configure --enable-shared build. It
turns out that *every cl::opt in LLVM* shows up in *every tool* in
that configuration, which is hopelessly broken. This skirts around the
issue by not colliding with another option's name, for now.
I've also simplified the option implementation - the other "color"
option used cl::boolOrDefault and was much nicer than what I'd written
before.
llvm-svn: 232704
Eric Fiselier [Thu, 19 Mar 2015 03:20:02 +0000 (03:20 +0000)]
Fix use after free and calls to operator comma in debug mode
llvm-svn: 232703
Ed Maste [Thu, 19 Mar 2015 02:47:36 +0000 (02:47 +0000)]
Add NameMatches.h header to fix FreeBSD build after r232673
llvm-svn: 232702
Rafael Espindola [Thu, 19 Mar 2015 02:40:56 +0000 (02:40 +0000)]
Note that we don't support COFF on PPC.
Should bring back the windows bots.
llvm-svn: 232701
Justin Bogner [Thu, 19 Mar 2015 02:00:54 +0000 (02:00 +0000)]
llvm-cov: Continue trying to appease a bot
This bot doesn't like me. I don't know why:
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24425
Move the color option enum's definition out of the function that
creates the cl::opt.
llvm-svn: 232700
Rafael Espindola [Thu, 19 Mar 2015 01:50:16 +0000 (01:50 +0000)]
Split the object streamer callback in one per file format.
There are two main advantages to doing this
* Targets that only need to handle one of the formats specially don't have
to worry about the others. For example, x86 now only registers a
constructor for the COFF streamer.
* Changes to the arguments passed to one format constructor will not impact
the other formats.
llvm-svn: 232699
Justin Bogner [Thu, 19 Mar 2015 01:07:22 +0000 (01:07 +0000)]
llvm-cov: Try to appease a bot
The clang-hexagon elf bot was complaining that "Option 'color'
registered more than once!":
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24425
I don't understand why this error is happening, and I don't see it on
any other bots or on my own machine, so I'm kind of grasping at
straws. Try using an unscoped enum and specifying a cl::init to see if
they help.
llvm-svn: 232698
Hans Wennborg [Thu, 19 Mar 2015 00:57:51 +0000 (00:57 +0000)]
SelectionDAGBuilder: update comment in HandlePHINodesInSuccessorBlocks.
From what I can tell, the code is checking for PHIs that expect any value from
this block, not just constants.
llvm-svn: 232697
Matthias Braun [Thu, 19 Mar 2015 00:21:58 +0000 (00:21 +0000)]
Do not track subregister liveness when it brings no benefits
Some subregisters are only to indicate different access sizes, while not
providing any way to actually divide the register up into multiple
disjunct parts. Avoid tracking subregister liveness in these cases as it
is not beneficial.
Differential Revision: http://reviews.llvm.org/D8429
llvm-svn: 232695
David Majnemer [Thu, 19 Mar 2015 00:10:23 +0000 (00:10 +0000)]
Parse: Don't assume tokens have a length
Don't crash if the last token in a bad inline method body is an
annotation token.
llvm-svn: 232694
Justin Bogner [Thu, 19 Mar 2015 00:02:23 +0000 (00:02 +0000)]
llvm-cov: Only emit colour by default if the output is a tty
This replaces the -no-color flag with a -color={auto|always|never}
option, with auto as the default, which is much saner.
llvm-svn: 232693
Hans Wennborg [Thu, 19 Mar 2015 00:02:22 +0000 (00:02 +0000)]
SelectionDAGIsel: Fix comment about terminators being "handled below".
That changed in r102128.
llvm-svn: 232692
Quentin Colombet [Wed, 18 Mar 2015 23:17:28 +0000 (23:17 +0000)]
[CodeGenPrepare] Remove broken, dead, code.
NFC.
llvm-svn: 232690
Jim Ingham [Wed, 18 Mar 2015 23:16:58 +0000 (23:16 +0000)]
Comment discouraging writing command based test cases.
llvm-svn: 232689
Rafael Espindola [Wed, 18 Mar 2015 23:15:49 +0000 (23:15 +0000)]
two or more, use a for.
llvm-svn: 232688
Siva Chandra [Wed, 18 Mar 2015 23:02:28 +0000 (23:02 +0000)]
Enable TestCallStdStringFunction for GCC.
Test Plan: dotest.py -C gcc -p TestCallStdStringFunction
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8426
llvm-svn: 232687
Eric Fiselier [Wed, 18 Mar 2015 22:56:50 +0000 (22:56 +0000)]
[libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind.
Summary:
This patch changes std::function to use allocator_traits to rebind the allocator instead of allocator itself.
It also changes most of the tests to use `bare_allocator` where possible instead of `test_allocator`.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8391
llvm-svn: 232686
Simon Pilgrim [Wed, 18 Mar 2015 22:51:45 +0000 (22:51 +0000)]
Fixed failing test due to missing target triple causing different results on different buildbots.
llvm-svn: 232685
Rafael Espindola [Wed, 18 Mar 2015 22:19:16 +0000 (22:19 +0000)]
Teach getDefaultFormat that we only support ELF on some architectures.
This should bring the windows bots back.
It is a bit ugly, but it is better than what we had before: The triple would
say that the object format was COFF, but llc/llvm-mc would produce an ELF.
llvm-svn: 232683
Simon Pilgrim [Wed, 18 Mar 2015 22:18:51 +0000 (22:18 +0000)]
[X86][SSE] Avoid scalarization of v2i64 vector shifts (REAPPLIED)
Fixed broken tests.
Differential Revision: http://reviews.llvm.org/D8416
llvm-svn: 232682
Bill Schmidt [Wed, 18 Mar 2015 22:13:03 +0000 (22:13 +0000)]
[PowerPC] Correct typo in PPCInstrAltivec.td
llvm-svn: 232681
David Majnemer [Wed, 18 Mar 2015 22:04:43 +0000 (22:04 +0000)]
MS ABI: Don't try to emit VF/VB-Tables for extern class templates
There will be an explicit template instantiation in another translation
unit which will provide the definition of the VF/VB-Tables.
This fixes PR22932.
llvm-svn: 232680
Kostya Serebryany [Wed, 18 Mar 2015 22:03:39 +0000 (22:03 +0000)]
[sanitizer] change the sanitizer coverage format once again, this time adding a magic to the beginning of the file
llvm-svn: 232679
Siva Chandra [Wed, 18 Mar 2015 22:01:45 +0000 (22:01 +0000)]
Cleanup to simplify the formatter for std::map of libstdc++.
Summary:
GCC does not emit some DWARF required for the simplified formatter
to work. A workaround for it has been incorporated in the formatter.
The corresponding test TestDataFormatterStdMap has also been enabled
for GCC.
Test Plan: dotest.py -C <clang|gcc> -p TestDataFormatterStdMap
Reviewers: clayborg, vharron, granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8424
llvm-svn: 232678
Mehdi Amini [Wed, 18 Mar 2015 22:01:44 +0000 (22:01 +0000)]
Update 3.7 Release Note mentionning the non-optionality of the DataLayout
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 232677
Chris Bieneman [Wed, 18 Mar 2015 21:53:29 +0000 (21:53 +0000)]
Revert "Generate targets for each lit suite."
This change broke Polly. I'll track down the failure when I have a chance and re-apply the change.
llvm-svn: 232676
Richard Trieu [Wed, 18 Mar 2015 21:52:47 +0000 (21:52 +0000)]
When cloning LocalInstantiationScope's, don't update the current scope in Sema.
Construction of LocalInstantiationScope automatically updates the current scope
inside Sema. However, when cloning a scope, the current scope does not change.
Change the cloning function to preserve the current scope.
Review: http://reviews.llvm.org/D8407
BUG: https://llvm.org/bugs/show_bug.cgi?id=22931
llvm-svn: 232675
Aaron Watry [Wed, 18 Mar 2015 21:52:07 +0000 (21:52 +0000)]
math: Implement erfc
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 232674
Zachary Turner [Wed, 18 Mar 2015 21:31:45 +0000 (21:31 +0000)]
Move some functions from source/lldb.cpp to Utility.
Specifically, there were some functions for converting enums
to strings and a function for matching a string using a specific
matching algorithm. This moves those functions to more appropriate
headers in lldb/Utility and updates references to include the
new headers.
llvm-svn: 232673
Justin Bogner [Wed, 18 Mar 2015 21:30:46 +0000 (21:30 +0000)]
asan: Cargo cult the linux test changes in r232501 to the darwin tests
This gets check-asan working again on Darwin - it looks like it was
just an omission not to update this as part of r232501.
llvm-svn: 232672
Chris Bieneman [Wed, 18 Mar 2015 21:19:06 +0000 (21:19 +0000)]
Generate targets for each lit suite.
Summary:
This change makes CMake scan for lit suites and generate a target for each lit test suite. The targets follow the format check-<project>-<suite path>.
For example:
check-llvm-unit - Runs the LLVM unit tests
check-llvm-codegen-arm - Runs the ARM codeine tests
Note: These targets are not generated during multi-configuration generators (i.e. Xcode and Visual Studio) because target clutter impacts UI usability.
Reviewers: chandlerc
Subscribers: aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D8380
llvm-svn: 232671
Eric Christopher [Wed, 18 Mar 2015 21:01:00 +0000 (21:01 +0000)]
Revert "[X86][SSE] Avoid scalarization of v2i64 vector shifts" as it
appears to have broken tests/bots.
This reverts commit r232660.
llvm-svn: 232670
Zachary Turner [Wed, 18 Mar 2015 20:58:39 +0000 (20:58 +0000)]
Try to fix the Makefile build.
I deleted lldb-log.cpp, but the Makefile build lists this file
explicitly, so it is removed in this patch.
llvm-svn: 232669
Greg Clayton [Wed, 18 Mar 2015 20:45:28 +0000 (20:45 +0000)]
Don't load register data from memory.
llvm-svn: 232668
Eric Christopher [Wed, 18 Mar 2015 20:41:44 +0000 (20:41 +0000)]
Revert "Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that"
Committed too early.
This reverts commit r232666.
llvm-svn: 232667
Eric Christopher [Wed, 18 Mar 2015 20:37:36 +0000 (20:37 +0000)]
Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that
they can be used without a subtarget in constructing subtarget
independent passes.
llvm-svn: 232666
Eric Christopher [Wed, 18 Mar 2015 20:37:30 +0000 (20:37 +0000)]
Revert "Migrate the AArch64 TargetRegisterInfo to its TargetMachine"
as we don't necessarily need to do this yet - though we could move
the base class to the TargetMachine as it isn't subtarget dependent.
This reverts commit r232103.
llvm-svn: 232665
Reid Kleckner [Wed, 18 Mar 2015 20:26:53 +0000 (20:26 +0000)]
Use WinEHPrepare to outline SEH finally blocks
No outlining is necessary for SEH catch blocks. Use the blockaddr of the
handler in place of the usual outlined function.
Reviewers: majnemer, andrew.w.kaylor
Differential Revision: http://reviews.llvm.org/D8370
llvm-svn: 232664
Rafael Espindola [Wed, 18 Mar 2015 20:21:06 +0000 (20:21 +0000)]
Fix cmake build.
llvm-svn: 232663
Reid Kleckner [Wed, 18 Mar 2015 20:09:13 +0000 (20:09 +0000)]
CMake: Disable ENABLE_EXPORTS for executables with MSVC
The MSVC linker won't produce a .lib file for an executable that doesn't
export anything, and LLVM doesn't maintain dllexport annotations or .def
files listing all C++ symbols. It also doesn't support exporting all
symbols, like binutils ld.
CMake 3.2 changed the Ninja generator to list both the .exe and .lib
files as outputs of executable build targets. Ninja would always re-link
executables with ENABLE_EXPORTS because the .lib output file was not
present, and therefore the target was out of date.
llvm-svn: 232662
Rafael Espindola [Wed, 18 Mar 2015 19:49:29 +0000 (19:49 +0000)]
Fix use of uninitialized valued.
Should bring the bots back.
llvm-svn: 232661
Simon Pilgrim [Wed, 18 Mar 2015 19:35:31 +0000 (19:35 +0000)]
[X86][SSE] Avoid scalarization of v2i64 vector shifts
Currently v2i64 vectors shifts (non-equal shift amounts) are scalarized, costing 4 x extract, 2 x x86-shifts and 2 x insert instructions - and it gets even more awkward on 32-bit targets.
This patch separately shifts the vector by both shift amounts and then shuffles the partial results back together, costing 2 x shuffles and 2 x sse-shifts instructions (+ 2 movs on pre-AVX hardware).
Note - this patch only improves the SHL / LSHR logical shifts as only these are supported in SSE hardware.
Differential Revision: http://reviews.llvm.org/D8416
llvm-svn: 232660
Colin LeMahieu [Wed, 18 Mar 2015 19:27:31 +0000 (19:27 +0000)]
[Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from StringRef. Removing reinterpret_casts.
llvm-svn: 232659
Rafael Espindola [Wed, 18 Mar 2015 19:08:20 +0000 (19:08 +0000)]
Add a default implementation of createObjectStreamer.
This removes duplicated code from backends that don't need to do anything
fancy.
llvm-svn: 232658
Krzysztof Parzyszek [Wed, 18 Mar 2015 19:07:53 +0000 (19:07 +0000)]
[Hexagon] Use pseudo-instructions for true/false predicate values
llvm-svn: 232657
Krzysztof Parzyszek [Wed, 18 Mar 2015 18:50:06 +0000 (18:50 +0000)]
Revert "[Hexagon] Use pseudo-instructions for true/false predicate values"
This reverts r232650.
Missed a piece of code in the previous commit.
llvm-svn: 232656
Enrico Granata [Wed, 18 Mar 2015 18:42:41 +0000 (18:42 +0000)]
Fix the Xcode build after the MIPS64 changes
llvm-svn: 232655
Colin LeMahieu [Wed, 18 Mar 2015 18:41:23 +0000 (18:41 +0000)]
[Objdump] Removing size limit on DumpBytes and changing to range based for loop.
llvm-svn: 232654
Zachary Turner [Wed, 18 Mar 2015 18:20:42 +0000 (18:20 +0000)]
Move lldb-log.cpp to core/Logging.cpp
So that we don't have to update every single #include in the entire
codebase to #include this new header (which used to get included by
lldb-private-log.h, we automatically #include "Logging.h" from
within "Log.h".
llvm-svn: 232653
Matthias Braun [Wed, 18 Mar 2015 17:56:09 +0000 (17:56 +0000)]
TableGen: Fix register class lane masks being too conservative.
When calculating the lanemask of a register class we have to include the
masks of subregisters supported by any of the class members, not just
the ones supported by all class members.
This fixes problems when coalescing towards a subclass with additional
subregisters available.
The attached testcase works fine as is, but does crash if you enable
subregister liveness on x86 without this change applied.
llvm-svn: 232652
Rafael Espindola [Wed, 18 Mar 2015 17:33:40 +0000 (17:33 +0000)]
Handle X86::reloc_riprel_4byte in 32 bits mode.
We can get there with .code64.
Fixes pr22349.
llvm-svn: 232651
Krzysztof Parzyszek [Wed, 18 Mar 2015 17:20:51 +0000 (17:20 +0000)]
[Hexagon] Use pseudo-instructions for true/false predicate values
llvm-svn: 232650
Greg Clayton [Wed, 18 Mar 2015 17:03:13 +0000 (17:03 +0000)]
Always add some fake threads with x86_64 registers no matter what the architecture since this is just for testing that we can add new threads with completely different registers contexts to a process.
llvm-svn: 232649
Zachary Turner [Wed, 18 Mar 2015 16:56:24 +0000 (16:56 +0000)]
Fix linking of unit tests via CMake on Windows.
A previous attempt to make the unit tests link properly on
Linux broke it for Windows. This patch fixes it for both platforms.
llvm-svn: 232648
Sanjay Patel [Wed, 18 Mar 2015 16:38:44 +0000 (16:38 +0000)]
Use utils/update_llc_test_checks.py to update all CHECKs
The checks here were so vague that we could nuke intrinsics
from existence and still pass the test because we'd match
the function name.
llvm-svn: 232647
Rui Ueyama [Wed, 18 Mar 2015 16:28:33 +0000 (16:28 +0000)]
PECOFF: Do not copy all undefined symbols to a set. NFC.
llvm-svn: 232646
Krzysztof Parzyszek [Wed, 18 Mar 2015 16:23:44 +0000 (16:23 +0000)]
[Hexagon] Intrinsics for circular and bit-reversed loads and stores
llvm-svn: 232645
Sanjay Patel [Wed, 18 Mar 2015 16:07:10 +0000 (16:07 +0000)]
fixed to test features, not CPU model
The 'vmovntdq' was only passing due to a fluke in
SandyBridge codegen that splits 32-byte stores in half,
but that meant that the test was not correctly checking
for the 32-byte store that we thought we were generating.
The lax checking in this file will be addressed in
another commit. There are bigger problems here.
llvm-svn: 232644
Krzysztof Parzyszek [Wed, 18 Mar 2015 15:56:43 +0000 (15:56 +0000)]
[Hexagon] Handle ENDLOOP0 in InsertBranch and RemoveBranch
llvm-svn: 232643
Renato Golin [Wed, 18 Mar 2015 15:42:15 +0000 (15:42 +0000)]
[ARM] Remove XFAIL from passing RT test
This test started passing without warning, so in theory, we shouldn't mark
is as XPASS, but the buildbots are red and there's been an uncaught regression
meanwhile. Since it's passing on {ARM,Thumb2} x {NEON,VFPv3}, I'll risk future
failures for the benefit of getting the bots green again.
llvm-svn: 232642
Eric Fiselier [Wed, 18 Mar 2015 15:24:18 +0000 (15:24 +0000)]
Provide std::abs(<floating-point>) in <cmath> on Solaris.
1) <cstdlib> header should define std::abs([int|long|long long])
functions. They use "using ::abs" to import these functions (which are
declared in <stdlib.h>) into std namespace.
2) <cmath> header should define std::abs([float|double|long double])
function. If we try define new functions in std namespace, then it
will cause compile error in <cstdlib> because "using ::abs" will try
import not only [int|long|long long] functions, but also
[float|double|long double] which are defined in <math.h> header on
solaris.
Patch by C Bergstrom.
llvm-svn: 232641
Ed Maste [Wed, 18 Mar 2015 15:23:53 +0000 (15:23 +0000)]
Skip intermittently failing test on FreeBSD
It is already skipped on the other platforms anyhow.
llvm.org/pr19246
llvm-svn: 232640
Rui Ueyama [Wed, 18 Mar 2015 15:12:55 +0000 (15:12 +0000)]
Remove unused parameter.
llvm-svn: 232639
NAKAMURA Takumi [Wed, 18 Mar 2015 15:07:54 +0000 (15:07 +0000)]
Appease clang/test/Parser/opencl-atomics-cl20.cl for 32-bit targets with explicit triple.
llvm-svn: 232638
Sid Manning [Wed, 18 Mar 2015 14:20:54 +0000 (14:20 +0000)]
Add support for .ifnes psuedo-op.
llvm-svn: 232636
Daniel Jasper [Wed, 18 Mar 2015 14:20:13 +0000 (14:20 +0000)]
Robert Flack [Wed, 18 Mar 2015 13:55:48 +0000 (13:55 +0000)]
Convert open options for POSIX open on target platform.
This moves the conversion of the open options to the target platform. On mac fcntl.h has different values for O_CREAT and O_TRUNC than on linux so by transmitting the standardized lldb open options we can correctly convert them on the target platform.
Test Plan:
On linux:
lldb-server p --listen *:1234
On mac:
lldb
platform select remote-linux
platform connect connect://ip-of-linux-box:1234
target create ~/path/to/linux/binary
b main
process launch
Binary is successfully pushed to linux remote, process successfully launches and break in the main method.
Differential Revision: http://reviews.llvm.org/D8395
llvm-svn: 232634
Ilia K [Wed, 18 Mar 2015 13:08:52 +0000 (13:08 +0000)]
Fix comment in tools/lldb-mi/MIDriver.cpp
llvm-svn: 232633
Daniel Jasper [Wed, 18 Mar 2015 12:59:19 +0000 (12:59 +0000)]
[clang-format] Add missing test for std::function<void( int, int )>
spacing also fixed by r230473.
The fix in r230473 was done to enable fixing the spacing for
std::function<void( int, int )>.
I did not realized that it also fixed this
issue. Since it is fairly different from
Deleted &operator=(const Deleted &)& = default;
fixed in r230473, it seems sensible to add the regression test for it.
Also cleaned up the test by removing duplicated code and comment, and kept
repeated test set consistent.
Result of running the new tests with r230473 backed out:
[ RUN ] FormatTest.ConfigurableSpacesInParentheses
Actual: "std::function<void(int, int)> callback;"
Expected: "std::function<void( int, int )> callback;"
Actual: "std::function<void( int, int )> callback;"
Expected: "std::function<void(int, int)> callback;"
Actual: "std::function<void( int, int ) > callback;"
Expected: "std::function<void(int, int)> callback;"
[ FAILED ] FormatTest.ConfigurableSpacesInParentheses (402 ms)
Result of new tests with r230473:
[ RUN ] FormatTest.ConfigurableSpacesInParentheses
[ OK ] FormatTest.ConfigurableSpacesInParentheses (209 ms)
Review: http://reviews.llvm.org/D7922
Patch by Jean-Philippe Dufraigne. Thanks!
llvm-svn: 232632