platform/upstream/llvm.git
14 years agoAdd libclang support for namespace aliases (visitation + USRs) along
Douglas Gregor [Tue, 31 Aug 2010 23:48:11 +0000 (23:48 +0000)]
Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace.

There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.

llvm-svn: 112676

14 years agoTestcase for llvm checkin 112674.
Dale Johannesen [Tue, 31 Aug 2010 23:43:55 +0000 (23:43 +0000)]
Testcase for llvm checkin 112674.

llvm-svn: 112675

14 years agoRemove noisy semicolon.
Benjamin Kramer [Tue, 31 Aug 2010 23:38:13 +0000 (23:38 +0000)]
Remove noisy semicolon.

llvm-svn: 112673

14 years agoSome support for unicode string constants
Fariborz Jahanian [Tue, 31 Aug 2010 23:34:27 +0000 (23:34 +0000)]
Some support for unicode string constants
in wide strings. radar 8360841.

llvm-svn: 112672

14 years agoImplement __has_feature(cxx_inline_namespaces)
Sebastian Redl [Tue, 31 Aug 2010 23:28:47 +0000 (23:28 +0000)]
Implement __has_feature(cxx_inline_namespaces)

llvm-svn: 112671

14 years agoConverted TestDeadStrip.py to Dsym/Dwarf combination.
Johnny Chen [Tue, 31 Aug 2010 23:12:15 +0000 (23:12 +0000)]
Converted TestDeadStrip.py to Dsym/Dwarf combination.

llvm-svn: 112670

14 years agolicm is wasting time hoisting constant foldable operations,
Chris Lattner [Tue, 31 Aug 2010 23:00:16 +0000 (23:00 +0000)]
licm is wasting time hoisting constant foldable operations,
instead of hoisting them, just fold them away.  This occurs in the
testcase for PR8041, for example.

llvm-svn: 112669

14 years agoThis is the second of three patches to implement support for the .loc directive
Kevin Enderby [Tue, 31 Aug 2010 22:55:11 +0000 (22:55 +0000)]
This is the second of three patches to implement support for the .loc directive
and output the dwarf line number tables.  This takes the current loc info after
an instruction is assembled and saves the needed info into an object that has
vector and for each section.  These objects will be used for the final patch to
build and emit the encoded dwarf line number tables.  Again for now this is only
in the Mach-O streamer but at some point will move to a more generic place.

llvm-svn: 112668

14 years agoReapply r112432, now that the real problem is addressed.
Dan Gohman [Tue, 31 Aug 2010 22:53:17 +0000 (22:53 +0000)]
Reapply r112432, now that the real problem is addressed.

llvm-svn: 112667

14 years agoReapply r112433, now that the real problem is addressed.
Dan Gohman [Tue, 31 Aug 2010 22:52:12 +0000 (22:52 +0000)]
Reapply r112433, now that the real problem is addressed.

llvm-svn: 112666

14 years agoRevert r110916. This patch is buggy because the code inside the
Dan Gohman [Tue, 31 Aug 2010 22:50:31 +0000 (22:50 +0000)]
Revert r110916. This patch is buggy because the code inside the
inner loop doesn't update all the variables in the outer loop.

llvm-svn: 112665

14 years agoWe have a chance for an optimization. Consider this code:
Bill Wendling [Tue, 31 Aug 2010 22:41:22 +0000 (22:41 +0000)]
We have a chance for an optimization. Consider this code:

int x(int t) {
  if (t & 256)
    return -26;
  return 0;
}

We generate this:

     tst.w   r0, #256
     mvn     r0, #25
     it      eq
     moveq   r0, #0

while gcc generates this:

     ands    r0, r0, #256
     it      ne
     mvnne   r0, #25
     bx      lr

Scandalous really!

During ISel time, we can look for this particular pattern. One where we have a
"MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
instruction to 0. Something like this (greatly simplified):

  %r0 = ISD::AND ...
  ARMISD::CMPZ %r0, 0         @ sets [CPSR]
  %r0 = ARMISD::MOVCC 0, -26  @ reads [CPSR]

All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
when it's zero. The zero value will all ready be in the %r0 register and we only
need to change it if the AND wasn't zero. Easy!

llvm-svn: 112664

14 years agoAdd NetBSD include search path
Anton Korobeynikov [Tue, 31 Aug 2010 22:39:50 +0000 (22:39 +0000)]
Add NetBSD include search path

llvm-svn: 112663

14 years agoSome fixes for NetBSD
Anton Korobeynikov [Tue, 31 Aug 2010 22:38:00 +0000 (22:38 +0000)]
Some fixes for NetBSD

llvm-svn: 112662

14 years agoUse x86 specific MOVSLDUP node, add more patterns to match it and remove useless...
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:35:05 +0000 (22:35 +0000)]
Use x86 specific MOVSLDUP node, add more patterns to match it and remove useless load nodes

llvm-svn: 112661

14 years agoConverted TestClassTypes.py to Dsym/Dwarf combination. Marked one test case as
Johnny Chen [Tue, 31 Aug 2010 22:26:16 +0000 (22:26 +0000)]
Converted TestClassTypes.py to Dsym/Dwarf combination.  Marked one test case as
expectedFailure because in dwarf format, "variable list this" returns an error.

llvm-svn: 112660

14 years agoReapply r112623. Included additional check for unused byval argument.
Devang Patel [Tue, 31 Aug 2010 22:22:42 +0000 (22:22 +0000)]
Reapply r112623. Included additional check for unused byval argument.

llvm-svn: 112659

14 years agoUse x86 specific MOVSHDUP node and add more patterns to match it
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:22:11 +0000 (22:22 +0000)]
Use x86 specific MOVSHDUP node and add more patterns to match it

llvm-svn: 112657

14 years agoAdd convenience accessors for determining whether template declarations are definitions.
John McCall [Tue, 31 Aug 2010 22:21:26 +0000 (22:21 +0000)]
Add convenience accessors for determining whether template declarations are definitions.

llvm-svn: 112656

14 years agoAdd a new libclang function clang_getTemplateCursorKind(), which
Douglas Gregor [Tue, 31 Aug 2010 22:12:17 +0000 (22:12 +0000)]
Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.

Also, teach clang_CXXMethod_isStatic() about function templates.

llvm-svn: 112655

14 years agoAnd ANDS pattern to match the t2ANDS pattern.
Bill Wendling [Tue, 31 Aug 2010 22:05:37 +0000 (22:05 +0000)]
And ANDS pattern to match the t2ANDS pattern.

llvm-svn: 112654

14 years agoStack slot access methods are in TargetInstrInfo.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 22:01:07 +0000 (22:01 +0000)]
Stack slot access methods are in TargetInstrInfo.

llvm-svn: 112653

14 years agoComment typo.
Dale Johannesen [Tue, 31 Aug 2010 21:53:15 +0000 (21:53 +0000)]
Comment typo.

llvm-svn: 112652

14 years agoMake %EFLAGS unallocatable.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:07 +0000 (21:51 +0000)]
Make %EFLAGS unallocatable.

No CCR virtual registers should exist, and %EFLAGS is used in ways that can
surprise RegAllocFast.

llvm-svn: 112650

14 years agoTrack liveness of unallocatable, unreserved registers in machine DCE.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:05 +0000 (21:51 +0000)]
Track liveness of unallocatable, unreserved registers in machine DCE.

Reserved registers are unpredictable, and are treated as always live by machine
DCE.

Allocatable registers are never reserved, and can be used for virtual registers.

Unreserved, unallocatable registers can not be used for virtual registers, but
otherwise behave like a normal allocatable register. Most targets only have
the flag register in this set.

llvm-svn: 112649

14 years agoConverted TestBitfields.py to Dsym/Dwarf combination.
Johnny Chen [Tue, 31 Aug 2010 21:49:24 +0000 (21:49 +0000)]
Converted TestBitfields.py to Dsym/Dwarf combination.

llvm-svn: 112646

14 years agoUse MOVHLPS node instead of matching using movhlps and movhlps_undef pattern fragments
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:38:49 +0000 (21:38 +0000)]
Use MOVHLPS node instead of matching using movhlps and movhlps_undef pattern fragments

llvm-svn: 112644

14 years agotidy up
Chris Lattner [Tue, 31 Aug 2010 21:21:25 +0000 (21:21 +0000)]
tidy up

llvm-svn: 112643

14 years agoUse MOVLHPS and MOVHLPS x86 nodes whenever possible. Also remove some useless nodes
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:15:21 +0000 (21:15 +0000)]
Use MOVLHPS and MOVHLPS x86 nodes whenever possible. Also remove some useless nodes

llvm-svn: 112642

14 years agoAmusingly, I missed this point of abstraction in all my earlier
John McCall [Tue, 31 Aug 2010 21:07:20 +0000 (21:07 +0000)]
Amusingly, I missed this point of abstraction in all my earlier
member-pointer refactoring:  dereferencing a member data pointer.

llvm-svn: 112640

14 years agoRevert r112432. It appears to be exposing a problem in the emacs build.
Dan Gohman [Tue, 31 Aug 2010 20:58:44 +0000 (20:58 +0000)]
Revert r112432. It appears to be exposing a problem in the emacs build.

llvm-svn: 112638

14 years agoMake inline namespace not be transparent after all. The concept simply doesn't fit...
Sebastian Redl [Tue, 31 Aug 2010 20:53:31 +0000 (20:53 +0000)]
Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.

llvm-svn: 112637

14 years agoExtend libclang with a new cursor kind that indicates a reference to a
Douglas Gregor [Tue, 31 Aug 2010 20:37:03 +0000 (20:37 +0000)]
Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.

llvm-svn: 112636

14 years agoMerge 2010-08-31-InfiniteRecursion.ll into crash.ll.
Owen Anderson [Tue, 31 Aug 2010 20:27:17 +0000 (20:27 +0000)]
Merge 2010-08-31-InfiniteRecursion.ll into crash.ll.

llvm-svn: 112635

14 years agoMore cleanups of my JumpThreading transforms, including extracting some duplicated...
Owen Anderson [Tue, 31 Aug 2010 20:26:04 +0000 (20:26 +0000)]
More cleanups of my JumpThreading transforms, including extracting some duplicated code into a helper function.

llvm-svn: 112634

14 years agoIgnore unallocatable registers in RegAllocFast.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 19:54:25 +0000 (19:54 +0000)]
Ignore unallocatable registers in RegAllocFast.

llvm-svn: 112632

14 years agoRevert r112623. It is causing self host build failures.
Devang Patel [Tue, 31 Aug 2010 19:41:03 +0000 (19:41 +0000)]
Revert r112623. It is causing self host build failures.

llvm-svn: 112631

14 years agoUpdate the Ada instructions to LLVM 2.7 (from LLVM 2.5).
Duncan Sands [Tue, 31 Aug 2010 19:40:21 +0000 (19:40 +0000)]
Update the Ada instructions to LLVM 2.7 (from LLVM 2.5).

llvm-svn: 112630

14 years agoAdd libclang support for class template partial specializations,
Douglas Gregor [Tue, 31 Aug 2010 19:31:58 +0000 (19:31 +0000)]
Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.

llvm-svn: 112629

14 years agoAdd an RAII helper to make cleanup of the RecursionSet more fool-proof.
Owen Anderson [Tue, 31 Aug 2010 19:24:27 +0000 (19:24 +0000)]
Add an RAII helper to make cleanup of the RecursionSet more fool-proof.

llvm-svn: 112628

14 years agoAdd a libclang cursor kind, visitation support and USR support for C++
Douglas Gregor [Tue, 31 Aug 2010 19:02:00 +0000 (19:02 +0000)]
Add a libclang cursor kind, visitation support and USR support for C++
class templates.

llvm-svn: 112627

14 years agoCleaned up my previous submission which had some header search paths that
Greg Clayton [Tue, 31 Aug 2010 18:56:24 +0000 (18:56 +0000)]
Cleaned up my previous submission which had some header search paths that
were not needed and fixed a merge issue.

llvm-svn: 112626

14 years agoOnly try to clean up the current block if we changed that block already.
Owen Anderson [Tue, 31 Aug 2010 18:55:52 +0000 (18:55 +0000)]
Only try to clean up the current block if we changed that block already.

llvm-svn: 112625

14 years agoSP relative offsets need to be adjusted by the local allocation size when
Jim Grosbach [Tue, 31 Aug 2010 18:52:31 +0000 (18:52 +0000)]
SP relative offsets need to be adjusted by the local allocation size when
determining if they're likely to be in range of the SP when resolving
frame references.

llvm-svn: 112624

14 years agoRemember byval argument's frame index during argument lowering and use this info...
Devang Patel [Tue, 31 Aug 2010 18:50:09 +0000 (18:50 +0000)]
Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar 8367011.

llvm-svn: 112623

14 years agothis assert should just be a condition, since this function is just asking if
Jim Grosbach [Tue, 31 Aug 2010 18:49:31 +0000 (18:49 +0000)]
this assert should just be a condition, since this function is just asking if
the offset is legally encodable, not actually trying to do the encoding.

llvm-svn: 112622

14 years agoAdd a test for the duplicated-conditional situation illutrated by PR5652.
Owen Anderson [Tue, 31 Aug 2010 18:49:12 +0000 (18:49 +0000)]
Add a test for the duplicated-conditional situation illutrated by PR5652.

llvm-svn: 112621

14 years agoRefactor my fix for PR5652 to terminate the predecessor lookups after the first failure.
Owen Anderson [Tue, 31 Aug 2010 18:48:48 +0000 (18:48 +0000)]
Refactor my fix for PR5652 to terminate the predecessor lookups after the first failure.

llvm-svn: 112620

14 years agoImprove CFG printing support for CXXOperatorCallExpr and CXXBindTemporaryExpr.
Ted Kremenek [Tue, 31 Aug 2010 18:47:37 +0000 (18:47 +0000)]
Improve CFG printing support for CXXOperatorCallExpr and CXXBindTemporaryExpr.

llvm-svn: 112619

14 years agoExplicitly handle CXXOperatorCallExpr when building CFGs. We should treat it the...
Ted Kremenek [Tue, 31 Aug 2010 18:47:34 +0000 (18:47 +0000)]
Explicitly handle CXXOperatorCallExpr when building CFGs.  We should treat it the same as CallExprs.

Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph
llvm-svn: 112618

14 years agomerge two tests.
Chris Lattner [Tue, 31 Aug 2010 18:44:03 +0000 (18:44 +0000)]
merge two tests.

llvm-svn: 112617

14 years agoAdded the ability to disable ASLR (Address Space Layout Randomization). ASLR
Greg Clayton [Tue, 31 Aug 2010 18:35:14 +0000 (18:35 +0000)]
Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using:

(lldb) set disable-aslr 0

llvm-svn: 112616

14 years agoManually reduce this testcase.
Owen Anderson [Tue, 31 Aug 2010 18:16:29 +0000 (18:16 +0000)]
Manually reduce this testcase.

llvm-svn: 112615

14 years agoAdd a "lldb host" logging channel, and put logging in the Host::OpenInExternalEditor...
Jim Ingham [Tue, 31 Aug 2010 18:05:13 +0000 (18:05 +0000)]
Add a "lldb host" logging channel, and put logging in the Host::OpenInExternalEditor code.

llvm-svn: 112614

14 years agomerge two tests and convert to filecheck.
Chris Lattner [Tue, 31 Aug 2010 18:05:08 +0000 (18:05 +0000)]
merge two tests and convert to filecheck.

llvm-svn: 112613

14 years agoAST work to support [C++] [IRgen] for ?: with missing LHS
Fariborz Jahanian [Tue, 31 Aug 2010 18:02:20 +0000 (18:02 +0000)]
AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.

llvm-svn: 112612

14 years agoAdd a micro-test for the transforms I added to JumpThreading.
Owen Anderson [Tue, 31 Aug 2010 17:59:07 +0000 (17:59 +0000)]
Add a micro-test for the transforms I added to JumpThreading.

I have not been able to find a way to test each in isolation, for a few reasons:
1) The ability to look-through non-i1 BinaryOperator's requires the ability to look through non-constant
   ICmps in order for it to ever trigger.
2) The ability to do LVI-powered PHI value determination only matters in cases that ProcessBranchOnPHI
   can't handle.  Since it already handles all the cases without other instructions in the def-use chain
   between the PHI and the branch, it requires the ability to look through ICmps and/or BinaryOperators
   as well.

llvm-svn: 112611

14 years agoUpdate test for 112609
Jim Grosbach [Tue, 31 Aug 2010 17:58:47 +0000 (17:58 +0000)]
Update test for 112609

llvm-svn: 112610

14 years agoImprove virtual frame base register allocation heuristics.
Jim Grosbach [Tue, 31 Aug 2010 17:58:19 +0000 (17:58 +0000)]
Improve virtual frame base register allocation heuristics.

  1. Allocate them in the entry block of the function to enable function-wide
     re-use. The instructions to create them should be re-materializable, so
     there shouldn't be additional cost compared to creating them local
     to the basic blocks where they are used.
  2. Collect all of the frame index references for the function and sort them
     by the local offset referenced. Iterate over the sorted list to
     allocate the virtual base registers. This enables creation of base
     registers optimized for positive-offset access of frame references.
     (Note: This may be appropriate to later be a target hook to do the
     sorting in a target appropriate manner. For now it's done here for
     simplicity.)

llvm-svn: 112609

14 years agoSpeculatively revert r112433.
Dan Gohman [Tue, 31 Aug 2010 17:56:47 +0000 (17:56 +0000)]
Speculatively revert r112433.

llvm-svn: 112608

14 years agoUpdated to reflect the "plugins" directory.
Johnny Chen [Tue, 31 Aug 2010 17:51:08 +0000 (17:51 +0000)]
Updated to reflect the "plugins" directory.

llvm-svn: 112607

14 years agoChanged the buildDsym()/buildDwarf() TestBase methods to use a plugin framework
Johnny Chen [Tue, 31 Aug 2010 17:42:54 +0000 (17:42 +0000)]
Changed the buildDsym()/buildDwarf() TestBase methods to use a plugin framework
to delegate the building of binaries to a sys.platform-sepcific plugin.

Modified the dotest.py test driver to add the "plugins" directory to the
PYTHONPATH as well.

darwin.py is the Mac OS X plugin module.

llvm-svn: 112606

14 years agoAllow creation of SHT_NULL sections, from Roman Divacky.
Benjamin Kramer [Tue, 31 Aug 2010 17:03:33 +0000 (17:03 +0000)]
Allow creation of SHT_NULL sections, from Roman Divacky.

llvm-svn: 112605

14 years agoImplement basic support for indexing function templates in
Douglas Gregor [Tue, 31 Aug 2010 17:01:39 +0000 (17:01 +0000)]
Implement basic support for indexing function templates in
libclang. This includes:
  - Cursor kind for function templates, with visitation logic
  - Cursor kinds for template parameters, with visitation logic
  - Visitation logic for template specialization types, qualified type
  locations
  - USR generation for function templates, template specialization
  types, template parameter types.

Also happens to fix PR7804, which I tripped across while testing.

llvm-svn: 112604

14 years agoAdd support for windows x86-64 varargs, patch by Cameron Esfahani!
Chris Lattner [Tue, 31 Aug 2010 16:44:54 +0000 (16:44 +0000)]
Add support for windows x86-64 varargs, patch by Cameron Esfahani!

llvm-svn: 112603

14 years agoimprove isHexaLiteral to work with escaped newlines and trigraphs,
Chris Lattner [Tue, 31 Aug 2010 16:42:00 +0000 (16:42 +0000)]
improve isHexaLiteral to work with escaped newlines and trigraphs,
patch by Francois Pichet!

llvm-svn: 112602

14 years agolibclang indexing support for C++ constructors, destructors, and
Douglas Gregor [Tue, 31 Aug 2010 14:41:23 +0000 (14:41 +0000)]
libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.

llvm-svn: 112600

14 years agoAdd a simple test for indexing namespaces
Douglas Gregor [Tue, 31 Aug 2010 13:31:19 +0000 (13:31 +0000)]
Add a simple test for indexing namespaces

llvm-svn: 112598

14 years agoStop using the dom frontier in DwarfEHPrepare by not promoting alloca's
Duncan Sands [Tue, 31 Aug 2010 09:05:06 +0000 (09:05 +0000)]
Stop using the dom frontier in DwarfEHPrepare by not promoting alloca's
any more.  I plan to reimplement alloca promotion using SSAUpdater later.
It looks like Bill's URoR logic really always needs domtree, so the pass
now always asks for domtree info.

llvm-svn: 112597

14 years agoFix an infinite loop; merging two functions will create a new function (if the
Nick Lewycky [Tue, 31 Aug 2010 08:29:37 +0000 (08:29 +0000)]
Fix an infinite loop; merging two functions will create a new function (if the
two are weak, we make them thunks to a new strong function) so don't iterate
through the function list as we're modifying it.

Also add back the outermost loop which got removed during the cleanups.

llvm-svn: 112595

14 years agoDon't perform an extra traversal of the function just to do cleanup. We can safely...
Owen Anderson [Tue, 31 Aug 2010 07:55:56 +0000 (07:55 +0000)]
Don't perform an extra traversal of the function just to do cleanup.  We can safely simplify instructions after each block has been processed without worrying about iterator invalidation.

llvm-svn: 112594

14 years ago- Cleanup some whitespaces.
Bill Wendling [Tue, 31 Aug 2010 07:50:46 +0000 (07:50 +0000)]
- Cleanup some whitespaces.
- Convert {0,1} and friends into 0b01, which is identical and more consistent.

llvm-svn: 112593

14 years agoRename test directory to reflect new pass name.
Owen Anderson [Tue, 31 Aug 2010 07:50:31 +0000 (07:50 +0000)]
Rename test directory to reflect new pass name.

llvm-svn: 112592

14 years agoRename ValuePropagation to a more descriptive CorrelatedValuePropagation.
Owen Anderson [Tue, 31 Aug 2010 07:48:34 +0000 (07:48 +0000)]
Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.

llvm-svn: 112591

14 years agoRename file to something more descriptive.
Owen Anderson [Tue, 31 Aug 2010 07:41:39 +0000 (07:41 +0000)]
Rename file to something more descriptive.

llvm-svn: 112590

14 years agoMore Chris-inspired JumpThreading fixes: use ConstantExpr to correctly constant-fold...
Owen Anderson [Tue, 31 Aug 2010 07:36:34 +0000 (07:36 +0000)]
More Chris-inspired JumpThreading fixes: use ConstantExpr to correctly constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before.  This patch adds a tracking set to prevent this case.

llvm-svn: 112589

14 years agoTeach IR generation to return 'this' from constructors and destructors
John McCall [Tue, 31 Aug 2010 07:33:07 +0000 (07:33 +0000)]
Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.

llvm-svn: 112588

14 years agoCleanup Whitespace.
Michael J. Spencer [Tue, 31 Aug 2010 06:36:46 +0000 (06:36 +0000)]
Cleanup Whitespace.

llvm-svn: 112587

14 years agoSystem: Fix getMagicNumber on windows.
Michael J. Spencer [Tue, 31 Aug 2010 06:36:33 +0000 (06:36 +0000)]
System: Fix getMagicNumber on windows.

getMagicNumber was treating the _binary_ data it read in as a
null terminated string. This resulted in the std::string
calculating the length, and causing an assert in other code that
assumed that the length it passed was the same as the length of
the string it would get back.

llvm-svn: 112586

14 years agoFix spelling/typo.
Michael J. Spencer [Tue, 31 Aug 2010 06:36:22 +0000 (06:36 +0000)]
Fix spelling/typo.

llvm-svn: 112585

14 years agoOffset is not always unsigned number.
Devang Patel [Tue, 31 Aug 2010 06:12:08 +0000 (06:12 +0000)]
Offset is not always unsigned number.

llvm-svn: 112584

14 years agoSimplify.
Devang Patel [Tue, 31 Aug 2010 06:11:28 +0000 (06:11 +0000)]
Simplify.

llvm-svn: 112583

14 years agoSwitch to DenseSet, simplifying much more code. We now have a single iteration
Nick Lewycky [Tue, 31 Aug 2010 05:53:05 +0000 (05:53 +0000)]
Switch to DenseSet, simplifying much more code. We now have a single iteration
where we hash, compare and fold, instead of one iteration where we build up
the hash buckets and a second one to fold.

llvm-svn: 112582

14 years agoFix a regression that allowed clearly ill formed code. The diagnostic is still
Chandler Carruth [Tue, 31 Aug 2010 05:42:40 +0000 (05:42 +0000)]
Fix a regression that allowed clearly ill formed code. The diagnostic is still
terrible, FIXME left to do a proper job of diagnosing this.

llvm-svn: 112581

14 years agoRevert my lame attempt at appeasing the CFGBuilder
Douglas Gregor [Tue, 31 Aug 2010 05:36:56 +0000 (05:36 +0000)]
Revert my lame attempt at appeasing the CFGBuilder

llvm-svn: 112580

14 years agoWhen provide code completions for a variadic Objective-C method
Douglas Gregor [Tue, 31 Aug 2010 05:13:43 +0000 (05:13 +0000)]
When provide code completions for a variadic Objective-C method
declaration send or a variadic function call, collapse the ", ..."
into the parameter before it, so that we don't get a second
placeholder.

llvm-svn: 112579

14 years agoTeach the CFGBuilder not do die on CXXBindTemporaryExpr, CXXOperatorCallExpr. Fixes...
Douglas Gregor [Tue, 31 Aug 2010 05:10:27 +0000 (05:10 +0000)]
Teach the CFGBuilder not do die on CXXBindTemporaryExpr, CXXOperatorCallExpr. Fixes a Boost.Graph crasher.

llvm-svn: 112578

14 years agoImplement the __has_nothrow trait family, by Steven Watanabe.
Sebastian Redl [Tue, 31 Aug 2010 04:59:00 +0000 (04:59 +0000)]
Implement the __has_nothrow trait family, by Steven Watanabe.

llvm-svn: 112577

14 years agoRemove r111665, which implemented store-narrowing in InstCombine. Chris discovered...
Owen Anderson [Tue, 31 Aug 2010 04:41:06 +0000 (04:41 +0000)]
Remove r111665, which implemented store-narrowing in InstCombine.  Chris discovered a miscompilation in it, and it's not easily
fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine.

llvm-svn: 112575

14 years agozap unused method. x86 is the only user and already has a more powerfull version
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:36:20 +0000 (02:36 +0000)]
zap unused method. x86 is the only user and already has a more powerfull version

llvm-svn: 112571

14 years agoUse X86ISD::MOVSS and MOVSD to represent the movl mask pattern, also fix the handling...
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:26:40 +0000 (02:26 +0000)]
Use X86ISD::MOVSS and MOVSD to represent the movl mask pattern, also fix the handling of those nodes when seeking for scalars inside vector shuffles

llvm-svn: 112570

14 years agoAdd range of return value expression in ReturnUndefChecker. Patch by Jim Goodnow II!
Ted Kremenek [Tue, 31 Aug 2010 01:35:32 +0000 (01:35 +0000)]
Add range of return value expression in ReturnUndefChecker.  Patch by Jim Goodnow II!

llvm-svn: 112569

14 years agoRewrite slightly so we can expand for floating point types easier.
Eric Christopher [Tue, 31 Aug 2010 01:28:42 +0000 (01:28 +0000)]
Rewrite slightly so we can expand for floating point types easier.

llvm-svn: 112568

14 years agoAdd experimental -disable-physical-join command line option.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 01:27:49 +0000 (01:27 +0000)]
Add experimental -disable-physical-join command line option.

Eventually, we want to disable physreg coalescing completely, and let the
register allocator do its job using hints.

This option makes it possible to measure the impact of disabling physreg
coalescing.

llvm-svn: 112567

14 years agoEnable inline namespaces in C++03 as an extension.
Sebastian Redl [Tue, 31 Aug 2010 00:36:45 +0000 (00:36 +0000)]
Enable inline namespaces in C++03 as an extension.

llvm-svn: 112566

14 years agoAdd a forgotten place where the enclosing namespace set matters, plus a big testcase...
Sebastian Redl [Tue, 31 Aug 2010 00:36:40 +0000 (00:36 +0000)]
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun.

llvm-svn: 112565

14 years agoEnable inline namespaces in the AST.
Sebastian Redl [Tue, 31 Aug 2010 00:36:36 +0000 (00:36 +0000)]
Enable inline namespaces in the AST.

llvm-svn: 112564

14 years agoRename DeclContext::getLookupContext to getRedeclContext and change its semantics...
Sebastian Redl [Tue, 31 Aug 2010 00:36:30 +0000 (00:36 +0000)]
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

llvm-svn: 112563

14 years agoDecl::getEnclosingNamespaceContext has no reason to explicitly skip transparent conte...
Sebastian Redl [Tue, 31 Aug 2010 00:36:23 +0000 (00:36 +0000)]
Decl::getEnclosingNamespaceContext has no reason to explicitly skip transparent contexts, and would be wrong to do so with inline namespaces.

llvm-svn: 112562

14 years agoWhen instantiating a function type, instantiate the return type before
Douglas Gregor [Tue, 31 Aug 2010 00:26:14 +0000 (00:26 +0000)]
When instantiating a function type, instantiate the return type before
instantiating the parameters. In a perfect world, this wouldn't
matter, and compilers are free to instantiate in any order they
want. However, every other compiler seems to instantiate the return
type first, and some code (in this case, Boost.Polygon) depends on
this and SFINAE to avoid instantiating something that shouldn't be
instantiated.

We could fight this battle, and insist that Clang is allowed to do
what it does, but it's not beneficial: it's more predictable to
instantiate this way, in source order. When we implement
late-specified return types, we'll need to instantiate the return type
last when it was late-specified, hence the FIXME.

We now compile Boost.Polygon properly.

llvm-svn: 112561