Commit Graph

128237 Commits

Author SHA1 Message Date
Greg Clayton d354405426 <rdar://problem/11486302>
Improve logging a bit.

llvm-svn: 157771
2012-05-31 21:24:20 +00:00
Greg Clayton eb749096e0 Added the ability to run "symbolicate [options] <crashlog-index>" in interactive mode.
llvm-svn: 157770
2012-05-31 21:21:08 +00:00
Jim Ingham ce76c62b08 Fix a bunch of thinko's in the command "thread continue".
rdar://problem/11562050

llvm-svn: 157767
2012-05-31 20:48:41 +00:00
Jim Ingham cb5d5a571e When we are preparing all threads to run, if the overall run state of a thread is "suspended" that
should override the thread's thread plan's run state.

llvm-svn: 157766
2012-05-31 20:47:56 +00:00
Howard Hinnant 78b4015c1c Fix the new _ALIGNAS_TYPE per instructions supplied by Eli Friedman.
llvm-svn: 157765
2012-05-31 20:14:00 +00:00
Howard Hinnant bf33f5b292 Protect use of alignas against older versions of clang
llvm-svn: 157764
2012-05-31 19:31:14 +00:00
Aaron Ballman f4f486f732 Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
llvm-svn: 157763
2012-05-31 19:27:30 +00:00
Anna Zaks 2774f99913 [analyzer] Cleanup for r157721.
We should lock the number of elements after the initial parsing is
complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can
trigger lazy pch deserialization resulting in more calls to
HandleTopLevelDecl and appending to the LocalTUDecls list. We should
ignore those.

llvm-svn: 157762
2012-05-31 18:07:55 +00:00
Owen Anderson ff458f89aa Make this testcase independent of register allocation.
llvm-svn: 157761
2012-05-31 18:07:02 +00:00
Dmitry Vyukov 95a5c5ca4c tsan: intercept longjmp() but die in it, greatly simplifies problem diagnostic
llvm-svn: 157760
2012-05-31 18:03:59 +00:00
Alexander Kornienko 21d6ec9224 Fix an object lifetime issue in clang/Tooling.
llvm-svn: 157759
2012-05-31 17:58:43 +00:00
Sean Callanan 0c5aabc2c7 Made nil resolve as (id)0 and not be looked up
(which regularly conflicts with existing symbols
in Objective-C).

llvm-svn: 157758
2012-05-31 17:49:31 +00:00
Jakob Stoklund Olesen 4f203ea34b Add support for return value promotion in X86 calling conventions.
Patch by Yiannis Tsiouris!

llvm-svn: 157757
2012-05-31 17:28:20 +00:00
Jakob Stoklund Olesen afcfef147b Didn't mean to export this function.
llvm-svn: 157756
2012-05-31 17:21:27 +00:00
Manman Ren 9bccb64e56 X86: replace SUB with CMP if possible
This patch will optimize the following
        movq    %rdi, %rax
        subq    %rsi, %rax
        cmovsq  %rsi, %rdi
        movq    %rdi, %rax
to
        cmpq    %rsi, %rdi
        cmovsq  %rsi, %rdi
        movq    %rdi, %rax

Perform this optimization if the actual result of SUB is not used.

rdar: 11540023
llvm-svn: 157755
2012-05-31 17:20:29 +00:00
Jakob Stoklund Olesen fa9d7db17b Add a PrintRegUnit helper similar to PrintReg.
Reg-units are named after their root registers, and most units have a
single root, so they simply print as 'AL', 'XMM0', etc. The rare dual
root reg-units print as FPSCR~FPSCR_NZCV, FP0~ST7, ...

The printing piggybacks on the existing register name tables, so no
extra const data space is required.

llvm-svn: 157754
2012-05-31 17:18:29 +00:00
Jakob Stoklund Olesen 2be0a77ade Emit register unit root tables.
Each register unit has one or two root registers. The full set of
registers containing a given register unit can be computed as the union
of the root registers and their super-registers.

Provide an MCRegUnitRootIterator class to enumerate the roots.

llvm-svn: 157753
2012-05-31 17:18:26 +00:00
Joel Jones 585bc82489 Fix typos
llvm-svn: 157752
2012-05-31 17:11:25 +00:00
Greg Clayton d9896733c7 <rdar://problem/11486302>
Fixed a case where multiple threads can be asking to send a packet to the GDB server and one of three things will happen:
1 - everything works
2 - one thread will fail to send the packet due to not being able to get the sequence mutex
3 - one thread will try and interrupt the other packet sending and fail and not send the packet

Now the flow is a bit different. Prior to this fix we did:

if (try_get_sequence_mutex()) {
    send_packet()
    return success;
} else {
   if (async_ok) {
       interrupt()
       send_packet() 
       resume()
       return success;
   }
}
return fail

The issue is that the call to "try_get_sequence_mutex()" could fail if another thread was sending a packet and could cause us to just not send the packet and an error would be returned.

What we really want is to try and get the sequence mutex, and if this succeeds, send the packet. Else check if we are running and if we are, do what we used to do. The big difference is when we aren't running, we wait for the sequence mutex so we don't drop packets. Pseudo code is:

if (try_get_sequence_mutex()) {
    // Safe to send the packet right away
    send_packet()
    return success;
} else {
    if (running) {
       // We are running, interrupt and send async packet if ok to do so,
       // else it is ok to fail
       if (async_ok) {
           interrupt()
           send_packet() 
           resume()
           return success;
        }
    }
    else {
        // Not running, wait for the sequence mutex so we don't drop packets
        get_sequence_mutex()
        send_packet()
        return success;
    }
}
return fail

llvm-svn: 157751
2012-05-31 16:54:51 +00:00
Kostya Serebryany 8a66b71c8f [asan] partial fix for windows build
llvm-svn: 157750
2012-05-31 16:06:05 +00:00
Rafael Espindola e3c5f3e5b1 Fix typos noticed by Benjamin Kramer.
Also make the checks stronger and test that we reject ranges that overlap
a previous wrapped range.

llvm-svn: 157749
2012-05-31 16:04:26 +00:00
Kostya Serebryany f8c5a5bcbc [asan] partial fix for windows build
llvm-svn: 157748
2012-05-31 15:44:05 +00:00
Kostya Serebryany 1d35d155fd [asan] more renaming
llvm-svn: 157747
2012-05-31 15:02:07 +00:00
Kostya Serebryany 8d03204204 [asan] more renaming
llvm-svn: 157746
2012-05-31 14:35:53 +00:00
Benjamin Kramer a0396e4583 X86: Rename the CLMUL target feature to PCLMUL.
It was renamed in gcc/gas a while ago and causes all kinds of
confusion because it was named differently in llvm and clang.

llvm-svn: 157745
2012-05-31 14:34:17 +00:00
Dmitry Vyukov 6f448700e4 tsan: fix a typo
llvm-svn: 157744
2012-05-31 14:24:10 +00:00
Kostya Serebryany 1b71207f48 [asan,tsan] introduce sanitizer_common/sanitizer_defs.h and perform some renaming in asan rt. More to come.
llvm-svn: 157743
2012-05-31 14:11:07 +00:00
Alexander Potapenko a39c2fec46 Fix the wildcards for two output tests on Darwin.
It turns out that atos does not print the symbol names for static C++ functions correctly (one of the two leading underscores is omitted), so they remain mangled.

llvm-svn: 157742
2012-05-31 13:55:40 +00:00
Rafael Espindola 97d7787788 Require intervals in the range metadata to be in a canonical form: They must
be non contiguous, non overlapping and sorted by the lower end.

While this is technically a backward incompatibility, every frontent currently
produces range metadata with a single interval and we don't have any pass
that merges intervals yet, so no existing bitcode files should be rejected by
this.

llvm-svn: 157741
2012-05-31 13:45:46 +00:00
Kostya Serebryany c5bea20e2e [asan,tsan] rename files in sanitizer_common to have a common prefix (sanitizer_).
llvm-svn: 157740
2012-05-31 13:42:53 +00:00
Dmitry Vyukov d6ffccd1da tsan: suppress reports against source file names as well
llvm-svn: 157739
2012-05-31 13:18:11 +00:00
Elena Demikhovsky 602f3a26d6 Added FMA3 Intel instructions.
I disabled FMA3 autodetection, since the result may differ from expected for some benchmarks.
I added tests for GodeGen and intrinsics.
I did not change llvm.fma.f32/64 - it may be done later.

llvm-svn: 157737
2012-05-31 09:20:20 +00:00
Duncan Sands 339bb61e32 Enhance the sinking code to handle diamond patterns. Patch by
Carlo Alberto Ferraris.

llvm-svn: 157736
2012-05-31 08:09:49 +00:00
Filipe Cabecinhas b76d5c965d FreeBSD patch by Viktor Kutuzov
llvm-svn: 157735
2012-05-31 07:49:36 +00:00
Ted Kremenek 16704bb15b Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly
improved the pruning heuristics.  The current heuristics are pretty good, but they make diagnostics
for uninitialized variables warnings particularly useless in some cases.

llvm-svn: 157734
2012-05-31 06:03:17 +00:00
Craig Topper 3f122a7636 Add builtin for pclmulqdq instruction.
llvm-svn: 157733
2012-05-31 05:18:48 +00:00
Craig Topper c1ac05dad5 Add intrinsic for pclmulqdq instruction.
llvm-svn: 157731
2012-05-31 04:37:40 +00:00
Akira Hatanaka bff8e31d3c Cleanup and factoring of mips16 tablegen classes. Make register classes
CPU16RegsRegClass and CPURARegRegClass available. Add definition of mips16
jalr instruction.

Patch by Reed Kotler.

llvm-svn: 157730
2012-05-31 02:59:44 +00:00
Sean Callanan 5bcaf5836b Fixed a missed case in the patch to make
HandleCommand take a LazyBool instead of a bool.

llvm-svn: 157728
2012-05-31 01:30:08 +00:00
Enrico Granata 5f5ab60274 <rdar://problem/11328896> Fixing a bug where regex commands were saved in the history even if they came from a 'command sourced' file - this fix introduces a command sourcing depth and disables history for all levels of depth > 0, which means no commands go into history when being sourced from a file. we need an integer depth because command files might themselves source other command files, ...
llvm-svn: 157727
2012-05-31 01:09:06 +00:00
Eric Christopher 368461cad0 Fix typo in assembly directive. Noticed by inspection.
llvm-svn: 157726
2012-05-31 00:53:18 +00:00
Akira Hatanaka c13ed945aa Add lit.local.cfg to run the tests in test/MC/Disassembler/Mips.
llvm-svn: 157725
2012-05-31 00:49:56 +00:00
Greg Clayton 76927ee56d <rdar://problem/11562050>
"thread continue" uses zero based thread indexes, not the thread index ID.

Also fixed "thread until" if it uses the -t option.

llvm-svn: 157724
2012-05-31 00:29:20 +00:00
Richard Smith ee48633937 Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!
llvm-svn: 157723
2012-05-30 23:55:51 +00:00
Anna Zaks d08d9159c2 Change wording of 'memcpy' type mismatch warning and remove fixit.
As per comments following r157659.

llvm-svn: 157722
2012-05-30 23:14:52 +00:00
Anna Zaks 34d89b7ddc [analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
Follow up in r155693, r155680.

Prevents a hard to reproduce crash with the following stack trace:
3  libsystem_c.dylib 0x00007ff55a835050 _sigtramp + 18446744029881443184
4  clang             0x0000000106218e97 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 519
5  clang             0x0000000105cf3002 clang::ParseAST(clang::Sema&,
bool, bool) + 690
6  clang             0x00000001059a41d8
clang::ASTFrontendAction::ExecuteAction() + 312
7  clang             0x00000001059a3df7 clang::FrontendAction::Execute()
+ 231
8  clang             0x00000001059b0ecc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860
9  clang             0x000000010595e451
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961
10 clang             0x0000000105947f29 cc1_main(char const**, char
const**, char const*, void*) + 969
11 clang             0x0000000105958259 main + 473
12 clang             0x0000000105947b34 start + 52

llvm-svn: 157721
2012-05-30 23:14:48 +00:00
Jakob Stoklund Olesen 5541f6026e Avoid depending on list orders and register numbering.
This code is covered by test/CodeGen/ARM/arm-modifier.ll.

llvm-svn: 157720
2012-05-30 23:00:43 +00:00
Jordan Rose 95341bf4d4 Add a test for '%@' suggestion for classes.
llvm-svn: 157718
2012-05-30 22:41:32 +00:00
Jakob Stoklund Olesen 0b97dbcf1a Extract some pointer hacking to a function.
Switch to MCSuperRegIterator while we're there.

llvm-svn: 157717
2012-05-30 22:40:03 +00:00
Jordan Rose 68f6d3b1a6 Suggest '%@' for Objective-C objects in ObjC format strings.
llvm-svn: 157716
2012-05-30 21:53:13 +00:00