Commit Graph

118678 Commits

Author SHA1 Message Date
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
Tobias Grosser e1bc007afa Allow to run the Polly preopt passes with -O0
To extract a preoptimized LLVM-IR file from a C-file run:

clang -Xclang -load -Xclang LLVMPolly.so -O0 -mllvm -polly file.c -S -emit-llvm

On the generated file you can directly run passes such as:
'opt -view-scops file.s'

llvm-svn: 146560
2011-12-14 12:21:31 +00:00
Tobias Grosser 5c28af1c23 www: Enable mp4 version of the developer meeting talk
llvm-svn: 146559
2011-12-14 12:21:27 +00:00
Tobias Grosser f4bea399a9 Scheduler: Try to maximize the band depth
Previously the scheduler was splitting bands at the level at which it detected
that the splitting of the band is necessary. This may introduce an additional
level of bands, that can be avoided by backtracking and splitting on a higher
level. Additional splits reduce the number of loops that can be tiled, such that
avoiding splits and maximizing the band depth seems preferable.

As a first data point we looked at 2mm and 3mm from the polybench test suite.
For both maximizing the tilable bands results in a significant (5-10x)
performance improvement.

This patch enables the isl scheduler option to maximize the band depth.

llvm-svn: 146557
2011-12-14 08:58:43 +00:00
Tobias Grosser 768140c6e1 Scheduler: Set maximal constant term
If larger coefficients appear as part of the input dependences, the schedule
calculation can take a very long time. We observed that the main overhead in
this calculation is due to optimizing the constant coefficients. They are
misused to increase locality by merging several unrelated dimensions into a
single dimension. This unwanted optimization increases the complexity of the
generated code and furthermore slows it down.

We use a new isl scheduler option to bound the values in the constant dimension
by a user defined value (20 in our case). If the right value is choosen, costly
overoptimization is prevented.

This solution works, but requires a specific (here almost randomly choosen)
value by which the constants are bound. For the moment, this is our best
solution, but we hope to to find a more generic one later on.

After these patch the extremly long compile time for simple kernels like 2mm or
3mm is reduced to a reasonable amount of time (Not more than a couple of seconds
even in debug mode).

llvm-svn: 146556
2011-12-14 08:58:39 +00:00
Tobias Grosser cae6b39cff Update isl
This updates bringes new options for the isl scheduler.

llvm-svn: 146555
2011-12-14 08:58:36 +00:00
Bob Wilson 721d4b858d Enable stack protectors by default for iOS. <rdar://problem/8836680>
llvm-svn: 146552
2011-12-14 06:08:25 +00:00
Jason Molenda 4f6f5f9cd2 On Mac OS X the Objective-C runtime (libobjc) has many critical
dispatch functions that are implemented in hand-written assembly.
There is also hand-written eh_frame instructions for unwinding
from these functions.

Normally we don't use eh_frame instructions for the currently
executing function, prefering the assembly instruction profiling
method.  But in these hand-written dispatch functions, the
profiling is doomed and we should use the eh_frame instructions.

Unfortunately there's no easy way to flag/extend the eh_frame/debug_frame
sections to annotate if the unwind instructions are accurate at
all addresses ("asynchronous") or if they are only accurate at locations
that can throw an exception ("synchronous" and the normal case for 
gcc/clang generated eh_frame/debug_frame CFI).

<rdar://problem/10508134>

llvm-svn: 146551
2011-12-14 04:22:18 +00:00
NAKAMURA Takumi 4c5ab7bb38 llvm/lib/CodeGen: Fix cmake build since r146542.
llvm-svn: 146550
2011-12-14 03:50:53 +00:00
Eli Friedman fdeaf25827 Fix a stupid typo in MemDepPrinter.
llvm-svn: 146549
2011-12-14 02:54:39 +00:00
Eli Friedman 6512cd4366 Add missing cases to SDNode::getOperationName(). Patch by Micah Villmow.
llvm-svn: 146548
2011-12-14 02:28:54 +00:00
Evan Cheng 87975df580 Allow target to specify register output dependency. Still default to one.
llvm-svn: 146547
2011-12-14 02:28:53 +00:00
Bill Wendling 2be88f1301 Revert r146481 to review possible miscompilations.
llvm-svn: 146546
2011-12-14 02:18:26 +00:00
Bill Wendling 27a9762b3c Disable to review some failures.
llvm-svn: 146545
2011-12-14 02:16:54 +00:00
Eli Friedman 206dba0538 Switch test over to using -verify instead of using grep. PR11552.
llvm-svn: 146544
2011-12-14 02:16:13 +00:00
Jim Grosbach ab5830e51b ARM assembler support for the target-specific .req directive.
rdar://10549683

llvm-svn: 146543
2011-12-14 02:16:11 +00:00
Evan Cheng 7fae11b231 - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function
to finalize MI bundles (i.e. add BUNDLE instruction and computing register def
  and use lists of the BUNDLE instruction) and a pass to unpack bundles.
- Teach more of MachineBasic and MachineInstr methods to be bundle aware.
- Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to
  prevent IT blocks from being broken apart.

llvm-svn: 146542
2011-12-14 02:11:42 +00:00
Anna Zaks 87ebe63542 [analyzer] Revert the taint test, which is failing on one of the bots for time being.
llvm-svn: 146541
2011-12-14 02:00:54 +00:00
Johnny Chen c6770763e6 http://llvm.org/bugs/show_bug.cgi?id=11560 lldb::SBTarget::FindFirstType crashes when passed None
Add null checks to several functions.  Plus add test scenario for passing None to SBTarget.FindFirstType(None) and friends.

llvm-svn: 146540
2011-12-14 01:43:31 +00:00
Johnny Chen 798b0c8340 Print out the breakpoint description only if self.TraceOn() is True.
llvm-svn: 146539
2011-12-14 01:36:04 +00:00
Chad Rosier 4020ae75ea Add newline at EOF.
llvm-svn: 146538
2011-12-14 01:34:39 +00:00
Sean Callanan fc4f2fb0da This commit is the result of a general audit of
the expression parser to locate instances where
dyn_cast<>() and isa<>() are used on types, and
replace them with getAs<>() as appropriate.

The difference is that dyn_cast<>() and isa<>()
are essentially LLVM/Clang's equivalent of RTTI
-- that is, they try to downcast the object and
return NULL if they cannot -- but getAs<>() can
traverse typedefs to perform a semantic cast.

llvm-svn: 146537
2011-12-14 01:13:04 +00:00
Anna Zaks 099fe3fb28 [analyzer] Treat stdin as a source of taint.
Some of the test cases do not currently work because the analyzer core
does not seem to call checkers for pre/post DeclRefExpr visits.
(Opened radar://10573500. To be fixed later on.)

llvm-svn: 146536
2011-12-14 00:56:18 +00:00
Anna Zaks 04b57c25bc [analyzer] Minor refactor to addTaint.
llvm-svn: 146535
2011-12-14 00:56:15 +00:00
Nick Lewycky cfde1a26b4 DW_AT_virtuality is also defined to be constant, not flag.
llvm-svn: 146534
2011-12-14 00:56:07 +00:00
Anna Zaks eefc0e9342 [analyzer] Mark output of fscanf and fopen as tainted.
llvm-svn: 146533
2011-12-14 00:56:02 +00:00
Anna Zaks d6bb3227de [analyzer] Mark getenv output as tainted.
Also, allow adding taint to a region (not only a symbolic value).

llvm-svn: 146532
2011-12-14 00:55:58 +00:00
Chad Rosier 8f92ce6e39 Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.
llvm-svn: 146531
2011-12-14 00:29:31 +00:00
Chad Rosier 1332d9b26a Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.
llvm-svn: 146530
2011-12-14 00:29:23 +00:00