Commit Graph

38843 Commits

Author SHA1 Message Date
Fariborz Jahanian c98d956778 Implemented type checking for pointer of objects of protocol-qualified types.
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..

llvm-svn: 44897
2007-12-12 01:00:23 +00:00
Evan Cheng 7bc8942532 Bug fix. Only safe to perform extension uses optimization if the source of extension is also defined in the same BB as the extension.
llvm-svn: 44896
2007-12-12 00:51:06 +00:00
Daniel Berlin 0af43a1895 Changes from Curtis Dunham implementing lazy cycle detection algorithm.
Changes from me implementing different way of representing points-to anything.
Changes from me that improve slightly on LCD.

llvm-svn: 44895
2007-12-12 00:37:04 +00:00
Evan Cheng 6766d2fa4f If deleting a reload instruction due to reuse (value is available in register R and reload is targeting R), make sure to invalidate the kill information of the last kill.
llvm-svn: 44894
2007-12-11 23:36:57 +00:00
Ted Kremenek fc095b1669 Moved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptions
into the loop that processes input files. These will soon become translation
unit specific (with the exception of LangOptions).

llvm-svn: 44893
2007-12-11 23:28:38 +00:00
Bill Wendling 38236ef6cb Need to grow the indexed map. Added debug statements.
llvm-svn: 44892
2007-12-11 23:27:51 +00:00
Chris Lattner f641255a86 simplify code now that isConstantExpr really does always
return a loc.

llvm-svn: 44890
2007-12-11 23:15:04 +00:00
Chris Lattner 255e1323f3 Fix a case where we'd return "is not a constant expr" without
return a location.

llvm-svn: 44889
2007-12-11 23:11:17 +00:00
Fariborz Jahanian 16e703ade5 80-column please.
llvm-svn: 44888
2007-12-11 23:04:08 +00:00
Ted Kremenek 89fbadd3be Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".

llvm-svn: 44887
2007-12-11 22:57:35 +00:00
Fariborz Jahanian 4e56ed5fab Implemented rewriting of protocol-qualified global variable types.
Re-implemented some of rewriting of protocol-qualified function 
argument types to support it in its generality.

llvm-svn: 44886
2007-12-11 22:50:14 +00:00
Chris Lattner 3487a3009b gcc supports more targets.
llvm-svn: 44885
2007-12-11 22:32:45 +00:00
Chris Lattner 95f80da9fb update pch discussion
llvm-svn: 44884
2007-12-11 22:29:38 +00:00
Chris Lattner a6b103a3c3 improve title
llvm-svn: 44883
2007-12-11 22:26:03 +00:00
Chris Lattner 6931189378 add a con of clang vs gcc
llvm-svn: 44882
2007-12-11 22:22:59 +00:00
Bill Wendling 642e15a7cb Simplify slightly.
llvm-svn: 44881
2007-12-11 22:22:22 +00:00
Anton Korobeynikov 7f01ebefc6 Remove Trie::Edge class. Now edge labels are stored into nodes itself.
llvm-svn: 44880
2007-12-11 21:55:38 +00:00
Devang Patel b37b12d102 Match union field type when member expression is u->x
llvm-svn: 44879
2007-12-11 21:33:16 +00:00
Ted Kremenek d4e5fbacab Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.

Modified all users of Diagnostics to comply with this new interface.

Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).

Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.

llvm-svn: 44878
2007-12-11 21:27:55 +00:00
Owen Anderson f24dd1c1eb More progress on StrongPHIElimination. Now we actually USE the DomForest!
llvm-svn: 44877
2007-12-11 20:12:11 +00:00
Fariborz Jahanian c86ee9ce90 Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for more
general use.

llvm-svn: 44876
2007-12-11 19:56:36 +00:00
Devang Patel e3f9fa6322 Refactor bit-field handling code into a separate method.
No functionality change.

llvm-svn: 44875
2007-12-11 19:51:39 +00:00
Bill Wendling b678ae7c38 Blark! How in the world did this work without this?!
llvm-svn: 44874
2007-12-11 19:40:06 +00:00
Bill Wendling 7717a8a37d - Update the virtual reg to machine instruction map when hoisting.
- Fix subtle bug when creating initially creating this map.

llvm-svn: 44873
2007-12-11 19:17:04 +00:00
Fariborz Jahanian 3b5dca2533 For @optional unimplemented methods do not issue the warning.
llvm-svn: 44872
2007-12-11 19:10:26 +00:00
Bill Wendling 5143d898c8 Checking for "zero operands" during the "CanHoistInst()" method isn't necessary
because those with side effects will be caught by other checks in here.

Also, simplify the check for a BB in a sub loop.

llvm-svn: 44871
2007-12-11 18:45:11 +00:00
Fariborz Jahanian 251a943ce9 Fixed a parsing bug whereby @optional/@required keyword is not followed by
a method declaration.

llvm-svn: 44870
2007-12-11 18:34:51 +00:00
Nate Begeman 6dc8b4ed13 Allow the JIT to encode MMX instructions
llvm-svn: 44869
2007-12-11 18:06:14 +00:00
Wojciech Matyjewicz 5bf9f01349 Use correct member access operator.
(my test commit as well)

llvm-svn: 44868
2007-12-11 17:46:25 +00:00
Dan Gohman 5e1f8472d2 Rename these tests to use the appropriate suffixes.
llvm-svn: 44867
2007-12-11 15:55:52 +00:00
Dan Gohman b582867567 Use not instead of ignore when an exit status is expected to always
be non-zero.

llvm-svn: 44866
2007-12-11 15:50:23 +00:00
Dan Gohman cfed707c12 Don't redirect stderr when it isn't needed.
llvm-svn: 44865
2007-12-11 15:41:11 +00:00
Duncan Sands f41217d4fa Fix compilation.
llvm-svn: 44864
2007-12-11 12:20:47 +00:00
Christopher Lamb 595798f041 Update credits.
llvm-svn: 44861
2007-12-11 09:32:07 +00:00
Christopher Lamb 308121c757 Add information on address space qualifiers for pointer types and global
declarations to the LangRef.

llvm-svn: 44860
2007-12-11 09:31:00 +00:00
Christopher Lamb e92cba4535 Regenerate.
llvm-svn: 44859
2007-12-11 09:02:08 +00:00
Christopher Lamb 54dd24c2a7 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner 8975f49065 mention pork
llvm-svn: 44857
2007-12-11 07:59:50 +00:00
Chris Lattner 8e6a8f984c Teach VMCore to constant fold shufflevectors with constant operands.
This allows us to compile:

#include <emmintrin.h>
typedef __m128i VSInt16;
typedef short vSInt16 __attribute__ ((__vector_size__ (16)));
VSInt16 t3() {
  return (VSInt16)((vSInt16)_mm_set1_epi16(6518));
}

into:

_t3:
	movaps	LCPI1_0, %xmm0
	ret

instead of:
_t3:
	movl	$6518, %eax
	movd	%eax, %xmm0
	pextrw	$0, %xmm0, %eax
	xorps	%xmm0, %xmm0
	pinsrw	$0, %eax, %xmm0
	punpcklwd	%xmm0, %xmm0
	pshufd	$0, %xmm0, %xmm0
	ret

llvm-svn: 44856
2007-12-11 07:49:37 +00:00
Chris Lattner 6a6b3fb62b Implement constant folding if vector<->vector bitcasts where the number
of source/dest elements changes.  This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll

llvm-svn: 44855
2007-12-11 07:29:44 +00:00
Reid Spencer 0b1df1d3da Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the
Support libraries separately into their own module.

llvm-svn: 44852
2007-12-11 06:53:58 +00:00
Anton Korobeynikov 3d23737c5f Add first and really dirty version of generic Trie structure
llvm-svn: 44851
2007-12-11 06:53:44 +00:00
Chris Lattner 5c6399eee6 significantly simplify some code, no functionality change.
llvm-svn: 44850
2007-12-11 06:07:39 +00:00
Chris Lattner e8ea0374ac refactor some code, no functionality change.
llvm-svn: 44849
2007-12-11 05:55:02 +00:00
Chris Lattner 29a16af8de properly namespacify.
llvm-svn: 44845
2007-12-11 04:36:28 +00:00
Chris Lattner 63ba2c06c4 fix a build issue with non-apple-gcc-4.0 compilers.
llvm-svn: 44844
2007-12-11 04:33:00 +00:00
Steve Naroff 5cace62e66 Avoid the first person in a recently added comment.
llvm-svn: 44843
2007-12-11 03:38:03 +00:00
Steve Naroff 3f1223cb06 - Tweak several tests to be compatible with my last commit.
- Add a test to message.m for an unusual case for GCC compat (as suggested by Chris).

llvm-svn: 44842
2007-12-11 03:34:41 +00:00
Anders Carlsson f1c18350e3 Generate more builtins.
llvm-svn: 44841
2007-12-11 03:09:22 +00:00
Steve Naroff c30dcf1251 Change err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).
llvm-svn: 44840
2007-12-11 02:44:30 +00:00