Commit Graph

93549 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 72911e49fa Create a new LiveRangeEdit class to keep track of the new registers created when
splitting or spillling, and to help with rematerialization.

Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it
possible to share remat code between InlineSpiller and SplitKit.

llvm-svn: 116543
2010-10-14 23:49:52 +00:00
Jim Ingham 36f3b369d2 Added support for breakpoint conditions. I also had to separate the "run the expression" part of ClangFunction::Execute from the "Gather the expression result" so that in the case of the Breakpoint condition I can move the condition evaluation into the normal thread plan processing.
Also added support for remembering the "last set breakpoint" so that "break modify" will act on the last set breakpoint.

llvm-svn: 116542
2010-10-14 23:45:03 +00:00
Dan Gohman 3f1cf0f373 Unsigned types are TBAA-compatible with their signed counterparts.
Also, handle unknown types conservatively.

llvm-svn: 116541
2010-10-14 23:39:00 +00:00
Jim Grosbach 0b5c743811 Simplify test file a bit.
llvm-svn: 116540
2010-10-14 23:32:44 +00:00
Fariborz Jahanian 9c07e1767d Rewrite bug fix rewriting a property assignment when
its RHS is an ivar. Fixes //rdar: //8541517.

llvm-svn: 116539
2010-10-14 23:31:39 +00:00
Jim Grosbach 89efff3763 Add testcase for RRX and ASRS (which effectively tests MOVs, since those
are just forms of that instruction).

llvm-svn: 116538
2010-10-14 23:29:18 +00:00
Jim Grosbach 19c6cb978b Add missing Rd encoding for MOVs instruction.
llvm-svn: 116537
2010-10-14 23:28:31 +00:00
Dan Gohman 947c9af774 Experimental TBAA support.
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.

llvm-svn: 116536
2010-10-14 23:06:10 +00:00
Devang Patel 0f58561907 Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
This is tested by virtfunc.exp in gdb testsuite.

llvm-svn: 116535
2010-10-14 22:59:23 +00:00
Jim Grosbach 8b6a9c1574 Refactor the MOVsr[al]_flag and RRX pseudo-instructions to really be pseudos
and let the ARMExpandPseudoInsts pass fix them up into the real (MOVs)
instruction form.

llvm-svn: 116534
2010-10-14 22:57:13 +00:00
Dan Gohman 31a01ee3cb Tolerate a null parent pointer.
llvm-svn: 116533
2010-10-14 22:55:57 +00:00
Greg Clayton 8f92f0a35c Fixed an expression parsing issue where if you were stopped somewhere without
debug information and you evaluated an expression, a crash would occur as a
result of an unchecked pointer.

Added the ability to get the expression path for a ValueObject. For a rectangle
point child "x" the expression path would be something like: "rect.top_left.x".
This will allow GUI and command lines to get ahold of the expression path for
a value object without having to explicitly know about the hierarchy. This
means the ValueObject base class now has a "ValueObject *m_parent;" member.
All ValueObject subclasses now correctly track their lineage and are able
to provide value expression paths as well.

Added a new "--flat" option to the "frame variable" to allow for flat variable
output. An example of the current and new outputs:

(lldb) frame variable 
argc = 1
argv = 0x00007fff5fbffe80
pt = {
  x = 2
  y = 3
}
rect = {
  bottom_left = {
    x = 1
    y = 2
  }
  top_right = {
    x = 3
    y = 4
  }
}
(lldb) frame variable --flat 
argc = 1
argv = 0x00007fff5fbffe80
pt.x = 2
pt.y = 3
rect.bottom_left.x = 1
rect.bottom_left.y = 2
rect.top_right.x = 3
rect.top_right.y = 4


As you can see when there is a lot of hierarchy it can help flatten things out.
Also if you want to use a member in an expression, you can copy the text from
the "--flat" output and not have to piece it together manually. This can help
when you want to use parts of the STL in expressions:

(lldb) frame variable --flat
argc = 1
argv = 0x00007fff5fbffea8
hello_world._M_dataplus._M_p = 0x0000000000000000
(lldb) expr hello_world._M_dataplus._M_p[0] == '\0'

llvm-svn: 116532
2010-10-14 22:52:14 +00:00
Dan Gohman 10169b94cf Wire up the -fstrict-aliasing and -fno-strict-aliasing options
to CodeGenOption flags.

llvm-svn: 116530
2010-10-14 22:36:56 +00:00
John McCall f477659040 template-ids are looked up differently in friend declarations.
llvm-svn: 116529
2010-10-14 22:22:28 +00:00
Douglas Gregor 57756eabc9 When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results. 

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.

llvm-svn: 116528
2010-10-14 22:11:03 +00:00
Douglas Gregor c3bbf48f47 Make sure that we diagnose invalid qualifiers on friend functions.
llvm-svn: 116527
2010-10-14 22:03:51 +00:00
John McCall 25c9d1170b At Fariborz's request, a somewhat cleaner bit-combining hack.
llvm-svn: 116524
2010-10-14 21:48:26 +00:00
Andrew Trick 6c8ce5c8b5 Reverting r116493: removes a test that failed on clang selfhost and msvc
llvm-svn: 116522
2010-10-14 21:41:16 +00:00
Argyrios Kyrtzidis a665dc0770 Fix compiler error that clang didn't report (probably same problem as rdar://8552377).
It's more stress-free without access checking though..

llvm-svn: 116521
2010-10-14 21:35:29 +00:00
Caroline Tice 10ad799386 Modify "process handle" so that if no signals are specified it lists/updates them all,
if no update commands are specified it just lists the current values, and show that
it always shows the new values for a signal after it has been updated.  Also updated
the help text to match the new functionality.

llvm-svn: 116520
2010-10-14 21:31:13 +00:00
Fariborz Jahanian a895c38928 Put line number on the diagnostic. //rdar: //8550657.
llvm-svn: 116519
2010-10-14 21:30:10 +00:00
Daniel Dunbar dde0471072 make: Add CheckCommandLineOverrides to my little Makefile library, a routine for
validating the variables set on the make command line.

llvm-svn: 116517
2010-10-14 21:23:37 +00:00
Oscar Fuentes 49f72b635e Added basic support for CPack.
llvm-svn: 116516
2010-10-14 21:11:51 +00:00
Howard Hinnant c1ef47986b Fix two test bugs
llvm-svn: 116515
2010-10-14 21:08:32 +00:00
Francois Pichet 41232a9872 r116509 fixed the Win32 XFAIL.
The failing was due to this:
1. preamble.c contains CR+LF new lines
2. write() is called with a buffer containing the original (CR+LF) to output the result on the console.
3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines.

llvm-svn: 116513
2010-10-14 20:49:46 +00:00
Jim Grosbach 062749cb25 Tweak the ARM backend to use the RRX mnemonic instead of the 'mov a, b, rrx'
pseudonym.

llvm-svn: 116512
2010-10-14 20:43:44 +00:00
Douglas Gregor 0afa7f66cd Tweak the typo-correction implementation to determine corrections
solely based on the names it sees, rather than actual declarations it
gets. In essence, we determine the set of names that are "close
enough" to the typo'd name. Then, we perform name lookup for each of
those names, filtering out those that aren't actually visible, and
typo-correct from the remaining results.

Overall, there isn't much of a change in the behavior of typo
correction here. The only test-suite change comes from the fact that
we make good on our promise to require that the user type 3 characters
for each 1 character corrected. 

The real intent behind this change is to set the stage for an
optimization to typo correction (so that we don't need to deserialize
all declarations in a translation unit) and future work in finding
missing qualification ("'vector' isn't in scope; did you mean
'std::vector'?). Plus, the code is cleaner this way.

llvm-svn: 116511
2010-10-14 20:34:08 +00:00
Francois Pichet a3037c3abd Always use binary mode for output stream. This is important to prevent unwanted end of line conversion on Windows. Should not affect Unix where O_BINARY is not defined. This fix /clang/test/lexer/preamble.c XFAIL on WIN32.
llvm-svn: 116509
2010-10-14 20:30:58 +00:00
Argyrios Kyrtzidis 6843141d39 Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
Progress for rdar://7260160.

llvm-svn: 116508
2010-10-14 20:14:38 +00:00
Argyrios Kyrtzidis 0e88a565c0 Allow deserialization of just the fields of a record, when we want to iterate over them,
instead of deserializing the complete declaration context of the record.

Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.

llvm-svn: 116507
2010-10-14 20:14:34 +00:00
Argyrios Kyrtzidis 55d1fc2d3c Give a default implementation for ASTDeserializationListener's methods, no functionality change.
llvm-svn: 116506
2010-10-14 20:14:28 +00:00
Argyrios Kyrtzidis 0427be938e Introduce command line option -error-on-deserialized-decl that is accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.

This is for testing, to make sure that we don't deserialize stuff needlessly.

llvm-svn: 116505
2010-10-14 20:14:25 +00:00
Argyrios Kyrtzidis 470c454a61 Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits.
As a bonus, now we don't deserialize it unless we need it.

llvm-svn: 116504
2010-10-14 20:14:21 +00:00
Argyrios Kyrtzidis a11aca4646 Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.
llvm-svn: 116503
2010-10-14 20:14:18 +00:00
Howard Hinnant 3daef8dce2 Convert __thread_local_data to the singleton pattern and change export files...
llvm-svn: 116501
2010-10-14 19:24:23 +00:00
Howard Hinnant 10e4a48a26 Convert __thread_local_data to the singleton pattern
llvm-svn: 116500
2010-10-14 19:18:04 +00:00
Jim Grosbach eafcb27ded MOVi16 and MOVT ARM mode encodings.
llvm-svn: 116498
2010-10-14 18:54:27 +00:00
Jakob Stoklund Olesen f11318018a Only split around a loop if the live range has uses outside the loop periphery.
Before we would also split around a loop if any peripheral block had multiple
uses. This could cause repeated splitting when splitting a different live range
would insert uses into the periphery.

Now -spiller=inline passes the nightly test suite again.

llvm-svn: 116494
2010-10-14 18:26:45 +00:00
David Chisnall a9d40ee0ab Test case for r116439
llvm-svn: 116493
2010-10-14 18:15:20 +00:00
Owen Anderson afb95571d0 Try again at implementing thread-safe lazy pass initialization, without depending on static local initialization
being threadsafe AND ensuring that initialization is complete by the time the initializeFooPass method returns.

llvm-svn: 116492
2010-10-14 17:59:03 +00:00
Owen Anderson a1cc6ec3fb Revert r116489. It included some changes I didn't intend to commit, and broke the buildbots.
llvm-svn: 116491
2010-10-14 17:36:50 +00:00
Johnny Chen aadcef54de Make calling the super class's setUp() method less fragile.
llvm-svn: 116490
2010-10-14 17:31:24 +00:00
Owen Anderson d65924f4a0 Apparently MSVC doesn't support thread-safe static local initialization. Roll our own solution instead.
llvm-svn: 116489
2010-10-14 17:26:06 +00:00
Jim Grosbach 8229153629 Simplify encoding information and add 'dst' operand info for TAILJMP.
llvm-svn: 116488
2010-10-14 17:24:28 +00:00
Howard Hinnant a65a935ba4 Bug 7983 fixed by Bernhard Rosenkraenzer
llvm-svn: 116487
2010-10-14 17:11:39 +00:00
Johnny Chen 7518ff0dda Wrap the file writing operations inside a with statement to simplify code.
llvm-svn: 116486
2010-10-14 16:57:08 +00:00
Johnny Chen cd8b2bbed2 Change the call within lldb.py to 'SBDebugger.Initialize()' from 'lldb.SBDebugger.Initialize()'.
Inside the lldb module, there's no need (and as a matter of fact, incorrect) to specify the 'lldb'
module name.

Comment out the call to lldb.SBDebugger.Initialize() within the test driver itself, since it is
already done when we import the lldb.py module.

llvm-svn: 116485
2010-10-14 16:36:49 +00:00
Rafael Espindola bee6e9f8e0 Remove some code duplication.
llvm-svn: 116484
2010-10-14 16:34:44 +00:00
Fariborz Jahanian 681c0754d9 Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788

llvm-svn: 116483
2010-10-14 16:04:05 +00:00
Johnny Chen b7fd763369 Add more comments and wait a little bit after resuming the inferior process before
sending it a signal.

llvm-svn: 116481
2010-10-14 15:58:53 +00:00