Commit Graph

108336 Commits

Author SHA1 Message Date
Johnny Chen b0b8be755b Add SBValue::GetID() member method call API.
llvm-svn: 134636
2011-07-07 20:46:23 +00:00
Akira Hatanaka 2f2d9cbb22 This patch adds a flag in MCAsmInfo that indicates whether dwarf register
numbers should be printed instead of symbolic register names in
MCAsmStreamer::EmitRegisterName. This is necessary because some versions of
GNU assembler won't accept code in which symbolic register names are used in
cfi directives. There is no change in behavior unless the flag is explicitly
set to true by a backend.

llvm-svn: 134635
2011-07-07 20:30:33 +00:00
Nick Lewycky d755e6ac48 A redeclaration of an inline method in C99 mode should trigger emission of that
function. Fixes PR10233!

llvm-svn: 134634
2011-07-07 20:25:10 +00:00
Akira Hatanaka 77a9e6e7df Define class MipsMCInstLower.
llvm-svn: 134633
2011-07-07 20:24:54 +00:00
Johnny Chen 28597319fd Add docstrings for SBValueList with example usage.
llvm-svn: 134632
2011-07-07 20:23:22 +00:00
Alexis Hunt efa6776719 Undo r134587 as the bug was actually a deep and hideous one in the
client code.

My bad.

llvm-svn: 134631
2011-07-07 20:14:21 +00:00
Akira Hatanaka ddd1265316 Change visibility of MipsAsmPrinter.
llvm-svn: 134630
2011-07-07 20:10:52 +00:00
Akira Hatanaka 04da3658c6 Define class MipsMCSymbolRefExpr.
llvm-svn: 134629
2011-07-07 19:27:22 +00:00
Akira Hatanaka 9d1936a270 Simplify MipsRegisterInfo::eliminateFrameIndex.
llvm-svn: 134628
2011-07-07 19:13:09 +00:00
Evan Cheng 6dbe713a49 Rewrite comment in English.
llvm-svn: 134627
2011-07-07 19:09:06 +00:00
Evan Cheng 1834f5dcb6 Rename attribute 'thumb' to a more descriptive 'thumb-mode'.
llvm-svn: 134626
2011-07-07 19:05:12 +00:00
Akira Hatanaka 2e766ed2f8 Reverse order of operands of address operand mem so that the base operand comes
before the offset. This change will enable simplification of function
MipsRegisterInfo::eliminateFrameIndex.

llvm-svn: 134625
2011-07-07 18:57:00 +00:00
Fariborz Jahanian 6f472e803b objc-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
This is objc side of things. objc++ side tbd.

llvm-svn: 134624
2011-07-07 18:55:47 +00:00
Johnny Chen c02a273ba6 Fix wording in docstring.
llvm-svn: 134623
2011-07-07 18:50:45 +00:00
Akira Hatanaka ac4db9251b Add missing return statement.
llvm-svn: 134622
2011-07-07 18:27:36 +00:00
Argyrios Kyrtzidis dccf6e1948 Turn hashhash into tok::unkwown when it comes from expanding an argument, per Chris' suggestion.
llvm-svn: 134621
2011-07-07 18:04:47 +00:00
Devang Patel bf8cc60d1b If known DebugLocs do not match then two DBG_VALUE machine instructions are not identical. For example,
DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:32:10 ]
        DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:31:10 ]

These two MIs represent identical value, 3.31...,  for one variable, ds, but they are not identical because the represent two separate instances of inlined variable "ds". 

llvm-svn: 134620
2011-07-07 17:45:33 +00:00
Joerg Sonnenberger c46e3ce58c FreeBSD gets FreeBSD target, just mipsel.
llvm-svn: 134619
2011-07-07 17:01:45 +00:00
Joerg Sonnenberger 39ec119132 Slightly improve the code to derive target from program name to not
fault if no arguments are given.

llvm-svn: 134618
2011-07-07 16:57:26 +00:00
Joerg Sonnenberger e0cbf7409c Recognize mipseb as alias for mips for symmetry with mipsel.
llvm-svn: 134617
2011-07-07 16:53:52 +00:00
Oscar Fuentes 32a45e5aeb Update CMake library dependencies
llvm-svn: 134616
2011-07-07 16:33:00 +00:00
Douglas Gregor 2132584d36 Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!

llvm-svn: 134615
2011-07-07 16:03:39 +00:00
Douglas Gregor cc4a55f6f2 Fix CMake build
llvm-svn: 134614
2011-07-07 15:59:22 +00:00
Enrico Granata 7f941d95cc Fixed a warning where initializing CommandObject::g_arguments_data[] required global constructors
llvm-svn: 134613
2011-07-07 15:49:54 +00:00
David Chisnall 1bfe6d374d If we're using the pure non-fragile ABI, then skip some of the contortions required to support the transitional ABI.
llvm-svn: 134612
2011-07-07 12:34:51 +00:00
David Chisnall a918b88952 Set a flag to tell the runtime when we're compiling in ARC mode and use the pure-nonfragile ABI for both ARC and GC mode.
llvm-svn: 134611
2011-07-07 11:22:31 +00:00
David Chisnall 561471d2f3 Fix example: variable is initialized to 10 and then has 11 stored in it, but in the expanded version is initialized to 11.
llvm-svn: 134610
2011-07-07 09:49:59 +00:00
Cameron Zwarich 148220306f The VMLA instruction and its friends are not actually fused; they're plain old
multiply-accumulate instructions with separate rounding steps.

llvm-svn: 134609
2011-07-07 08:28:52 +00:00
Evan Cheng f2c2616e72 Sink feature IsThumb into MC layer.
llvm-svn: 134608
2011-07-07 08:26:46 +00:00
Evan Cheng 51dbe6e705 Feature bits are 64-bits.
llvm-svn: 134607
2011-07-07 07:45:49 +00:00
Evan Cheng 1a72add615 Compute feature bits at time of MCSubtargetInfo initialization.
llvm-svn: 134606
2011-07-07 07:07:08 +00:00
John McCall 4db5c3c83a In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain.  This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800

llvm-svn: 134605
2011-07-07 06:58:02 +00:00
Chris Lattner 54677c15f3 type can be null
llvm-svn: 134601
2011-07-07 05:29:18 +00:00
Chris Lattner cdfcc2dee6 use a more efficient check for 'is metadata'
llvm-svn: 134599
2011-07-07 05:12:37 +00:00
Greg Clayton 1d4313b261 Stop the lldb_private::RegularExpression class from implicitly
constructing itself and causing unexpected things to happen
in LLDB.

llvm-svn: 134598
2011-07-07 04:49:07 +00:00
Bill Wendling 667be58220 Use ArrayRef instead of a std::vector&.
llvm-svn: 134595
2011-07-07 04:42:01 +00:00
Greg Clayton 715c236577 Centralize the variable display prefs into a new option
group class: OptionGroupVariable. It gets initialized with
a boolean that indicates if the frame specific options are
included so that this can be used in both the "frame variable"
and "target variable" commands.

Removed the global functionality from the "frame variable" 
command. Users should switch to using the "target variable"
command.

llvm-svn: 134594
2011-07-07 04:38:25 +00:00
Lang Hames 5a00499e87 Add functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The
hasPredecessorHelper function allows predecessors to be cached to speed up
repeated invocations. This fixes PR10186.

X.isPredecessorOf(Y) now just calls Y.hasPredecessor(X)

Y.hasPredecessor(X) calls Y.hasPredecessorHelper(X, Visited, Worklist) with
empty Visited and Worklist sets (i.e. no caching over invocations).

Y.hasPredecessorHelper(X, Visited, Worklist) caches search state in Visited
and Worklist to speed up repeated calls. The Visited set is searched for X
before going to the worklist to further search the DAG if necessary.

llvm-svn: 134592
2011-07-07 04:31:51 +00:00
Argyrios Kyrtzidis c44b93d772 [arcmt] Add -ccc-arcmt-check/-ccc-arcmt-modify driver option aliases.
llvm-svn: 134591
2011-07-07 04:00:39 +00:00
Evan Cheng 8b2bda09a5 Change some ARM subtarget features to be single bit yes/no in order to sink them down to MC layer. Also fix tests.
llvm-svn: 134590
2011-07-07 03:55:05 +00:00
Nick Lewycky 7c6c6cc425 Sort #includes.
llvm-svn: 134589
2011-07-07 03:54:51 +00:00
Argyrios Kyrtzidis e245aa2a93 When expanding macro arguments, treat '##' coming from an argument as a normal token.
e.g.

#define M(x) A x B
M(##) // should expand to 'A ## B', not 'AB'

llvm-svn: 134588
2011-07-07 03:40:37 +00:00
Argyrios Kyrtzidis 41fb2d95a3 Make the Preprocessor more memory efficient and improve macro instantiation diagnostics.
When a macro instantiation occurs, reserve a SLocEntry chunk with length the
full length of the macro definition source. Set the spelling location of this chunk
to point to the start of the macro definition and any tokens that are lexed directly
from the macro definition will get a location from this chunk with the appropriate offset.

For any tokens that come from argument expansion, '##' paste operator, etc. have their
instantiation location point at the appropriate place in the instantiated macro definition
(the argument identifier and the '##' token respectively).
This improves macro instantiation diagnostics:

Before:

t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int')
int y = M(/);
        ^~~~
t.c:5:11: note: instantiated from:
int y = M(/);
          ^

After:

t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int')
int y = M(/);
        ^~~~
t.c:3:20: note: instantiated from:
\#define M(op) (foo op 3);
                ~~~ ^  ~
t.c:5:11: note: instantiated from:
int y = M(/);
          ^

The memory savings for a candidate boost library that abuses the preprocessor are:

- 32% less SLocEntries (37M -> 25M)
- 30% reduction in PCH file size (900M -> 635M)
- 50% reduction in memory usage for the SLocEntry table (1.6G -> 800M)

llvm-svn: 134587
2011-07-07 03:40:34 +00:00
Argyrios Kyrtzidis c8f7e213b9 Fix bug in SourceManager::getDecomposedInstantiationLocSlowCase.
It would add up relative (decomposed) offsets like in getDecomposedSpellingLocSlowCase, but while
it makes sense to preserve the offset among lexed spelling locations, it doesn't make
sense to add anything to the offset of the instantiation location. The instantiation
location will be the same regardless of the relative offset in the tokens that were
instantiated.

This bug didn't actually affect anything because, currently, in practice we never create macro
locations with relative offset greater than 0.

llvm-svn: 134586
2011-07-07 03:40:27 +00:00
Argyrios Kyrtzidis 2cc62093fc For -print-stats, add the number of bytes that SLocEntryTable consumes.
llvm-svn: 134585
2011-07-07 03:40:24 +00:00
Jim Ingham c257270094 Typo in header doc.
llvm-svn: 134584
2011-07-07 02:22:51 +00:00
Nick Lewycky 365efd62a1 In an in-class initialization, defer checks for value-dependent initialization
expressions.

llvm-svn: 134583
2011-07-07 02:20:13 +00:00
Greg Clayton 644247c1dc Added "target variable" command that allows introspection of global
variables prior to running your binary. Zero filled sections now get
section data correctly filled with zeroes when Target::ReadMemory
reads from the object file section data.

Added new option groups and option values for file lists. I still need
to hook up all of the options to "target variable" to allow more complete
introspection by file and shlib.

Added the ability for ValueObjectVariable objects to be created with
only the target as the execution context. This allows them to be read
from the object files through Target::ReadMemory(...). 

Added a "virtual Module * GetModule()" function to the ValueObject
class. By default it will look to the parent variable object and
return its module. The module is needed when we have global variables
that have file addresses (virtual addresses that are specific to
module object files) and in turn allows global variables to be displayed
prior to running.

Removed all of the unused proxy object support that bit rotted in 
lldb_private::Value.

Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
with the more efficient "FileSpec::Equal (lhs, rhs)".

Improved logging in GDB remote plug-in.

llvm-svn: 134579
2011-07-07 01:59:51 +00:00
Eli Friedman a3c122db7e Zap a couple unnecessary loops.
llvm-svn: 134578
2011-07-07 01:54:01 +00:00
Bill Wendling b6adf46f62 Add a target hook to encode the compact unwind information.
llvm-svn: 134577
2011-07-07 00:54:13 +00:00