Commit Graph

176406 Commits

Author SHA1 Message Date
Jason Molenda 705b180964 Initial merge of some of the iOS 8 / Mac OS X Yosemite specific
lldb support.  I'll be doing more testing & cleanup but I wanted to
get the initial checkin done.

This adds a new SBExpressionOptions::SetLanguage API for selecting a
language of an expression.

I added adds a new SBThread::GetInfoItemByPathString for retriving
information about a thread from that thread's StructuredData.

I added a new StructuredData class for representing
key-value/array/dictionary information (e.g. JSON formatted data).
Helper functions to read JSON and create a StructuredData object,
and to print a StructuredData object in JSON format are included.

A few Cocoa / Cocoa Touch data formatters were updated by Enrico
to track changes in iOS 8 / Yosemite.

Before we query a thread's extended information, the system runtime may 
provide hints to the remote debug stub that it will use to retrieve values
out of runtime structures.  I added a new SystemRuntime method 
AddThreadExtendedInfoPacketHints which allows the SystemRuntime to add 
key-value type data to the initial request that we send to the remote stub.

The thread-format formatter string can now retrieve values out of a thread's
extended info structured data.  The default thread-format string picks up
two of these - thread.info.activity.name and thread.info.trace_messages.

I added a new "jThreadExtendedInfo" packet in debugserver; I will
add documentation to the lldb-gdb-remote.txt doc soon.  It accepts
JSON formatted arguments (most importantly, "thread":threadnum) and
it returns a variety of information regarding the thread to lldb
in JSON format.  This JSON return is scanned into a StructuredData
object that is associated with the thread; UI layers can query the
thread's StructuredData to see if key-values are present, and if
so, show them to the user.  These key-values are likely to be
specific to different targets with some commonality among many
targets.  For instance, many targets will be able to advertise the
pthread_t value for a thread.

I added an initial rough cut of "thread info" command which will print
the information about a thread from the jThreadExtendedInfo result.
I need to do more work to make this format reasonably.

Han Ming added calls into the pmenergy and pmsample libraries if
debugserver is run on Mac OS X Yosemite to get information about the
inferior's power use.

I added support to debugserver for gathering the Genealogy information
about threads, if it exists, and returning it in the jThreadExtendedInfo
JSON result.

llvm-svn: 210874
2014-06-13 02:37:02 +00:00
Rafael Espindola b4ad29be92 Fix build on windows.
llvm-svn: 210873
2014-06-13 02:36:09 +00:00
Richard Smith 71b09acb73 Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.
llvm-svn: 210872
2014-06-13 02:24:47 +00:00
Rafael Espindola db4ed0bdab Remove 'using std::errro_code' from lib.
llvm-svn: 210871
2014-06-13 02:24:39 +00:00
Juergen Ributzka 3453bcf64d [FastISel][X86] Add support for cvttss2si/cvttsd2si intrinsics.
This adds support for the cvttss2si/cvttsd2si intrinsics. Preceding
insertelement instructions are folded into the conversion instruction (if
possible).

llvm-svn: 210870
2014-06-13 02:21:58 +00:00
Tom Stellard 2e59a45f80 R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtarget
llvm-svn: 210869
2014-06-13 01:32:00 +00:00
Tom Stellard d881e9195a R600: Drop use of cached TargetMachine in R600InstrInfo.cpp
llvm-svn: 210868
2014-06-13 01:31:56 +00:00
Tom Stellard 0ab103422d prepare-builtins: Use std:: prefix for error_code
This fixes the build with with newer LLVM.

llvm-svn: 210867
2014-06-13 01:30:14 +00:00
Rafael Espindola bff5d0d16a Remove all uses of 'using std::error_code' from headers.
llvm-svn: 210866
2014-06-13 01:25:41 +00:00
Tom Stellard bfd480d79f R600: Drop use of cached TargetMachine in AMDGPUInstrInfo.cpp
llvm-svn: 210865
2014-06-13 01:02:57 +00:00
Greg Clayton a2715cf108 Added the ability to save core files:
(lldb) file /bin/ls
(lldb) b malloc
(lldb) run
(lldb) process save-core /tmp/ls.core

Each ObjectFile plug-in now has the option to save core files by registering a new static callback.

llvm-svn: 210864
2014-06-13 00:54:12 +00:00
Juergen Ributzka 454d374e37 [FastISel][X86] - Add branch weights
Add branch weights to branch instructions, so that the following passes can
optimize based on it (i.e. basic block ordering).

llvm-svn: 210863
2014-06-13 00:45:11 +00:00
Eric Christopher 030294e4c5 Move ARMSelectionDAGInfo from the TargetMachine to the subtarget.
llvm-svn: 210862
2014-06-13 00:20:39 +00:00
Eric Christopher a47f6804d2 Move to a private function to initialize subtarget dependencies
so we can use initializer lists for the ARMSubtarget and then
use this to initialize a moved DataLayout on the subtarget from
the TargetMachine.

llvm-svn: 210861
2014-06-13 00:20:35 +00:00
Alexey Samsonov 0670cfaf01 [DWARF parser] Fix broken address ranges construction.
Previous algorithm for constructing [Address ranges]->[Compile Units]
mapping was wrong. It somewhat relied on the assumption that address ranges
for different compile units may not overlap. It is not so.
For example, two compile units may contain the definition of the same
linkonce_odr function. These definitions will be merged at link-time,
resulting in equivalent .debug_ranges entries for both these units

Instead of sorting and merging original address ranges (from .debug_ranges
and .debug_aranges), implement a different approach: save endpoints
of all ranges, and then use a sweep-line approach to construct
the desired mapping. If we find that certain address maps to
several compilation units, we just pick any of them.

llvm-svn: 210860
2014-06-12 23:58:49 +00:00
Eric Christopher 70e005a171 Have ARMSelectionDAGInfo take a DataLayout as it's argument as the
DAG has access to the subtarget and TargetSelectionDAGInfo only
needs a DataLayout.

llvm-svn: 210859
2014-06-12 23:39:49 +00:00
Juergen Ributzka 349777d3ea [FastISel][X86] Add MachineMemOperand to load/store instructions.
This commit adds MachineMemOperands to load and store instructions. This allows
the peephole optimizer to fold load instructions. Unfortunatelly the peephole
optimizer currently doesn't run at -O0.

llvm-svn: 210858
2014-06-12 23:27:57 +00:00
David Fang 09b61ebcbe Revert "fixes duplicate header installation"
This reverts commit 0bd40d6c3da6719fecf77038673d453ff1eab25b.

llvm-svn: 210857
2014-06-12 23:19:55 +00:00
Reid Kleckner 32506ed8be Recover from missing 'typename' in sizeof(T::InnerType)
Summary:
'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression.  This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type.  If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.

This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang.  Please try it and
file bugs!

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4108

llvm-svn: 210855
2014-06-12 23:03:48 +00:00
Eric Christopher 02ae6902fa Move the PPCSelectionDAGInfo off the TargetMachine and onto the
subtarget.

llvm-svn: 210854
2014-06-12 23:02:32 +00:00
Eric Christopher e47dcd411a Make PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine
since that's all it needs.

llvm-svn: 210853
2014-06-12 22:56:48 +00:00
Eric Christopher f8c031fccf Move PPCTargetLowering off of the TargetMachine and onto the subtarget.
llvm-svn: 210852
2014-06-12 22:50:10 +00:00
Eli Bendersky 428c40352e Remove stale part of comment.
llvm-svn: 210851
2014-06-12 22:47:08 +00:00
Reid Kleckner 6713086bca Check the access of operator delete from the destructor context
Previously we would do the access check from the context of
MarkVTableUsed.

Also update this test to C++11, since that is typically used with the MS
C++ ABI.

Fixes PR20005.

llvm-svn: 210850
2014-06-12 22:39:12 +00:00
Eric Christopher d90a8746df Remove an extraneous this-> to access the subtarget.
llvm-svn: 210849
2014-06-12 22:38:20 +00:00
Eric Christopher b1aaebecb1 Rename PPCSubTarget to Subtarget in PPCTargetLowering for consistency.
Also remove an extra local subtarget in the initialization functions.

llvm-svn: 210848
2014-06-12 22:38:18 +00:00
Rafael Espindola 316952a483 Fix the polly build.
llvm-svn: 210847
2014-06-12 22:37:15 +00:00
Andrew Trick 491e34a139 Fix the scheduler's MaxObservedStall computation.
WenHan Gu pointed out this bug that results in an assert
not being effective in some cases.

llvm-svn: 210846
2014-06-12 22:36:28 +00:00
Eric Christopher f55a224920 Move PPCJITInfo off of the TargetMachine and onto the subtarget.
Needed to migrate a few functions around to avoid circular header
dependencies.

llvm-svn: 210845
2014-06-12 22:28:06 +00:00
Eric Christopher 54367e01cc Remove the use of TargetMachine from PPCJITInfo and replace with
the subtarget. Also remove unnecessary argument to the constructor
at the same time, we already have access via the subtarget.

llvm-svn: 210844
2014-06-12 22:19:51 +00:00
Rafael Espindola 96f6ef2575 Fix the build of KillTheDoctor.
llvm-svn: 210843
2014-06-12 22:16:55 +00:00
Richard Smith 51514ce625 [modules] The LLVM C API does not require C++!
llvm-svn: 210842
2014-06-12 22:09:39 +00:00
Richard Smith 1dafb9bb80 The Clang C API does not require C++. Thanks to Jordan Rose for pointing out this error!
llvm-svn: 210841
2014-06-12 22:09:11 +00:00
Rafael Espindola c7f0d23f56 Prefix error_code with std.
llvm-svn: 210840
2014-06-12 22:08:48 +00:00
Eric Christopher bd14dc519c Move PPCInstrInfo off of the target machine and onto the subtarget.
llvm-svn: 210839
2014-06-12 22:05:46 +00:00
Rafael Espindola 002840cf66 Quick build fix.
llvm-svn: 210838
2014-06-12 22:01:48 +00:00
Rafael Espindola adccf860ac Try to fix the windows build.
llvm-svn: 210837
2014-06-12 21:53:57 +00:00
Eric Christopher 1dcea73540 Remove TargetMachine from PPCInstrInfo and all dependencies and
replace with the current subtarget.

llvm-svn: 210836
2014-06-12 21:48:52 +00:00
Rafael Espindola 3acea39853 Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.

llvm-svn: 210835
2014-06-12 21:46:39 +00:00
Reid Kleckner b6e7d64f30 s/pr2007/20007/ in a test
llvm-svn: 210834
2014-06-12 21:46:38 +00:00
Bob Wilson 5e61d0b816 Move test for r210734 to Feature/aliases.ll.
llvm-svn: 210833
2014-06-12 21:37:30 +00:00
Rafael Espindola b30469955d Prefix another use of error_code.
llvm-svn: 210832
2014-06-12 21:36:35 +00:00
Rafael Espindola f743031b8b More prefixing of error_code.
llvm-svn: 210831
2014-06-12 21:35:33 +00:00
Matt Arsenault d31b63e6ae Delete trailing whitespace.
Hopefully this forces cmake to re-run.

llvm-svn: 210830
2014-06-12 21:27:03 +00:00
Juergen Ributzka 14832b0ff7 Update test case to use "not" instead of "XFAIL".
llvm-svn: 210829
2014-06-12 21:17:40 +00:00
Duncan P. N. Exon Smith fd5c553f54 GVN: Enable value forwarding for calloc
Enable value forwarding for loads from `calloc()` without an intervening
store.

This change extends GVN to handle the following case:

    %1 = tail call noalias i8* @calloc(i64 1, i64 4)
    %2 = bitcast i8* %1 to i32*
    ; This load is trivially constant zero
    %3 = load i32* %2, align 4

This is analogous to the handling for `malloc()` in the same places.
`malloc()` returns `undef`; `calloc()` returns a zero value.  Note that
it is correct to return zero even for out of bounds GEPs since the
result of such a GEP would be undefined.

Patch by Philip Reames!

llvm-svn: 210828
2014-06-12 21:16:19 +00:00
Matt Arsenault 5d47d4ac7e R600: Mostly remove remaining AMDIL intrinsics.
Delete all unused ones, and add new AMDGPU named intrinsics for
the ones that are. Handle the old AMDIL names for comptability (although
remove their GCCBuiltin names) and add tests since there weren't any
for these before.

llvm-svn: 210827
2014-06-12 21:15:44 +00:00
Nico Weber 39f17b6d46 Tweak documentation.
1. Having "get started", "get involved", and "hacking" makes it hard to find
   how to send patches, so add a link from "get involved" to "hacking".
2. Remove an almost 5 year old note on the test running meachanism changing
   soon.
3. Let "hacking" link to the LLVM developer policy.

llvm-svn: 210826
2014-06-12 21:15:10 +00:00
Jeroen Ketema a3089bd7e5 Remove unused include which breaks build after r210803
Tested with llvm 3.4 and trunk.

llvm-svn: 210825
2014-06-12 21:10:17 +00:00
Eric Christopher 49628bc4ff Move DataLayout from the PPCTargetMachine to the subtarget.
llvm-svn: 210824
2014-06-12 21:08:06 +00:00