Commit Graph

64066 Commits

Author SHA1 Message Date
Daniel Dunbar 3cdf80589f Add newline at EOF.
llvm-svn: 76870
2009-07-23 07:07:43 +00:00
Chris Lattner 7b9dda45f0 enhance DepthFirstIterator to support more robust operations in the face
of code mutating the graph while it is being traversed.  Patch by 
Olaf Krzikalla!

llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner 7413f07b9d testcase for PR4590
llvm-svn: 76868
2009-07-23 06:07:59 +00:00
Chris Lattner 88ab854873 refactor a blob of code out to a new 'FoldOrOfFCmps' function and
simplify it.

llvm-svn: 76866
2009-07-23 05:46:22 +00:00
Lang Hames 077415e84b For real this time: PHI Def & Kill tracking added to PHIElimination.
llvm-svn: 76865
2009-07-23 05:44:24 +00:00
Chris Lattner 7152d39d6d merge vector-casts-0.ll into vector-casts.ll
llvm-svn: 76864
2009-07-23 05:33:39 +00:00
Chris Lattner 7d55541e56 Make some existing optimizations that would only trigger on scalars
also apply to vectors.  This allows us to compile this:

#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }

to:

_a:
	cmpordps	%xmm1, %xmm0
	ret
_b:
	cmpunordps	%xmm1, %xmm0
	ret

with clang instead of to a ton of horrible code.

llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Daniel Dunbar 7c02cf609d Shield clang from LLVM API changes, until the dust settles.
llvm-svn: 76862
2009-07-23 05:30:36 +00:00
Chris Lattner b4ff7de8bd convert a test to filecheck format. This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.

llvm-svn: 76861
2009-07-23 05:27:48 +00:00
Chris Lattner 4a3affbdcf rename test
llvm-svn: 76860
2009-07-23 05:25:12 +00:00
Chris Lattner 9085438e4b refactor a bunch of code out into a helper function,
no functionality change.

llvm-svn: 76859
2009-07-23 05:14:02 +00:00
Daniel Dunbar 34169976d0 Fix test case, which has a control-reaches-end-of-non-void warning that was
being masked by previous bug.

llvm-svn: 76858
2009-07-23 05:06:51 +00:00
Daniel Dunbar a2f7c95dca Use llvm::BitVector instead of managing memory by hand.
- As it happens, this also fixes a use-of-uninitialized memory that was causing
   non-deterministic test failures.

llvm-svn: 76857
2009-07-23 05:01:54 +00:00
Anders Carlsson f55922b8b8 Set field info for unions.
llvm-svn: 76856
2009-07-23 04:59:05 +00:00
Chris Lattner 02def54fa1 remove a really old and dead header
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Anders Carlsson 718a89a501 Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Chris Lattner dc13b7c637 merge one more sse41 test into sse41.ll
llvm-svn: 76853
2009-07-23 04:49:39 +00:00
Chris Lattner 70d5783535 merge another sse41 test into sse41.ll
llvm-svn: 76852
2009-07-23 04:43:48 +00:00
Daniel Dunbar 8e31e77fd8 Revert r76831, there are many Analyzer test failures on multiple platforms.
--- Reverse-merging r76831 into '.':
U    include/clang/Analysis/PathSensitive/GRExprEngine.h
U    lib/Analysis/GRExprEngine.cpp

llvm-svn: 76851
2009-07-23 04:41:06 +00:00
Chris Lattner 08fc6e6e40 merge sse41-pmovx.ll into sse41.ll
llvm-svn: 76850
2009-07-23 04:39:09 +00:00
Lang Hames a77a3c3782 Added PHI Def & Kill tracking to PHIElimination pass.
llvm-svn: 76849
2009-07-23 04:34:03 +00:00
Chris Lattner b9cdd3153c change a test to run in filecheck style. Rename it to be a general
dumping ground of various SSE4.1 tests, since filecheck can reasonably
handle them all in one file.  Generalize it to check x86-64 stuff as
well since it has a different ABI (a convenient way to test both the 
reg and mem forms of these instructions).

llvm-svn: 76848
2009-07-23 04:33:02 +00:00
Anders Carlsson f814ee6003 Handle zero width bit fields in unions correctly (by ignoring them).
llvm-svn: 76847
2009-07-23 04:00:39 +00:00
Anders Carlsson 697f65943d Implement union layout support.
llvm-svn: 76846
2009-07-23 03:43:54 +00:00
Anders Carlsson 307846fe67 Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
llvm-svn: 76845
2009-07-23 03:17:50 +00:00
Daniel Dunbar a244814e6f These IRgen improvements have been done.
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.

llvm-svn: 76844
2009-07-23 03:03:07 +00:00
Eric Christopher b1b77ca862 Support insertps via the intrinsic and add a couple of simple
testcases to make sure it's being generated.

llvm-svn: 76843
2009-07-23 02:22:41 +00:00
Sanjiv Gupta 56df1e7969 Do not call getMangledName on Intrinsics.
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Devang Patel 6292003492 MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.

llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Eric Christopher 327cb795a1 Add test for pinsrd and pinsrb instructions.
llvm-svn: 76840
2009-07-23 01:58:04 +00:00
Andreas Bolka 897e68c660 Minor cosmetics: indentation, formatting, naming.
llvm-svn: 76839
2009-07-23 01:57:06 +00:00
Reid Kleckner 921673225c Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Zhongxing Xu 57421f3e0f add header for 'memset'.
llvm-svn: 76837
2009-07-23 01:38:47 +00:00
Devang Patel c698122d34 Silence "uninitialized use" warning.
llvm-svn: 76836
2009-07-23 01:36:16 +00:00
Devang Patel 8392e3ba37 Hide constructors.
llvm-svn: 76835
2009-07-23 01:19:53 +00:00
Devang Patel e059ba6ed2 Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Ted Kremenek c5b4c0ec64 Add initial implementation of checking for uses of floating point as a loop counter.
llvm-svn: 76833
2009-07-23 01:07:19 +00:00
Ted Kremenek 4cd5577cdf Add instance predicate method to match static method.
llvm-svn: 76832
2009-07-23 01:06:10 +00:00
Ted Kremenek 5939402e2c Add 'previsit' Checker pass for ObjCMessageExprs.
llvm-svn: 76831
2009-07-23 01:05:31 +00:00
Steve Naroff 8e6aee5821 Remove a bunch of FIXME's related to ObjC type checking.
- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible(). 
- Tweak several test cases to accommodate the new/improved type checking.

llvm-svn: 76830
2009-07-23 01:01:38 +00:00
Eric Christopher fef8db605d Fix error message for correct opcode.
llvm-svn: 76829
2009-07-23 01:01:32 +00:00
Reid Kleckner 1a722d9b73 Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

Also, switch function stubs and global data over to using the BumpPtrAllocator.

This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs.  I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.

llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Fariborz Jahanian 0228bc1a41 Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.

llvm-svn: 76826
2009-07-23 00:42:24 +00:00
Reid Kleckner 5bd6105d65 Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
malloc, so there should be no functional changes to other code.

These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.

I also added some tests which helped me pinpoint some bugs.

llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Mike Stump 671cc00ce1 Fix case, apparently some people still build on case sensitive
filesystems.

llvm-svn: 76824
2009-07-23 00:20:25 +00:00
Dan Gohman b215100c7c Revert r75663 (and r76805), as it is causing regressions on powerpc.
llvm-svn: 76823
2009-07-23 00:09:46 +00:00
Mike Stump 33979f75a0 Add warning for falling off the end of a function that should return a
value.  This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall).  I believe there should be very few false positives, though
the most interesting case would be:

  int() { bar(); }

when bar does:

  bar() { while (1) ; }

Here, we assume functions return, unless they are marked with the
noreturn attribute.  I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.

If anyone spots other false positives, let me know!

llvm-svn: 76821
2009-07-22 23:56:57 +00:00
Douglas Gregor e93e46c690 Implement support for out-of-line definitions of the class members of class
templates, e.g.,

  template<typename T>
  struct Outer {
    struct Inner;
  };

  template<typename T>
  struct Outer<T>::Inner {
    // ...
  };

Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.

There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.

llvm-svn: 76820
2009-07-22 23:48:44 +00:00
Chris Lattner d2aeef0703 remove SectionFlags::Small: it is only used on Xcore, and we'll find
a better solution for it in the future.

llvm-svn: 76818
2009-07-22 23:27:22 +00:00
Dan Gohman 824ab40381 x86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).
llvm-svn: 76817
2009-07-22 23:26:55 +00:00