Commit Graph

118856 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 4d873b725e [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfo
so that we can access the attributes of an entity for a reference.

llvm-svn: 146616
2011-12-15 00:05:00 +00:00
Argyrios Kyrtzidis 41cfce25fe [libclang] Suppress indexing references for occurrences of the interface
in a superclass and the protocols in a protocol list.

llvm-svn: 146615
2011-12-15 00:04:56 +00:00
Kevin Enderby dc785db0c3 Another improvement to the implementation of .incbin directive by avoiding a
buffer copy.  Suggestion by Chris Lattner!

llvm-svn: 146614
2011-12-15 00:00:27 +00:00
Douglas Gregor 1c35b0313b Replace Decl::isSameEntityAs with a free function declaresSameEntity, which can cope with NULL pointer values
llvm-svn: 146613
2011-12-14 23:59:32 +00:00
Bill Wendling ae94fb4009 The saved registers weren't being processed in the correct order. This lead to
the compact unwind claiming that one register was saved before another, which
isn't all that great in general. Process them in the natural order. Reverse the
list only when necessary for the algorithm.

llvm-svn: 146612
2011-12-14 23:53:24 +00:00
Sean Callanan 50952e9571 I have added a function to SBTarget that allows
clients to disassemble a series of raw bytes as
demonstrated by a new testcase.

In the future, this API will also allow clients
to provide a callback that adds comments for
addresses in the disassembly.

I also modified the SWIG harness to ensure that
Python ByteArrays work as well as strings as
sources of raw data.

llvm-svn: 146611
2011-12-14 23:49:37 +00:00
Dan Gohman 75d7d5e988 Move Instruction::isSafeToSpeculativelyExecute out of VMCore and
into Analysis as a standalone function, since there's no need for
it to be in VMCore. Also, update it to use isKnownNonZero and
other goodies available in Analysis, making it more precise,
enabling more aggressive optimization.

llvm-svn: 146610
2011-12-14 23:49:11 +00:00
Jakob Stoklund Olesen 9efd7ebf0a Consider CPE alignment in CreateNewWater().
An aligned constant pool entry may require extra alignment padding where
the new water is created.  Take that into account when computing offset.

Also consider the alignment of other constant pool entries when
splitting a basic block.  Alignment padding may make it necessary to
move the split point higher.

llvm-svn: 146609
2011-12-14 23:48:54 +00:00
Jim Grosbach da51104282 ARM NEON better assembly operand range checking for lane indices of VLD/VST.
llvm-svn: 146608
2011-12-14 23:35:06 +00:00
Richard Smith 902ca2138f Produce more detailed diagnostics when static_assert condition is not an ICE.
llvm-svn: 146607
2011-12-14 23:32:26 +00:00
Johnny Chen a2b514a3f2 Add more robustness - use PyString_CheckExact(pvalue) to check whether pvalue is a Python string before
calling PyString_AsString(pvalue).  Similar to http://llvm.org/viewvc/llvm-project?rev=146584&view=rev.

llvm-svn: 146606
2011-12-14 23:27:53 +00:00
Jim Grosbach a8aa30b620 ARM NEON VLD2/VST2 lane indexed assembly parsing and encoding.
llvm-svn: 146605
2011-12-14 23:25:46 +00:00
Devang Patel c268688643 Do not sink instruction, if it is not profitable.
On ARM, peephole optimization for ABS creates a trivial cfg triangle which tempts machine sink to sink instructions in code which is really straight line code. Sometimes this sinking may alter register allocator input such that use and def of a reg is divided by a branch in between, which may result in extra spills. Now mahine sink avoids sinking if final sink destination is post dominator.

Radar 10266272.

llvm-svn: 146604
2011-12-14 23:20:38 +00:00
Evan Cheng d647109ff9 Add a blurb about MachineInstr bundling support.
llvm-svn: 146603
2011-12-14 22:57:45 +00:00
Bill Wendling b108aaebbe Reapply r146481 with a fix to create the Builder value in the correct place and
with the correct iterator.
<rdar://problem/10530851>

llvm-svn: 146600
2011-12-14 22:45:33 +00:00
Kevin Enderby ad41ab5015 Improve the implementation of .incbin directive by replacing a loop by using
getStreamer().EmitBytes.  Suggestion by Benjamin Kramer!

llvm-svn: 146599
2011-12-14 22:34:45 +00:00
Andrew Trick e0ced62119 LSR: Fold redundant bitcasts on-the-fly.
llvm-svn: 146597
2011-12-14 22:07:19 +00:00
Richard Smith 9af58d4426 Halve the constexpr recursion depth in this test in an attempt to make the
freebsd bots happy. In the longer term, we should have a mechanism for moving
constexpr recursion off the call stack, to support the default limit of 512
suggested by the standard.

llvm-svn: 146596
2011-12-14 21:55:23 +00:00
Rafael Espindola 00b29189b7 Fix typos.
llvm-svn: 146595
2011-12-14 21:50:24 +00:00
Jim Grosbach bb18fb4f52 ARM NEON fix alignment encoding for VST2 w/ writeback.
Add tests for w/ writeback instruction parsing and encoding.

llvm-svn: 146594
2011-12-14 21:49:24 +00:00
Kevin Enderby 109f25c966 Add the .incbin directive which takes the binary data from a file and emits
it to the streamer.  rdar://10383898

llvm-svn: 146592
2011-12-14 21:47:48 +00:00
Douglas Gregor 37a9102b0b Introduce Decl::isSameEntityAs(), to help compare declarations using
their canonical Decl nodes. Not used yet, but it will be.

llvm-svn: 146591
2011-12-14 21:44:45 +00:00
Jim Grosbach 8e987f5e25 Nuke old code. Missed in last commit.
llvm-svn: 146590
2011-12-14 21:41:32 +00:00
Evan Cheng c984bf8fb0 Add high level description of MachineInstr bundles.
llvm-svn: 146589
2011-12-14 21:32:14 +00:00
Jim Grosbach 88ac761aa4 ARM NEON refactor VST2 w/ writeback instructions.
In addition to improving the representation, this adds support for assembly
parsing of these instructions.

llvm-svn: 146588
2011-12-14 21:32:11 +00:00
Douglas Gregor 7234103225 Don't consider an overloaded operator& when the expression is actually
going to be a pointer-to-member constant. Fixes <rdar://problem/10544564>.

llvm-svn: 146587
2011-12-14 21:23:13 +00:00
Rafael Espindola 224dd63fff Don't use the frame pointer on linux x86 and x86_64 if optimizing. This
matches gcc's behavior.

Fixes PR8186.

llvm-svn: 146586
2011-12-14 21:02:23 +00:00
Jim Grosbach b7ec06c5c9 ARM NEON improve factoring a bit. No functional change.
llvm-svn: 146585
2011-12-14 20:59:15 +00:00
Johnny Chen 1d9cb8a184 http://llvm.org/bugs/show_bug.cgi?id=11569
LLDBSwigPythonCallCommand crashes when a command script returns an object 

Add more robustness to LLDBSwigPythonCallCommand.  It should check whether the returned Python object
is a string, and only assign it as the error msg when the check holds.
Also add a regression test.

llvm-svn: 146584
2011-12-14 20:40:27 +00:00
Evan Cheng da103bf9ec Model ARM predicated write as read-mod-write. e.g.
r0 = mov #0
r0 = moveq #1

Then the second instruction has an implicit data dependency on the first
instruction. Sadly I have yet to come up with a small test case that
demonstrate the post-ra scheduler taking advantage of this.

llvm-svn: 146583
2011-12-14 20:00:08 +00:00
Anna Zaks 93237e4808 [analyzer] Disable verification step on the failing test.
I need to keep the test itself in the repository since it's the only way I can currently reproduce the issue.

llvm-svn: 146582
2011-12-14 19:39:46 +00:00
DeLesley Hutchins 36f5d8518b Allow empty argument lists in thread safety attributes
llvm-svn: 146580
2011-12-14 19:36:06 +00:00
Jim Grosbach 8d24618975 ARM NEON VST2 assembly parsing and encoding.
Work in progress. Parsing for non-writeback, single spaced register lists
works now. The rest have the representations better factored, but still
need more to be able to parse properly.

llvm-svn: 146579
2011-12-14 19:35:22 +00:00
Stepan Dyatkovskiy d7b2bb3bdd Fix for bug #11429: Wrong behaviour for switches. Small improvement for code size heuristics.
llvm-svn: 146578
2011-12-14 19:19:17 +00:00
Dan Gohman bd944b4153 It turns out that clang does use pointer-to-function types to
point to ARC-managed pointers sometimes. This fixes rdar://10551239.

llvm-svn: 146577
2011-12-14 19:10:53 +00:00
David Blaikie 96b4874b50 Move & comment the 'decltype in declarator-id' as suggested by Doug Gregor.
llvm-svn: 146576
2011-12-14 18:59:02 +00:00
Jakob Stoklund Olesen e5585e8fed Fix speling and 80-col.
llvm-svn: 146575
2011-12-14 18:49:13 +00:00
Anna Zaks 72e90d54ae [analyzer] Re-enable the test which was failing on one of the bots.
I cannot reproduce the failures neither on my machine nor on the same buildbot machine (with the clang binary built on it). Let's see if it fails again..

llvm-svn: 146574
2011-12-14 18:34:17 +00:00
Akira Hatanaka bff84e1914 Add support for local dynamic TLS model in LowerGlobalTLSAddress. Direct object
emission is not supported yet, but a patch that adds the support should follow
soon.

llvm-svn: 146572
2011-12-14 18:26:41 +00:00
Jim Grosbach 4288b9786f Fix copy/pasto that skipped the 'modify' step.
llvm-svn: 146571
2011-12-14 18:12:37 +00:00
Jim Grosbach 1bb6e066f6 ARM/Thumb2 mov vs. mvn alias goes both ways.
llvm-svn: 146570
2011-12-14 17:56:51 +00:00
Chad Rosier ded6160473 VFP2 is required for FP loads. Noticed by inspection.
llvm-svn: 146569
2011-12-14 17:55:03 +00:00
Chad Rosier fce28914ea Tidy up.
llvm-svn: 146568
2011-12-14 17:32:02 +00:00
Jim Grosbach a342667fd0 ARM/Thumb2 'cmp rn, #imm' alias to cmn.
When 'cmp rn #imm' doesn't match due to the immediate not being representable,
but 'cmn rn, #-imm' does match, use the latter in place of the former, as
it's equivalent.

rdar://10552389

llvm-svn: 146567
2011-12-14 17:30:24 +00:00
Chad Rosier a26979be29 Fix 80-column violation and extraneous brackets.
llvm-svn: 146566
2011-12-14 17:26:05 +00:00
Bob Wilson 16c4195548 Fix obvious error in _mm_test_all_zeros. PR11565.
Patch by Mathias Gaunard!

llvm-svn: 146565
2011-12-14 17:17:16 +00:00
Douglas Gregor 40d009ff0c Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.

llvm-svn: 146564
2011-12-14 17:12:03 +00:00
Douglas Gregor 4a814568b2 When name lookup comes across a declaration that is in a module that
is not visible, look for any previous declarations of that entity that
might be visible.

llvm-svn: 146563
2011-12-14 16:03:29 +00:00
Matt Beaumont-Gay 5533a55172 r146430 lost some compile-time performance on MultiSource/Benchmarks/MiBench/security-rijndael; this gets most of it back.
llvm-svn: 146562
2011-12-14 16:02:15 +00:00
Duncan Sands 9aaec15ce3 Vectors are not aggregate types (see isAggregateType).
llvm-svn: 146561
2011-12-14 15:44:20 +00:00