platform/upstream/llvm.git
12 years agoFixit for r146633. Make sure UINT_MAX is defined on all platforms.
Anna Zaks [Thu, 15 Dec 2011 02:58:00 +0000 (02:58 +0000)]
Fixit for r146633. Make sure UINT_MAX is defined on all platforms.

(Attempt to turn debian-fnt buildbot back to green.)

llvm-svn: 146635

12 years agoEnhance the -Wsign-compare handling to suppress the -Wsign-compare warning in the...
Eli Friedman [Thu, 15 Dec 2011 02:41:52 +0000 (02:41 +0000)]
Enhance the -Wsign-compare handling to suppress the -Wsign-compare warning in the case of a shifted bitfield.  PR11572.

llvm-svn: 146634

12 years agoAdd support for matching one or more (aka regex +) diagnostic messages with -verify.
Anna Zaks [Thu, 15 Dec 2011 02:28:16 +0000 (02:28 +0000)]
Add support for matching one or more (aka regex +) diagnostic messages with -verify.

Ex:
// expected-warning + {{tainted}

llvm-svn: 146633

12 years agogcov-style profiling support for OpenBSD. Patch by Jonathan Gray.
Eli Friedman [Thu, 15 Dec 2011 02:15:56 +0000 (02:15 +0000)]
gcov-style profiling support for OpenBSD.  Patch by Jonathan Gray.

llvm-svn: 146631

12 years agoDon't try to form FGETSIGN after legalization; it is possible in some cases, but...
Eli Friedman [Thu, 15 Dec 2011 02:07:20 +0000 (02:07 +0000)]
Don't try to form FGETSIGN after legalization; it is possible in some cases, but the existing code can't do it correctly. PR11570.

llvm-svn: 146630

12 years agohttp://llvm.org/bugs/show_bug.cgi?id=11579
Johnny Chen [Thu, 15 Dec 2011 01:55:36 +0000 (01:55 +0000)]
http://llvm.org/bugs/show_bug.cgi?id=11579
lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds

SBValue::CreateValueFromAddress() should check the validity of type and its derived pointer type
before using it.  Add a test case.

llvm-svn: 146629

12 years ago[analyzer] Ensure that the order in which checker callbacks are called
Anna Zaks [Thu, 15 Dec 2011 01:36:04 +0000 (01:36 +0000)]
[analyzer] Ensure that the order in which checker callbacks are called
is deterministic.

Non-determinism was the reason for the test which caused the earlier
buildbot failures, so re-enable the test.

llvm-svn: 146628

12 years agoUse SmallVector/assign(), rather than std::vector/push_back().
Chad Rosier [Thu, 15 Dec 2011 01:16:09 +0000 (01:16 +0000)]
Use SmallVector/assign(), rather than std::vector/push_back().

llvm-svn: 146627

12 years agoobjc: do not auto synthesize properties declared in
Fariborz Jahanian [Thu, 15 Dec 2011 01:03:18 +0000 (01:03 +0000)]
objc: do not auto synthesize properties declared in
protocols; with a warning. // rdar://10567333

llvm-svn: 146626

12 years agoAdd support for lowering fneg when AVX is enabled.
Chad Rosier [Thu, 15 Dec 2011 01:02:25 +0000 (01:02 +0000)]
Add support for lowering fneg when AVX is enabled.
rdar://10566486

llvm-svn: 146625

12 years agoAdded InstCombine for "select cond, ~cond, x" type patterns
Pete Cooper [Thu, 15 Dec 2011 00:56:45 +0000 (00:56 +0000)]
Added InstCombine for "select cond, ~cond, x" type patterns

These can be reduced to "~cond & x" or "~cond | x"

llvm-svn: 146624

12 years agoEnable synthesis of FLOG2 and FEXP2 SelectionDAG nodes from libm calls. These are...
Owen Anderson [Thu, 15 Dec 2011 00:54:12 +0000 (00:54 +0000)]
Enable synthesis of FLOG2 and FEXP2 SelectionDAG nodes from libm calls.  These are already marked as illegal by default.

llvm-svn: 146623

12 years agoIn debugger support mode, if we have a top-level message send
Douglas Gregor [Thu, 15 Dec 2011 00:53:32 +0000 (00:53 +0000)]
In debugger support mode, if we have a top-level message send
expression with an unknown result type, assume that the result type is
'id'. Fixes <rdar://problem/10400663>.

llvm-svn: 146622

12 years agoMake loop preheader insertion in LoopSimplify handle the case where the loop header...
Eli Friedman [Thu, 15 Dec 2011 00:50:34 +0000 (00:50 +0000)]
Make loop preheader insertion in LoopSimplify handle the case where the loop header is a landing pad correctly (by splitting the landingpad out of the loop header).  Make some adjustments to the rest of LoopSimplify to make it clear that the rest of LoopSimplify isn't making bad assumptions about the presence of landing pads.  PR11575.

llvm-svn: 146621

12 years agoModify how the -verify flag works. Currently, the verification string and
Richard Trieu [Thu, 15 Dec 2011 00:38:15 +0000 (00:38 +0000)]
Modify how the -verify flag works.  Currently, the verification string and
diagnostic message are compared.  If either is a substring of the other, then
no error is given.  This gives rise to an unexpected case:

  // expect-error{{candidate function has different number of parameters}}

will match the following error messages from Clang:

  candidate function has different number of parameters (expected 1 but has 2)
  candidate function has different number of parameters

It will also match these other error messages:

  candidate function
  function has different number of parameters
  number of parameters

This patch will change so that the verification string must be a substring of
the diagnostic message before accepting.  Also, all the failing tests from this
change have been corrected.  Some stats from this cleanup:

87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)

llvm-svn: 146619

12 years agoReplace all comparisons between ObjCInterfaceDecl pointers with calls
Douglas Gregor [Thu, 15 Dec 2011 00:29:59 +0000 (00:29 +0000)]
Replace all comparisons between ObjCInterfaceDecl pointers with calls
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.

llvm-svn: 146618

12 years agoRe-re-enable compact unwind after fixing a failure in SingleSource/Benchmarks/Shootou...
Bill Wendling [Thu, 15 Dec 2011 00:14:24 +0000 (00:14 +0000)]
Re-re-enable compact unwind after fixing a failure in SingleSource/Benchmarks/Shootout-C++/except.cpp and friends. It was encoding the stored registers in the wrong order.

llvm-svn: 146617

12 years ago[libclang] Indexing API: provide an attribute list inside CXIdxEntityInfo
Argyrios Kyrtzidis [Thu, 15 Dec 2011 00:05:00 +0000 (00:05 +0000)]
[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

12 years ago[libclang] Suppress indexing references for occurrences of the interface
Argyrios Kyrtzidis [Thu, 15 Dec 2011 00:04:56 +0000 (00:04 +0000)]
[libclang] Suppress indexing references for occurrences of the interface
in a superclass and the protocols in a protocol list.

llvm-svn: 146615

12 years agoAnother improvement to the implementation of .incbin directive by avoiding a
Kevin Enderby [Thu, 15 Dec 2011 00:00:27 +0000 (00:00 +0000)]
Another improvement to the implementation of .incbin directive by avoiding a
buffer copy.  Suggestion by Chris Lattner!

llvm-svn: 146614

12 years agoReplace Decl::isSameEntityAs with a free function declaresSameEntity, which can cope...
Douglas Gregor [Wed, 14 Dec 2011 23:59:32 +0000 (23:59 +0000)]
Replace Decl::isSameEntityAs with a free function declaresSameEntity, which can cope with NULL pointer values

llvm-svn: 146613

12 years agoThe saved registers weren't being processed in the correct order. This lead to
Bill Wendling [Wed, 14 Dec 2011 23:53:24 +0000 (23:53 +0000)]
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

12 years agoI have added a function to SBTarget that allows
Sean Callanan [Wed, 14 Dec 2011 23:49:37 +0000 (23:49 +0000)]
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

12 years agoMove Instruction::isSafeToSpeculativelyExecute out of VMCore and
Dan Gohman [Wed, 14 Dec 2011 23:49:11 +0000 (23:49 +0000)]
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

12 years agoConsider CPE alignment in CreateNewWater().
Jakob Stoklund Olesen [Wed, 14 Dec 2011 23:48:54 +0000 (23:48 +0000)]
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

12 years agoARM NEON better assembly operand range checking for lane indices of VLD/VST.
Jim Grosbach [Wed, 14 Dec 2011 23:35:06 +0000 (23:35 +0000)]
ARM NEON better assembly operand range checking for lane indices of VLD/VST.

llvm-svn: 146608

12 years agoProduce more detailed diagnostics when static_assert condition is not an ICE.
Richard Smith [Wed, 14 Dec 2011 23:32:26 +0000 (23:32 +0000)]
Produce more detailed diagnostics when static_assert condition is not an ICE.

llvm-svn: 146607

12 years agoAdd more robustness - use PyString_CheckExact(pvalue) to check whether pvalue is...
Johnny Chen [Wed, 14 Dec 2011 23:27:53 +0000 (23:27 +0000)]
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

12 years agoARM NEON VLD2/VST2 lane indexed assembly parsing and encoding.
Jim Grosbach [Wed, 14 Dec 2011 23:25:46 +0000 (23:25 +0000)]
ARM NEON VLD2/VST2 lane indexed assembly parsing and encoding.

llvm-svn: 146605

12 years agoDo not sink instruction, if it is not profitable.
Devang Patel [Wed, 14 Dec 2011 23:20:38 +0000 (23:20 +0000)]
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

12 years agoAdd a blurb about MachineInstr bundling support.
Evan Cheng [Wed, 14 Dec 2011 22:57:45 +0000 (22:57 +0000)]
Add a blurb about MachineInstr bundling support.

llvm-svn: 146603

12 years agoReapply r146481 with a fix to create the Builder value in the correct place and
Bill Wendling [Wed, 14 Dec 2011 22:45:33 +0000 (22:45 +0000)]
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

12 years agoImprove the implementation of .incbin directive by replacing a loop by using
Kevin Enderby [Wed, 14 Dec 2011 22:34:45 +0000 (22:34 +0000)]
Improve the implementation of .incbin directive by replacing a loop by using
getStreamer().EmitBytes.  Suggestion by Benjamin Kramer!

llvm-svn: 146599

12 years agoLSR: Fold redundant bitcasts on-the-fly.
Andrew Trick [Wed, 14 Dec 2011 22:07:19 +0000 (22:07 +0000)]
LSR: Fold redundant bitcasts on-the-fly.

llvm-svn: 146597

12 years agoHalve the constexpr recursion depth in this test in an attempt to make the
Richard Smith [Wed, 14 Dec 2011 21:55:23 +0000 (21:55 +0000)]
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

12 years agoFix typos.
Rafael Espindola [Wed, 14 Dec 2011 21:50:24 +0000 (21:50 +0000)]
Fix typos.

llvm-svn: 146595

12 years agoARM NEON fix alignment encoding for VST2 w/ writeback.
Jim Grosbach [Wed, 14 Dec 2011 21:49:24 +0000 (21:49 +0000)]
ARM NEON fix alignment encoding for VST2 w/ writeback.

Add tests for w/ writeback instruction parsing and encoding.

llvm-svn: 146594

12 years agoAdd the .incbin directive which takes the binary data from a file and emits
Kevin Enderby [Wed, 14 Dec 2011 21:47:48 +0000 (21:47 +0000)]
Add the .incbin directive which takes the binary data from a file and emits
it to the streamer.  rdar://10383898

llvm-svn: 146592

12 years agoIntroduce Decl::isSameEntityAs(), to help compare declarations using
Douglas Gregor [Wed, 14 Dec 2011 21:44:45 +0000 (21:44 +0000)]
Introduce Decl::isSameEntityAs(), to help compare declarations using
their canonical Decl nodes. Not used yet, but it will be.

llvm-svn: 146591

12 years agoNuke old code. Missed in last commit.
Jim Grosbach [Wed, 14 Dec 2011 21:41:32 +0000 (21:41 +0000)]
Nuke old code. Missed in last commit.

llvm-svn: 146590

12 years agoAdd high level description of MachineInstr bundles.
Evan Cheng [Wed, 14 Dec 2011 21:32:14 +0000 (21:32 +0000)]
Add high level description of MachineInstr bundles.

llvm-svn: 146589

12 years agoARM NEON refactor VST2 w/ writeback instructions.
Jim Grosbach [Wed, 14 Dec 2011 21:32:11 +0000 (21:32 +0000)]
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

12 years agoDon't consider an overloaded operator& when the expression is actually
Douglas Gregor [Wed, 14 Dec 2011 21:23:13 +0000 (21:23 +0000)]
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

12 years agoDon't use the frame pointer on linux x86 and x86_64 if optimizing. This
Rafael Espindola [Wed, 14 Dec 2011 21:02:23 +0000 (21:02 +0000)]
Don't use the frame pointer on linux x86 and x86_64 if optimizing. This
matches gcc's behavior.

Fixes PR8186.

llvm-svn: 146586

12 years agoARM NEON improve factoring a bit. No functional change.
Jim Grosbach [Wed, 14 Dec 2011 20:59:15 +0000 (20:59 +0000)]
ARM NEON improve factoring a bit. No functional change.

llvm-svn: 146585

12 years agohttp://llvm.org/bugs/show_bug.cgi?id=11569
Johnny Chen [Wed, 14 Dec 2011 20:40:27 +0000 (20:40 +0000)]
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

12 years agoModel ARM predicated write as read-mod-write. e.g.
Evan Cheng [Wed, 14 Dec 2011 20:00:08 +0000 (20:00 +0000)]
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

12 years ago[analyzer] Disable verification step on the failing test.
Anna Zaks [Wed, 14 Dec 2011 19:39:46 +0000 (19:39 +0000)]
[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

12 years agoAllow empty argument lists in thread safety attributes
DeLesley Hutchins [Wed, 14 Dec 2011 19:36:06 +0000 (19:36 +0000)]
Allow empty argument lists in thread safety attributes

llvm-svn: 146580

12 years agoARM NEON VST2 assembly parsing and encoding.
Jim Grosbach [Wed, 14 Dec 2011 19:35:22 +0000 (19:35 +0000)]
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

12 years agoFix for bug #11429: Wrong behaviour for switches. Small improvement for code size...
Stepan Dyatkovskiy [Wed, 14 Dec 2011 19:19:17 +0000 (19:19 +0000)]
Fix for bug #11429: Wrong behaviour for switches. Small improvement for code size heuristics.

llvm-svn: 146578

12 years agoIt turns out that clang does use pointer-to-function types to
Dan Gohman [Wed, 14 Dec 2011 19:10:53 +0000 (19:10 +0000)]
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

12 years agoMove & comment the 'decltype in declarator-id' as suggested by Doug Gregor.
David Blaikie [Wed, 14 Dec 2011 18:59:02 +0000 (18:59 +0000)]
Move & comment the 'decltype in declarator-id' as suggested by Doug Gregor.

llvm-svn: 146576

12 years agoFix speling and 80-col.
Jakob Stoklund Olesen [Wed, 14 Dec 2011 18:49:13 +0000 (18:49 +0000)]
Fix speling and 80-col.

llvm-svn: 146575

12 years ago[analyzer] Re-enable the test which was failing on one of the bots.
Anna Zaks [Wed, 14 Dec 2011 18:34:17 +0000 (18:34 +0000)]
[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

12 years agoAdd support for local dynamic TLS model in LowerGlobalTLSAddress. Direct object
Akira Hatanaka [Wed, 14 Dec 2011 18:26:41 +0000 (18:26 +0000)]
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

12 years agoFix copy/pasto that skipped the 'modify' step.
Jim Grosbach [Wed, 14 Dec 2011 18:12:37 +0000 (18:12 +0000)]
Fix copy/pasto that skipped the 'modify' step.

llvm-svn: 146571

12 years agoARM/Thumb2 mov vs. mvn alias goes both ways.
Jim Grosbach [Wed, 14 Dec 2011 17:56:51 +0000 (17:56 +0000)]
ARM/Thumb2 mov vs. mvn alias goes both ways.

llvm-svn: 146570

12 years agoVFP2 is required for FP loads. Noticed by inspection.
Chad Rosier [Wed, 14 Dec 2011 17:55:03 +0000 (17:55 +0000)]
VFP2 is required for FP loads.  Noticed by inspection.

llvm-svn: 146569

12 years agoTidy up.
Chad Rosier [Wed, 14 Dec 2011 17:32:02 +0000 (17:32 +0000)]
Tidy up.

llvm-svn: 146568

12 years agoARM/Thumb2 'cmp rn, #imm' alias to cmn.
Jim Grosbach [Wed, 14 Dec 2011 17:30:24 +0000 (17:30 +0000)]
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

12 years agoFix 80-column violation and extraneous brackets.
Chad Rosier [Wed, 14 Dec 2011 17:26:05 +0000 (17:26 +0000)]
Fix 80-column violation and extraneous brackets.

llvm-svn: 146566

12 years agoFix obvious error in _mm_test_all_zeros. PR11565.
Bob Wilson [Wed, 14 Dec 2011 17:17:16 +0000 (17:17 +0000)]
Fix obvious error in _mm_test_all_zeros.  PR11565.
Patch by Mathias Gaunard!

llvm-svn: 146565

12 years agoEliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
Douglas Gregor [Wed, 14 Dec 2011 17:12:03 +0000 (17:12 +0000)]
Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.

llvm-svn: 146564

12 years agoWhen name lookup comes across a declaration that is in a module that
Douglas Gregor [Wed, 14 Dec 2011 16:03:29 +0000 (16:03 +0000)]
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

12 years agor146430 lost some compile-time performance on MultiSource/Benchmarks/MiBench/security...
Matt Beaumont-Gay [Wed, 14 Dec 2011 16:02:15 +0000 (16:02 +0000)]
r146430 lost some compile-time performance on MultiSource/Benchmarks/MiBench/security-rijndael; this gets most of it back.

llvm-svn: 146562

12 years agoVectors are not aggregate types (see isAggregateType).
Duncan Sands [Wed, 14 Dec 2011 15:44:20 +0000 (15:44 +0000)]
Vectors are not aggregate types (see isAggregateType).

llvm-svn: 146561

12 years agoAllow to run the Polly preopt passes with -O0
Tobias Grosser [Wed, 14 Dec 2011 12:21:31 +0000 (12:21 +0000)]
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

12 years agowww: Enable mp4 version of the developer meeting talk
Tobias Grosser [Wed, 14 Dec 2011 12:21:27 +0000 (12:21 +0000)]
www: Enable mp4 version of the developer meeting talk

llvm-svn: 146559

12 years agoScheduler: Try to maximize the band depth
Tobias Grosser [Wed, 14 Dec 2011 08:58:43 +0000 (08:58 +0000)]
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

12 years agoScheduler: Set maximal constant term
Tobias Grosser [Wed, 14 Dec 2011 08:58:39 +0000 (08:58 +0000)]
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

12 years agoUpdate isl
Tobias Grosser [Wed, 14 Dec 2011 08:58:36 +0000 (08:58 +0000)]
Update isl

This updates bringes new options for the isl scheduler.

llvm-svn: 146555

12 years agoEnable stack protectors by default for iOS. <rdar://problem/8836680>
Bob Wilson [Wed, 14 Dec 2011 06:08:25 +0000 (06:08 +0000)]
Enable stack protectors by default for iOS.  <rdar://problem/8836680>

llvm-svn: 146552

12 years agoOn Mac OS X the Objective-C runtime (libobjc) has many critical
Jason Molenda [Wed, 14 Dec 2011 04:22:18 +0000 (04:22 +0000)]
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

12 years agollvm/lib/CodeGen: Fix cmake build since r146542.
NAKAMURA Takumi [Wed, 14 Dec 2011 03:50:53 +0000 (03:50 +0000)]
llvm/lib/CodeGen: Fix cmake build since r146542.

llvm-svn: 146550

12 years agoFix a stupid typo in MemDepPrinter.
Eli Friedman [Wed, 14 Dec 2011 02:54:39 +0000 (02:54 +0000)]
Fix a stupid typo in MemDepPrinter.

llvm-svn: 146549

12 years agoAdd missing cases to SDNode::getOperationName(). Patch by Micah Villmow.
Eli Friedman [Wed, 14 Dec 2011 02:28:54 +0000 (02:28 +0000)]
Add missing cases to SDNode::getOperationName().  Patch by Micah Villmow.

llvm-svn: 146548

12 years agoAllow target to specify register output dependency. Still default to one.
Evan Cheng [Wed, 14 Dec 2011 02:28:53 +0000 (02:28 +0000)]
Allow target to specify register output dependency. Still default to one.

llvm-svn: 146547

12 years agoRevert r146481 to review possible miscompilations.
Bill Wendling [Wed, 14 Dec 2011 02:18:26 +0000 (02:18 +0000)]
Revert r146481 to review possible miscompilations.

llvm-svn: 146546

12 years agoDisable to review some failures.
Bill Wendling [Wed, 14 Dec 2011 02:16:54 +0000 (02:16 +0000)]
Disable to review some failures.

llvm-svn: 146545

12 years agoSwitch test over to using -verify instead of using grep. PR11552.
Eli Friedman [Wed, 14 Dec 2011 02:16:13 +0000 (02:16 +0000)]
Switch test over to using -verify instead of using grep.  PR11552.

llvm-svn: 146544

12 years agoARM assembler support for the target-specific .req directive.
Jim Grosbach [Wed, 14 Dec 2011 02:16:11 +0000 (02:16 +0000)]
ARM assembler support for the target-specific .req directive.

rdar://10549683

llvm-svn: 146543

12 years ago- Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function
Evan Cheng [Wed, 14 Dec 2011 02:11:42 +0000 (02:11 +0000)]
- 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

12 years ago[analyzer] Revert the taint test, which is failing on one of the bots for time being.
Anna Zaks [Wed, 14 Dec 2011 02:00:54 +0000 (02:00 +0000)]
[analyzer] Revert the taint test, which is failing on one of the bots for time being.

llvm-svn: 146541

12 years agohttp://llvm.org/bugs/show_bug.cgi?id=11560 lldb::SBTarget::FindFirstType crashes...
Johnny Chen [Wed, 14 Dec 2011 01:43:31 +0000 (01:43 +0000)]
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

12 years agoPrint out the breakpoint description only if self.TraceOn() is True.
Johnny Chen [Wed, 14 Dec 2011 01:36:04 +0000 (01:36 +0000)]
Print out the breakpoint description only if self.TraceOn() is True.

llvm-svn: 146539

12 years agoAdd newline at EOF.
Chad Rosier [Wed, 14 Dec 2011 01:34:39 +0000 (01:34 +0000)]
Add newline at EOF.

llvm-svn: 146538

12 years agoThis commit is the result of a general audit of
Sean Callanan [Wed, 14 Dec 2011 01:13:04 +0000 (01:13 +0000)]
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

12 years ago[analyzer] Treat stdin as a source of taint.
Anna Zaks [Wed, 14 Dec 2011 00:56:18 +0000 (00:56 +0000)]
[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

12 years ago[analyzer] Minor refactor to addTaint.
Anna Zaks [Wed, 14 Dec 2011 00:56:15 +0000 (00:56 +0000)]
[analyzer] Minor refactor to addTaint.

llvm-svn: 146535

12 years agoDW_AT_virtuality is also defined to be constant, not flag.
Nick Lewycky [Wed, 14 Dec 2011 00:56:07 +0000 (00:56 +0000)]
DW_AT_virtuality is also defined to be constant, not flag.

llvm-svn: 146534

12 years ago[analyzer] Mark output of fscanf and fopen as tainted.
Anna Zaks [Wed, 14 Dec 2011 00:56:02 +0000 (00:56 +0000)]
[analyzer] Mark output of fscanf and fopen as tainted.

llvm-svn: 146533

12 years ago[analyzer] Mark getenv output as tainted.
Anna Zaks [Wed, 14 Dec 2011 00:55:58 +0000 (00:55 +0000)]
[analyzer] Mark getenv output as tainted.

Also, allow adding taint to a region (not only a symbolic value).

llvm-svn: 146532

12 years agoPer discussion on the list, remove BitcodeVerify pass to reimplement as a free function.
Chad Rosier [Wed, 14 Dec 2011 00:29:31 +0000 (00:29 +0000)]
Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.

llvm-svn: 146531

12 years agoPer discussion on the list, remove BitcodeVerify pass to reimplement as a free function.
Chad Rosier [Wed, 14 Dec 2011 00:29:23 +0000 (00:29 +0000)]
Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.

llvm-svn: 146530

12 years ago[asan] insert __asan_init into ".preinit_array" section. Linux-only.
Kostya Serebryany [Wed, 14 Dec 2011 00:19:03 +0000 (00:19 +0000)]
[asan] insert __asan_init into ".preinit_array" section. Linux-only.

llvm-svn: 146529

12 years ago[asan] fix the test runner to detect build breakages; add a test for -pie
Kostya Serebryany [Wed, 14 Dec 2011 00:05:22 +0000 (00:05 +0000)]
[asan] fix the test runner to detect build breakages; add a test for -pie

llvm-svn: 146528

12 years ago[asan] remove .preinit_array from the compiler module (it breaks .so builds). This...
Kostya Serebryany [Wed, 14 Dec 2011 00:01:51 +0000 (00:01 +0000)]
[asan] remove .preinit_array from the compiler module (it breaks .so builds). This should be done in the run-time.

llvm-svn: 146527

12 years ago[asan] fix some more format warnings in sysinfo/sysinfo.cc
Kostya Serebryany [Tue, 13 Dec 2011 23:34:59 +0000 (23:34 +0000)]
[asan] fix some more format warnings in sysinfo/sysinfo.cc

llvm-svn: 146526

12 years agoMake the diagnostic message more consistant. Update the type comparison to
Richard Trieu [Tue, 13 Dec 2011 23:19:45 +0000 (23:19 +0000)]
Make the diagnostic message more consistant.  Update the type comparison to
handle non-pointer types.  This is for the extra info printed when function
types are compared.

llvm-svn: 146525