Commit Graph

104188 Commits

Author SHA1 Message Date
Stuart Hastings ebddfe60a0 Correct result when a branch condition is live across a block
boundary.  <rdar://problem/8933028>

llvm-svn: 129634
2011-04-16 03:31:26 +00:00
Evan Cheng b14ce09fca Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand the node to a libcall. rdar://9280991
llvm-svn: 129633
2011-04-16 03:08:26 +00:00
Rafael Espindola c715e724de Fix cmake build.
llvm-svn: 129632
2011-04-16 02:06:46 +00:00
Nick Lewycky c5ea8528cc Move the re-stemming function up top and use it where it's currently inlined.
Break the arc-profile code out to a function like the notes emission code is,
and reorder the functions in the file.

The only functionality change is that we no longer modify the Module when the
Module has no debug info to use.

llvm-svn: 129631
2011-04-16 02:05:18 +00:00
Nick Lewycky 966edd068f Rename LineProfiling to GCOVProfiling to more accurately represent what it
does. Also mostly implement it. Still a work-in-progress, but generates legal
output on crafted test cases.

llvm-svn: 129630
2011-04-16 01:20:23 +00:00
Richard Trieu 70d14f5df3 Testing my commit access. A few whitespace changes to Sema/SemaCXXCast.cpp.
llvm-svn: 129629
2011-04-16 01:09:30 +00:00
Argyrios Kyrtzidis 0e993c3249 Introduce Rewriter::IncreaseIndentation() which increase indentations for the lines between the given source range.
To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at
a source location with an indentation one degree lower than the given range.

llvm-svn: 129628
2011-04-16 01:03:33 +00:00
Tanya Lattner 5bea4c3859 Modify test for 32 and 64 bit.
llvm-svn: 129627
2011-04-16 01:00:29 +00:00
Devang Patel 7294d74627 Emit proper selector name in debug info.
llvm-svn: 129626
2011-04-16 00:37:51 +00:00
Devang Patel 9d6c857862 Emit debug info for Objective-C properties.
llvm-svn: 129625
2011-04-16 00:12:55 +00:00
Devang Patel 514b4006c2 Introduce support to encode Objective-C property information in debugging information generated for an interface.
llvm-svn: 129624
2011-04-16 00:11:51 +00:00
Jim Ingham 78a685aa2d Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings.  The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways.  You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.

llvm-svn: 129623
2011-04-16 00:01:13 +00:00
Jim Ingham f46b33852c Fix comment typo.
llvm-svn: 129621
2011-04-15 23:42:06 +00:00
Jim Ingham 337030f556 Work around a llvm gcc bug where the name of a reference doesn't include the "&".
llvm-svn: 129620
2011-04-15 23:41:23 +00:00
Johnny Chen 48592ee5af Thumb2 BFC was insufficiently encoded.
rdar://problem/9292717

llvm-svn: 129619
2011-04-15 22:52:15 +00:00
Johnny Chen 761e1e3512 A8.6.315 VLD3 (single 3-element structure to all lanes)
The a bit must be encoded as 0.

rdar://problem/9292625

llvm-svn: 129618
2011-04-15 22:49:08 +00:00
Tanya Lattner 5ac257d738 Fix bug in vector initializer when initializing a vector with another vector.
Add test case.

llvm-svn: 129617
2011-04-15 22:42:59 +00:00
Akira Hatanaka 2cb3aa30dd Re-enable test o32_cc_vararg.ll.
llvm-svn: 129616
2011-04-15 22:23:09 +00:00
Fariborz Jahanian 0fe1a9861c Enforce nonnull __attribute__ on Objective-C method calls.
// rdar://9287695

llvm-svn: 129615
2011-04-15 22:06:22 +00:00
Douglas Gregor 46ce91a964 Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129614
2011-04-15 22:04:17 +00:00
Douglas Gregor f29216072e Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129613
2011-04-15 22:04:07 +00:00
Akira Hatanaka e24891251c Reverse unnecessary changes made in r129606 and r129608. There is no change in functionality.
llvm-svn: 129612
2011-04-15 21:51:11 +00:00
Johnny Chen b57edcab3b Get rid the of set membership test (log(m)) and, instead, use an index variable 'i'
which advances when src collides with a purged slot.
Hi Stephen, you're welcome to overwrite/or improve upon this version.  Thanks.

llvm-svn: 129611
2011-04-15 21:45:12 +00:00
Cameron Zwarich 9c65e4d69c Add ORR and EOR to the CMP peephole optimizer. It's hard to get isel to generate
a case involving EOR, so I only added a test for ORR.

llvm-svn: 129610
2011-04-15 21:24:38 +00:00
Douglas Gregor b92fbb7036 Fix some broken links, from Matthieu Monrocq
llvm-svn: 129609
2011-04-15 21:21:31 +00:00
Akira Hatanaka d56f2d910b Fix lines that exceed 80 columns. There is no change in functionality.
llvm-svn: 129608
2011-04-15 21:06:38 +00:00
Rafael Espindola 9fef721830 Add this test back for Darwin.
llvm-svn: 129607
2011-04-15 21:06:27 +00:00
Akira Hatanaka aef55c8801 Fix lines that have incorrect indentation or exceed 80 columns. There is no change in functionality.
llvm-svn: 129606
2011-04-15 21:00:26 +00:00
Johnny Chen fec280e750 Update both the src and dst pointers at the end of the loop.
Stephen Wilson is working on a better performing patch in the meantime.

llvm-svn: 129605
2011-04-15 20:59:46 +00:00
Douglas Gregor 5d3d3fa33d For the purposes of overload resolution, consider a conversion from an
Objective-C pointer to void* as a "conversion to void*". This allows
us to prefer an Objective-C object pointer conversion to a superclass
object pointer over an Objective-C object pointer conversion to
cv-void*. Fixes PR9735.

llvm-svn: 129603
2011-04-15 20:45:44 +00:00
Cameron Zwarich 0829b3065a The AND instruction leaves the V flag unmodified, so it falls victim to the same
problem as all of the other instructions we fold with CMPs.

llvm-svn: 129602
2011-04-15 20:45:00 +00:00
Rafael Espindola 7583dbdc88 Fix cmake build.
llvm-svn: 129601
2011-04-15 20:34:45 +00:00
Rafael Espindola beb74c3f00 Some refactoring suggested by Anton Korobeynikov.
llvm-svn: 129600
2011-04-15 20:32:03 +00:00
Cameron Zwarich 93eae1571c Add missing register forms of instructions to the ARM CMP-folding code. This
fixes <rdar://problem/9287901>.

llvm-svn: 129599
2011-04-15 20:28:28 +00:00
Johnny Chen d2ddabac20 Optimize address range coalescing.
DWARFDebugAranges::Sort() calls std::stable_sort() over a set of address ranges
and then proceeds to collapse neighboring ranges together.

One problem with the current implementation is that it does an incomplete job.
When a pair of ranges are merged the next pair considered does not include the
just-merged range.  IOW, three consecutive ranges are never collapsed into one.

Another problem is that for each range merged we are calling
std::vector::erase() which "shifts" all remaining elements of the vector by one
position on every merge.  The end result (in the worst case) is a quadratic
algorithm -- not good when the input vector is large.

The following patch merges all consecutive ranges and removes the quadratic
behavior.  The implementation uses an auxiliary vector of indices in order to
remember all ranges that can be dropped, then performs the coalescing of ranges
in a single pass.

Patch from Stephen Wilson with some minor modification by me.

llvm-svn: 129595
2011-04-15 19:56:24 +00:00
Akira Hatanaka 279169771b Add pass that expands pseudo instructions into target instructions after register allocation. Define pseudos that get expanded into mtc1 or mfc1 instructions.
llvm-svn: 129594
2011-04-15 19:52:08 +00:00
Douglas Gregor 39d1a0973d Forbid the use of C++ new/delete to allocate/free objects within an
address space. I could see that this functionality would be useful,
but not in its current form (where the address space is ignored):
rather, we'd want to encode the address space into the parameter list
passed to operator new/operator delete somehow, which would require a
bunch more semantic analysis.

llvm-svn: 129593
2011-04-15 19:46:20 +00:00
Douglas Gregor a3a020ae0b Parse GNU-style attributes prior to the type-id/new-type-id in a C++
"new" expression. This matches GCC's parser. Test is forthcoming.

llvm-svn: 129592
2011-04-15 19:40:02 +00:00
Evan Cheng a2e61292f0 Increase SubtargetFeatureKV Value and Implies fields to 64 bits since some targets are getting very close to 32 subtarget features. Also teach tablegen to error when there are more than 64 features to guard against undefined behavior. rdar://9282332
llvm-svn: 129590
2011-04-15 19:35:46 +00:00
Joerg Sonnenberger 375249a417 Add encoding tests for flds/filds
llvm-svn: 129589
2011-04-15 19:25:31 +00:00
Nick Lewycky 12c26de5c4 Restore accidentally deleted file (I blame svn).
llvm-svn: 129588
2011-04-15 18:57:00 +00:00
Fariborz Jahanian 193f783a99 Fixes a crash when generating dependency file stuff
and output file is not writable. // rdar://9286457.

llvm-svn: 129587
2011-04-15 18:49:23 +00:00
Nick Lewycky cc647e0937 Reapply r129561, moving the runtime/Makefile that builds compiler-rt into
runtime/compiler-rt/Makefile paving the way to put multiple different libraries
into runtime/ and build all of them.

llvm-svn: 129585
2011-04-15 18:33:24 +00:00
Nick Lewycky 3e7b36fb85 Doug Gregor tells me that runtime/libcxx/ is a placeholder for stuff we never
did. Delete it.

llvm-svn: 129584
2011-04-15 18:02:26 +00:00
Douglas Gregor b472e93af7 Implement appropriate semantics for C++ casting and conversion when
dealing with address-space- and GC-qualified pointers. Previously,
these qualifiers were being treated just like cvr-qualifiers (in some
cases) or were completely ignored, leading to uneven behavior. For
example, const_cast would allow conversion between pointers to
different address spaces.

The new semantics are fairly simple: reinterpret_cast can be used to
explicitly cast between pointers to different address spaces
(including adding/removing addresss spaces), while
static_cast/dynamic_cast/const_cast do not tolerate any changes in the
address space. C-style casts can add/remove/change address spaces
through the reinterpret_cast mechanism. Other non-CVR qualifiers
(e.g., Objective-C GC qualifiers) work similarly.

As part of this change, I tweaked the "casts away constness"
diagnostic to use the term "casts away qualifiers". The term
"constness" actually comes from the C++ standard, despite the fact
that removing "volatile" also falls under that category. In Clang, we
also have restrict, address spaces, ObjC GC attributes, etc., so the
more general "qualifiers" is clearer.

llvm-svn: 129583
2011-04-15 17:59:54 +00:00
Lenny Maiorani fad9d95722 Implements StringRef::compare with bounds. It is behaves similarly to strncmp(). Unit tests also included.
llvm-svn: 129582
2011-04-15 17:56:50 +00:00
Owen Anderson a236485b1f Revert r129561, which broke one of the clang buildbots.
llvm-svn: 129581
2011-04-15 17:35:58 +00:00
Jakob Stoklund Olesen 1af8b4dc92 Teach the SplitKit blitter to handle multiply defined values as well.
The transferValues() function can now handle both singly and multiply defined
values, as long as the resulting live range is known. Only rematerialized values
have their live range recomputed by extendRange().

The updateSSA() function can now insert PHI values in bulk across multiple
values in multiple target registers in one pass. The list of blocks received
from transferValues() is in layout order which seems to work well for the
iterative algorithm. Blocks from extendRange() are still in reverse BFS order,
but this function is used so rarely now that it doesn't matter.

llvm-svn: 129580
2011-04-15 17:24:49 +00:00
Jakob Stoklund Olesen 871f70609a Remember to set flag.
llvm-svn: 129579
2011-04-15 17:24:46 +00:00
Fariborz Jahanian 66a6c06dd6 Allow shadowin of 'self' in objc methods in
cases where stand-alone ivar can be looked up
in shadowed object. To fix gcc compatibility
breakage. // rdar://9284603

llvm-svn: 129576
2011-04-15 17:04:42 +00:00