platform/upstream/llvm.git
11 years agoAvoid creating a SlotIndex from the end() iterator.
Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:08:54 +0000 (18:08 +0000)]
Avoid creating a SlotIndex from the end() iterator.

No test case, spotted by inspection.

llvm-svn: 176705

11 years agoRemove unused variable.
Benjamin Kramer [Fri, 8 Mar 2013 17:04:47 +0000 (17:04 +0000)]
Remove unused variable.

llvm-svn: 176704

11 years agoRemove default from fully covered switch.
Benjamin Kramer [Fri, 8 Mar 2013 17:03:19 +0000 (17:03 +0000)]
Remove default from fully covered switch.

llvm-svn: 176703

11 years agoForce cpu in test.
Benjamin Kramer [Fri, 8 Mar 2013 17:01:18 +0000 (17:01 +0000)]
Force cpu in test.

llvm-svn: 176702

11 years agoInsert the reduction start value into the first bypass block to preserve domination.
Benjamin Kramer [Fri, 8 Mar 2013 16:58:37 +0000 (16:58 +0000)]
Insert the reduction start value into the first bypass block to preserve domination.

Fixes PR15344.

llvm-svn: 176701

11 years agoR600: Optimize another selectcc case
Tom Stellard [Fri, 8 Mar 2013 15:37:11 +0000 (15:37 +0000)]
R600: Optimize another selectcc case

fold selectcc (selectcc x, y, a, b, cc), b, a, b, setne ->
     selectcc x, y, a, b, cc

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176700

11 years agoR600: Improve custom lowering of select_cc
Tom Stellard [Fri, 8 Mar 2013 15:37:09 +0000 (15:37 +0000)]
R600: Improve custom lowering of select_cc

Two changes:
1. Prefer SET* instructions when possible
2. Handle the CND*_INT case with floating-point args

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176699

11 years agoR600: Change operation action from Custom to Expand for BR_CC
Tom Stellard [Fri, 8 Mar 2013 15:37:07 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for BR_CC

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176698

11 years agoR600: Change operation action from Custom to Expand for SETCC
Tom Stellard [Fri, 8 Mar 2013 15:37:05 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for SETCC

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176697

11 years agoR600: Set BooleanContents to ZeroOrNegativeOneBooleanContent
Tom Stellard [Fri, 8 Mar 2013 15:37:03 +0000 (15:37 +0000)]
R600: Set BooleanContents to ZeroOrNegativeOneBooleanContent

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176696

11 years agoLegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC
Tom Stellard [Fri, 8 Mar 2013 15:37:02 +0000 (15:37 +0000)]
LegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC

llvm-svn: 176695

11 years agoDAGCombiner: Use correct value type for checking legality of BR_CC v3
Tom Stellard [Fri, 8 Mar 2013 15:36:57 +0000 (15:36 +0000)]
DAGCombiner: Use correct value type for checking legality of BR_CC v3

LegalizeDAG.cpp uses the value of the comparison operands when checking
the legality of BR_CC, so DAGCombiner should do the same.

v2:
  - Expand more BR_CC value types for NVPTX

v3:
  - Expand correct BR_CC value types for Hexagon, Mips, and XCore.

llvm-svn: 176694

11 years agoR600: Change addresspace in fold-kcache.ll
Vincent Lejeune [Fri, 8 Mar 2013 15:34:07 +0000 (15:34 +0000)]
R600: Change addresspace in fold-kcache.ll

AddressSpace definition has changed in a previous commit, reflect it
to avoid false failure.

llvm-svn: 176693

11 years agoAArch64: specify full triple in test as only Linux works for now.
Tim Northover [Fri, 8 Mar 2013 15:27:30 +0000 (15:27 +0000)]
AArch64: specify full triple in test as only Linux works for now.

llvm-svn: 176692

11 years agoR600/SI: adjust test to recent changes
Christian Konig [Fri, 8 Mar 2013 14:44:00 +0000 (14:44 +0000)]
R600/SI: adjust test to recent changes

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176691

11 years agoExtend loop variable naming checks
Edwin Vane [Fri, 8 Mar 2013 14:15:18 +0000 (14:15 +0000)]
Extend loop variable naming checks

The loop convert tests for conflicting names have been extended to check for
macro names, types, and language keywords including language extensions. Tests
have also been added.

Fixes PR15322

Author: Jack Yang <jack.yang@intel.com>
Reviewer: gribozavr, klimek, revane
llvm-svn: 176690

11 years agoHexagon: Add patterns for zero extended loads from i1->i64.
Jyotsna Verma [Fri, 8 Mar 2013 14:15:15 +0000 (14:15 +0000)]
Hexagon: Add patterns for zero extended loads from i1->i64.

llvm-svn: 176689

11 years agoAArch64: expand sincos operations, we don't support them.
Tim Northover [Fri, 8 Mar 2013 13:55:07 +0000 (13:55 +0000)]
AArch64: expand sincos operations, we don't support them.

Patch based on Mans Rullgard's.

llvm-svn: 176688

11 years agoR600/SI: Use source scheduler
Michel Danzer [Fri, 8 Mar 2013 10:58:01 +0000 (10:58 +0000)]
R600/SI: Use source scheduler

This is certainly not the last word on scheduling for this target, but
right now this allows a few apps to run / finish with radeonsi, most
notably UT2004 / Lightsmark. They fail to compile some shaders with the
default scheduler because it ends up trying to spill registers, which
we don't support yet (and which is probably a bad idea in general for
performance if it can be avoided).

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176687

11 years agoAdd support for the OpenCL attribute 'vec_type_hint'.
Joey Gouly [Fri, 8 Mar 2013 09:42:32 +0000 (09:42 +0000)]
Add support for the OpenCL attribute 'vec_type_hint'.

Patch by Murat Bolat!

llvm-svn: 176686

11 years agoAdd -verify-misched option.
Andrew Trick [Fri, 8 Mar 2013 05:40:34 +0000 (05:40 +0000)]
Add -verify-misched option.

This verifies live intervals both before and after scheduling. It's
useful for anyone hacking on live interval update.

Note that we don't yet pass verification all the time. We don't yet
handle updating nonallocatable live intervals perfectly.

llvm-svn: 176685

11 years agoUpdate PlatformDarwin to understand how armv7m / armv7em relate
Jason Molenda [Fri, 8 Mar 2013 04:33:44 +0000 (04:33 +0000)]
Update PlatformDarwin to understand how armv7m / armv7em relate
to the other armv7 types as far as compatibility/interchangability
goes.
<rdar://problem/13361372>

llvm-svn: 176684

11 years ago<rdar://problem/13374267>
Greg Clayton [Fri, 8 Mar 2013 02:42:06 +0000 (02:42 +0000)]
<rdar://problem/13374267>

Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries.

llvm-svn: 176683

11 years ago[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all ...
Argyrios Kyrtzidis [Fri, 8 Mar 2013 02:32:34 +0000 (02:32 +0000)]
[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.

It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for
all the include directives in a particular file.

llvm-svn: 176682

11 years ago[libclang] When calling the function of CXCursorAndRangeVisitor, don't forget to
Argyrios Kyrtzidis [Fri, 8 Mar 2013 02:32:29 +0000 (02:32 +0000)]
[libclang] When calling the function of CXCursorAndRangeVisitor, don't forget to
stop visitation if it returns CXVisit_Break.

llvm-svn: 176681

11 years ago[libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.
Argyrios Kyrtzidis [Fri, 8 Mar 2013 02:32:26 +0000 (02:32 +0000)]
[libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.

llvm-svn: 176680

11 years agoAnother test fix for r176671.
David Blaikie [Fri, 8 Mar 2013 02:27:40 +0000 (02:27 +0000)]
Another test fix for r176671.

llvm-svn: 176679

11 years agoCouple of test fixes for r176671.
David Blaikie [Fri, 8 Mar 2013 02:26:16 +0000 (02:26 +0000)]
Couple of test fixes for r176671.

Not sure why these aren't failing on my linux machine, but this should cover
it.

llvm-svn: 176678

11 years agoRevert r176154 in favor of a better approach.
Bill Wendling [Fri, 8 Mar 2013 02:21:08 +0000 (02:21 +0000)]
Revert r176154 in favor of a better approach.

Code generation makes some basic assumptions about the IR it's been given. In
particular, if there is only one 'invoke' in the function, then that invoke
won't be going away. However, with the advent of the `llvm.donothing' intrinsic,
those invokes may go away. If all of them go away, the landing pad no longer has
any users. This confuses the back-end, which asserts.

This happens with SjLj exceptions, because that's the model that modifies the IR
based on there being invokes, etc. in the function.

Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will
give us a CFG that the back-end won't be confused about. If all of the invokes
in a function are removed, then the SjLj EH prepare pass won't insert the bogus
code the relies upon the invokes being there.
<rdar://problem/13228754&13316637>

llvm-svn: 176677

11 years ago<rdar://problem/13119621>
Greg Clayton [Fri, 8 Mar 2013 01:37:30 +0000 (01:37 +0000)]
<rdar://problem/13119621>

Make dynamic type detection faster by using the AST metadata to help out and allow us not to complete types when we don't need to.

After running "purge" on a MacOSX system, the Xcode variables view now populates more than 3x faster with this fix.

llvm-svn: 176676

11 years agoremove an ancient and quaint bit of commented out makefile goo from when
Chris Lattner [Fri, 8 Mar 2013 01:26:10 +0000 (01:26 +0000)]
remove an ancient and quaint bit of commented out makefile goo from when
GCC was the system compiler on the mac.

llvm-svn: 176675

11 years agoAdd recognition of two more armv7 variants, armv7m and armv7em.
Jason Molenda [Fri, 8 Mar 2013 01:20:17 +0000 (01:20 +0000)]
Add recognition of two more armv7 variants, armv7m and armv7em.
<rdar://problem/13361372>

llvm-svn: 176674

11 years agoAdd a comment to break disable's help to make clearer the relationship between the
Jim Ingham [Fri, 8 Mar 2013 00:31:40 +0000 (00:31 +0000)]
Add a comment to break disable's help to make clearer the relationship between the
enable/disable state of a breakpoint, and of its locations.

llvm-svn: 176672

11 years agoUpgrade tests to the latest debug info format.
David Blaikie [Fri, 8 Mar 2013 00:23:31 +0000 (00:23 +0000)]
Upgrade tests to the latest debug info format.

Mostly this is just changing the named metadata (llvm.dbg.sp, llvm.dbg.gv,
llvm.dbg.<func>.lv, etc -> llvm.dbg.cu), adding a few fields to older records
(DIVariable: flags/inlined-at, DICompileUnit: sp/gv/types,
DISubprogram: local variables list)

The tests to update were discovered by a change I'm working on to remove debug
info version support - so any tests using old debug info versions I haven't
updated probably are bad tests or just not actually designed to test debug
info.

llvm-svn: 176671

11 years ago[driver] If we're just linking, don't report --param X as unused option.
Chad Rosier [Fri, 8 Mar 2013 00:05:21 +0000 (00:05 +0000)]
[driver] If we're just linking, don't report --param X as unused option.
PR15327
rdar://13372628

llvm-svn: 176670

11 years agoAdd a getPassName() method.
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:51 +0000 (23:55 +0000)]
Add a getPassName() method.

llvm-svn: 176669

11 years agoRename isEarlierInSameTrace to isUsefulDominator.
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:49 +0000 (23:55 +0000)]
Rename isEarlierInSameTrace to isUsefulDominator.

In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

llvm-svn: 176668

11 years agoHeaderDoc: Support more of HeaderDoc documentation
Fariborz Jahanian [Thu, 7 Mar 2013 23:33:11 +0000 (23:33 +0000)]
HeaderDoc: Support more of HeaderDoc documentation
commands; top level tags such as @interface and
their 2nd level tags such as @coclass, etc.
// rdar://12379114

llvm-svn: 176667

11 years agoAdd code completion for @import <rdar://problem/13344306>.
Douglas Gregor [Thu, 7 Mar 2013 23:26:24 +0000 (23:26 +0000)]
Add code completion for @import <rdar://problem/13344306>.

llvm-svn: 176666

11 years agoImprove LLDB's implicit cast-to-id to work with C++11 auto and any Objective-C object...
Douglas Gregor [Thu, 7 Mar 2013 22:57:58 +0000 (22:57 +0000)]
Improve LLDB's implicit cast-to-id to work with C++11 auto and any Objective-C object type <rdar://problem/13338107>.

llvm-svn: 176665

11 years agoTypeo in warning message.
Jason Molenda [Thu, 7 Mar 2013 22:44:42 +0000 (22:44 +0000)]
Typeo in warning message.

llvm-svn: 176664

11 years agoWhen possible, move __block variables to the heap rather than copying them.
Douglas Gregor [Thu, 7 Mar 2013 22:38:24 +0000 (22:38 +0000)]
When possible, move __block variables to the heap rather than copying them.

Fixes <rdar://problem/13330126>.

llvm-svn: 176663

11 years agoUpdated Apple LLDB version to lldb-300.99.0. Also
Sean Callanan [Thu, 7 Mar 2013 22:29:06 +0000 (22:29 +0000)]
Updated Apple LLDB version to lldb-300.99.0.  Also
updated the build system to support the new Apple
LLDB versioning scheme.

llvm-svn: 176662

11 years agoKeep coding stanard.
Jakub Staszak [Thu, 7 Mar 2013 22:20:06 +0000 (22:20 +0000)]
Keep coding stanard.

llvm-svn: 176661

11 years agoDon't create IRBuilder if we can return from the method earlier.
Jakub Staszak [Thu, 7 Mar 2013 22:10:33 +0000 (22:10 +0000)]
Don't create IRBuilder if we can return from the method earlier.

llvm-svn: 176660

11 years ago[fast-isel] Seriously, add support for the expect intrinsic.
Chad Rosier [Thu, 7 Mar 2013 21:38:33 +0000 (21:38 +0000)]
[fast-isel] Seriously, add support for the expect intrinsic.
rdar://13370942

llvm-svn: 176659

11 years agoPromote atomic type sizes up to a power of two, capped by
John McCall [Thu, 7 Mar 2013 21:37:17 +0000 (21:37 +0000)]
Promote atomic type sizes up to a power of two, capped by
MaxAtomicPromoteWidth.  Fix a ton of terrible bugs with
_Atomic types and (non-intrinsic-mediated) loads and stores
thereto.

llvm-svn: 176658

11 years agoMove the atomics code into its own file.
John McCall [Thu, 7 Mar 2013 21:37:12 +0000 (21:37 +0000)]
Move the atomics code into its own file.

llvm-svn: 176657

11 years agoChange hasAggregateLLVMType, which conflates complex and
John McCall [Thu, 7 Mar 2013 21:37:08 +0000 (21:37 +0000)]
Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

llvm-svn: 176656

11 years agoAdd CharUnits::alignmentAtOffset.
John McCall [Thu, 7 Mar 2013 21:37:02 +0000 (21:37 +0000)]
Add CharUnits::alignmentAtOffset.

llvm-svn: 176655

11 years agoEvaluate compound literals directly into the result aggregate
John McCall [Thu, 7 Mar 2013 21:36:54 +0000 (21:36 +0000)]
Evaluate compound literals directly into the result aggregate
when that aggregate isn't potentially aliased.

llvm-svn: 176654

11 years agoRemove temporary std::vectors that ca be replaced with ArrayRef's magic.
Benjamin Kramer [Thu, 7 Mar 2013 21:18:31 +0000 (21:18 +0000)]
Remove temporary std::vectors that ca be replaced with ArrayRef's magic.

llvm-svn: 176653

11 years agoFix tautological compare. Not sure why this didn't trigger any test failures.
Benjamin Kramer [Thu, 7 Mar 2013 20:56:18 +0000 (20:56 +0000)]
Fix tautological compare. Not sure why this didn't trigger any test failures.

llvm-svn: 176652

11 years agoReplace temporary vectors with arrays.
Benjamin Kramer [Thu, 7 Mar 2013 20:53:34 +0000 (20:53 +0000)]
Replace temporary vectors with arrays.

llvm-svn: 176651

11 years agoRemove unncessary whitespace when triggered on empty line.
Daniel Jasper [Thu, 7 Mar 2013 20:50:00 +0000 (20:50 +0000)]
Remove unncessary whitespace when triggered on empty line.

With the cursor located at "I", clang-format would not do anything to:

int a;

   I

  int b;

With this patch, it reduces the number of empty lines as necessary, and
removes unnecessary whitespace. It does not change/reformat "int a;" or
"int b;".

llvm-svn: 176650

11 years ago[fast-isel] Add support for the expect intrinsic.
Chad Rosier [Thu, 7 Mar 2013 20:42:17 +0000 (20:42 +0000)]
[fast-isel] Add support for the expect intrinsic.
rdar://13370942

llvm-svn: 176649

11 years agoArrayRefize some code. No functionality change.
Benjamin Kramer [Thu, 7 Mar 2013 20:33:29 +0000 (20:33 +0000)]
ArrayRefize some code. No functionality change.

llvm-svn: 176648

11 years agoHexagon: Handle i8, i16 and i1 Var Args.
Jyotsna Verma [Thu, 7 Mar 2013 20:28:34 +0000 (20:28 +0000)]
Hexagon: Handle i8, i16 and i1 Var Args.

llvm-svn: 176647

11 years agoSimplify code. No functionality change.
Jakub Staszak [Thu, 7 Mar 2013 20:22:39 +0000 (20:22 +0000)]
Simplify code. No functionality change.

llvm-svn: 176646

11 years agoChange Index type from unsigned long to unsigned. This should fix PR14980.
Jakub Staszak [Thu, 7 Mar 2013 20:21:27 +0000 (20:21 +0000)]
Change Index type from unsigned long to unsigned. This should fix PR14980.

llvm-svn: 176645

11 years agoFix enum_types test on Linux
Daniel Malea [Thu, 7 Mar 2013 20:13:11 +0000 (20:13 +0000)]
Fix enum_types test on Linux
- Required flag "-std=c++11" needs to be set before including Makefile.rules

llvm-svn: 176644

11 years agoRemove trailing spaces.
Jakub Staszak [Thu, 7 Mar 2013 20:04:17 +0000 (20:04 +0000)]
Remove trailing spaces.

llvm-svn: 176643

11 years agoChange NULL to 0.
Jakub Staszak [Thu, 7 Mar 2013 20:01:47 +0000 (20:01 +0000)]
Change NULL to 0.

llvm-svn: 176642

11 years agoArrayRef ca accept one element. Simplify code a little bit, also it matches now
Jakub Staszak [Thu, 7 Mar 2013 20:01:19 +0000 (20:01 +0000)]
ArrayRef ca accept one element. Simplify code a little bit, also it matches now
coding in the other places of the file.

llvm-svn: 176641

11 years agoAlbert Wong: definition for regex_traits<_CharT>::__regex_word.
Howard Hinnant [Thu, 7 Mar 2013 19:38:08 +0000 (19:38 +0000)]
Albert Wong: definition for regex_traits<_CharT>::__regex_word.

llvm-svn: 176640

11 years agoChange _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__...
Howard Hinnant [Thu, 7 Mar 2013 19:25:03 +0000 (19:25 +0000)]
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available.  This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).

llvm-svn: 176639

11 years agopre-RA-sched debug-only fix
Andrew Trick [Thu, 7 Mar 2013 19:21:08 +0000 (19:21 +0000)]
pre-RA-sched debug-only fix

llvm-svn: 176638

11 years agoHexagon: Add support to lower block address.
Jyotsna Verma [Thu, 7 Mar 2013 19:10:28 +0000 (19:10 +0000)]
Hexagon: Add support to lower block address.

llvm-svn: 176637

11 years agopre-RA-sched assertion fix. This bug was exposed by r176037.
Andrew Trick [Thu, 7 Mar 2013 19:07:57 +0000 (19:07 +0000)]
pre-RA-sched assertion fix. This bug was exposed by r176037.

rdar:13370002 [pre-RA-sched] assertion: released too many times

I tracked this down to an earlier hack that is no longer applicable
and interfered with normal scheduler logic. With the changes in
r176037, it was causing an instruction to be scheduled multiple times.

I have an external test case that I tried hard to reduce and
failed. I can't even reproduce with llc.

llvm-svn: 176636

11 years agoMove testcase, this is testing extraction not inserting.
Benjamin Kramer [Thu, 7 Mar 2013 18:51:02 +0000 (18:51 +0000)]
Move testcase, this is testing extraction not inserting.

llvm-svn: 176635

11 years agoX86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.
Benjamin Kramer [Thu, 7 Mar 2013 18:48:40 +0000 (18:48 +0000)]
X86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.

That can usually be lowered efficiently and is common in sandybridge code.
It would be nice to do this in DAGCombiner but we can't insert arbitrary
BUILD_VECTORs this late.

Fixes PR15462.

llvm-svn: 176634

11 years agoFix issue that causes linux buildbots to ignore errors
Daniel Malea [Thu, 7 Mar 2013 18:39:26 +0000 (18:39 +0000)]
Fix issue that causes linux buildbots to ignore errors
- change string "ERROR" to "FAIL" to match clang lit test results

Also, make LLDB tests work on machines that do not have svn and/or git installed

llvm-svn: 176633

11 years agoFixed a crash when cloning a function into a function with
Pekka Jaaskelainen [Thu, 7 Mar 2013 16:46:43 +0000 (16:46 +0000)]
Fixed a crash when cloning a function into a function with
different size argument list and without attributes in the
arguments.

llvm-svn: 176632

11 years agoHave LoopConvert use 'auto &&' where necessary
Edwin Vane [Thu, 7 Mar 2013 16:22:05 +0000 (16:22 +0000)]
Have LoopConvert use 'auto &&' where necessary

For iterators where the dereference operator returns by value, LoopConvert
should use 'auto &&' in the range-based for loop expression.

If the dereference operator returns an rvalue reference, this is deemed too
strange and the for loop is not converted.

Moved test case from iterator_failing.cpp to iterator.cpp and added extra
tests.

Fixes PR15437.

Reviewer: gribozavr
llvm-svn: 176631

11 years agoAdding lvalue and rvalue reference type matchers
Edwin Vane [Thu, 7 Mar 2013 15:44:40 +0000 (15:44 +0000)]
Adding lvalue and rvalue reference type matchers

Updated docs and tests.

Reviewers: klimek, gribozavr

llvm-svn: 176630

11 years agoAdd 'e' to the SPIR data layout - SPIR is little endian for now.
Guy Benyei [Thu, 7 Mar 2013 13:06:10 +0000 (13:06 +0000)]
Add 'e' to the SPIR data layout - SPIR is little endian for now.
Add 32/64 bit specific target defines for SPIR.

llvm-svn: 176629

11 years agoMinor refactor of how we get compilation phases.
Matthew Curtis [Thu, 7 Mar 2013 12:32:26 +0000 (12:32 +0000)]
Minor refactor of how we get compilation phases.

There is now a single function to get the list of phases for a given
output Type.

No functionality change intended.

llvm-svn: 176628

11 years agoSwitch from autogenerating tests to using the preprocessor.
Chandler Carruth [Thu, 7 Mar 2013 10:09:47 +0000 (10:09 +0000)]
Switch from autogenerating tests to using the preprocessor.

NOTE: You may need to run 'make clean' or 'ninja -t clean' etc!!! This
      is due to really nasty bug/interactions between
      CMake/configure/make/Ninja/LIT...

This commit tries to back out the support for generating test cases as
part of the build system due to the issues I brought up in post-commit
review:

1) It adds a *lot* of complexity and fragility to the build system. See
   the number of commits required to try to get all the bots happy.
2) It isn't really necessary -- we can already run scripts to generate
   things with the RUN lines of a test.
3) It makes the tests somewhat harder to debug as they cross between
   more domains.
4) In almost all cases it isn't really needed or it can be done directly
   using the preprocessor.

I should have been more proactive reviewing this, and I'm really sorry
about the churn here. =/ To help keep track of what commits are going
where, this backs out most of the non-test-changes from these revisions:
  r176397
  r176373
  r176293
  r176184
  r175744
  r175624
  r175545
  r175544

There were several trivial or cleanup changes to the lit files or other
files. Some of these looked ok, but I didn't try to tease them apart...
Edwin, if you know what to look for, please carry on with the cleanups
there, and sorry for hosing stuff here but I'm not much of a Python
person, and so I was erring on the side of cautiously backing out the
change.

I've tried to preserve the test changes everywhere I could, but review
is appreciated here in case I missed some.

I then re-wrote the tests to use the preprocessor rather than python to
expand to the various bits of code. The nicest part of this is that now
all the files are just C++ code. They edit and behave like C++ code,
etc. RUN lines with different -D flags are used to run the same test
over multiple different configurations, and includes bracketed in
special defines are used to flesh out a collection of standard interface
stubs to test interactions between pieces. These probably aren't perfect
yet, but I think its an improvement (at least in terms of build system
complexity) and will hopefully be a useful demonstration of the
technique I prefer for these types of tests.

llvm-svn: 176627

11 years agoR600/SI: rework input interpolation v2
Christian Konig [Thu, 7 Mar 2013 09:04:14 +0000 (09:04 +0000)]
R600/SI: rework input interpolation v2

v2: update CMakeLists.txt as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176626

11 years agoR600/SI: remove SI_vs_load_buffer_index
Christian Konig [Thu, 7 Mar 2013 09:04:04 +0000 (09:04 +0000)]
R600/SI: remove SI_vs_load_buffer_index

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176625

11 years agoR600/SI: remove SGPR address space v2
Christian Konig [Thu, 7 Mar 2013 09:03:59 +0000 (09:03 +0000)]
R600/SI: remove SGPR address space v2

v2: fix R600 regressions

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176624

11 years agoR600/SI: add proper formal parameter handling for SI
Christian Konig [Thu, 7 Mar 2013 09:03:52 +0000 (09:03 +0000)]
R600/SI: add proper formal parameter handling for SI

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176623

11 years agoR600/SI: remove shader type intrinsic
Christian Konig [Thu, 7 Mar 2013 09:03:46 +0000 (09:03 +0000)]
R600/SI: remove shader type intrinsic

Just encode the type as target specific attribute.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176622

11 years agoR600/SI: switch types of SGPRs to v*i8
Christian Konig [Thu, 7 Mar 2013 09:03:38 +0000 (09:03 +0000)]
R600/SI: switch types of SGPRs to v*i8

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176621

11 years agoR600/SI: fix unused variable warning
Christian Konig [Thu, 7 Mar 2013 09:03:30 +0000 (09:03 +0000)]
R600/SI: fix unused variable warning

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176620

11 years agoFix build with clang, this was supposed to be part of r176617.
Nick Lewycky [Thu, 7 Mar 2013 08:42:27 +0000 (08:42 +0000)]
Fix build with clang, this was supposed to be part of r176617.

llvm-svn: 176619

11 years agoTake the GCDA version string as an input to llvm_gcda_start_file.
Nick Lewycky [Thu, 7 Mar 2013 08:28:54 +0000 (08:28 +0000)]
Take the GCDA version string as an input to llvm_gcda_start_file.

llvm-svn: 176618

11 years agoAdd flags for additional control over coverage generation. Pick the version
Nick Lewycky [Thu, 7 Mar 2013 08:28:53 +0000 (08:28 +0000)]
Add flags for additional control over coverage generation. Pick the version
string to be emitted, and two properties about the files themselves.

Use $PWD to absolut-ify the path to the coverage file. Yes, this is what GCC
does. Reverts my own r175706.

llvm-svn: 176617

11 years agoSwitch from a version 4.2/4.4 switch to a four-byte version string to be put
Nick Lewycky [Thu, 7 Mar 2013 08:28:49 +0000 (08:28 +0000)]
Switch from a version 4.2/4.4 switch to a four-byte version string to be put
into the actual gcov file.

Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.

llvm-svn: 176616

11 years agoNo need to go through int64 and APInt when generating a new constant.
Nadav Rotem [Thu, 7 Mar 2013 06:34:49 +0000 (06:34 +0000)]
No need to go through int64 and APInt when generating a new constant.

llvm-svn: 176615

11 years agoSDAG: Handle scalarizing an extend of a <1 x iN> vector.
Jim Grosbach [Thu, 7 Mar 2013 05:47:54 +0000 (05:47 +0000)]
SDAG: Handle scalarizing an extend of a <1 x iN> vector.

Just scalarize the element and rebuild a vector of the result type
from that.

rdar://13281568

llvm-svn: 176614

11 years agoAdded new properties to lldb.SBModule classes:
Greg Clayton [Thu, 7 Mar 2013 03:25:11 +0000 (03:25 +0000)]
Added new properties to lldb.SBModule classes:

"compile_units" returns an array of all compile units in a module as a list() of lldb.SBCompileUnit objects.

"compile_unit" returns a compile unit accessor object that allows indexed access, search by full or partial path, or by regex:

(lldb) script
comp_unit = lldb.target.module['TextEdit'].compile_unit['Document.m']
comp_unit = lldb.target.module['TextEdit'].compile_unit['/path/to/Document.m']
comp_unit = lldb.target.module['TextEdit'].compile_unit[0]
comp_unit = lldb.target.module['TextEdit'].compile_unit[1]
for comp_unit in lldb.target.module['TextEdit'].compile_unit[re.compile("\.m$")]
  print comp_unit

This helps do quick searches and scripting while debugging.

llvm-svn: 176613

11 years ago[analyzer] Warn on passing a reference to null pointer as an argument in a call
Anna Zaks [Thu, 7 Mar 2013 03:02:36 +0000 (03:02 +0000)]
[analyzer] Warn on passing a reference to null pointer as an argument in a call

Warn about null pointer dereference earlier when a reference to a null pointer is
passed in a call. The idea is that even though the standard might allow this, reporting
the issue earlier is better for diagnostics (the error is reported closer to the place where
the pointer was set to NULL). This also simplifies analyzer’s diagnostic logic, which has
to track “where the null came from”. As a consequence, some of our null pointer
warning suppression mechanisms started triggering more often.

TODO: Change the name of the file and class to reflect the new check.
llvm-svn: 176612

11 years agoStop the "module" property from throwing an exception when the module name was not...
Greg Clayton [Thu, 7 Mar 2013 02:58:47 +0000 (02:58 +0000)]
Stop the "module" property from throwing an exception when the module name was not found in the target module list.

llvm-svn: 176611

11 years agoAdded a new module that can dump all line tables for all compile units in any modules...
Greg Clayton [Thu, 7 Mar 2013 02:57:54 +0000 (02:57 +0000)]
Added a new module that can dump all line tables for all compile units in any modules that are specified as arguments to the "dump_module_line_tables" command.

I used this to verify that the debug map line tables were the same as previous LLDB releases prior to my change in the DWARF in .o file linking.

llvm-svn: 176610

11 years agoDon't duplicate function names. Thanks to Jordan Rose for pointing it out.
Rafael Espindola [Thu, 7 Mar 2013 02:43:24 +0000 (02:43 +0000)]
Don't duplicate function names. Thanks to Jordan Rose for pointing it out.

llvm-svn: 176609

11 years agoRemove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and
Nick Lewycky [Thu, 7 Mar 2013 02:03:08 +0000 (02:03 +0000)]
Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and
is the one that should be used.

llvm-svn: 176608

11 years agoAdd a hasExternalLinkage helper. No functionality change.
Rafael Espindola [Thu, 7 Mar 2013 02:00:27 +0000 (02:00 +0000)]
Add a hasExternalLinkage helper. No functionality change.

llvm-svn: 176607

11 years agoAdd a hasExternalStorageAsWritten helper. No functionality change.
Rafael Espindola [Thu, 7 Mar 2013 01:42:44 +0000 (01:42 +0000)]
Add a hasExternalStorageAsWritten helper. No functionality change.

It is possible that some of the current uses of
"getStorageClassAsWritten() == SC_Extern" should use this but I don't know
enough about SC_PrivateExtern to change and test them.

llvm-svn: 176606

11 years agoDebug Info: store the files and directories for each compile unit.
Manman Ren [Thu, 7 Mar 2013 01:42:00 +0000 (01:42 +0000)]
Debug Info: store the files and directories for each compile unit.

We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.

The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.

rdar://problem/13342023

llvm-svn: 176605