Commit Graph

38266 Commits

Author SHA1 Message Date
Steve Naroff 0ee0b0ab8c Move the null pointer constant check from Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible.
Thanks to Seo Sanghyeon for the bug, follow-through, and patch!

llvm-svn: 44366
2007-11-27 17:58:44 +00:00
Ted Kremenek c6298de211 Added quotes around $(NM_PATH) argument to GenLibDeps.pl script so that
the "-p" option is actually seen by nm (it was being dropped as it was
considered as separate argument to the Perl script).

llvm-svn: 44365
2007-11-27 17:53:54 +00:00
Chris Lattner 1dfc48d4f6 Unbreak backwards compatibility with bytecode format. Regression
introduced by this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071126/055824.html

llvm-svn: 44364
2007-11-27 17:48:06 +00:00
Duncan Sands ad0ea2d430 Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Chris Lattner db3467f8d4 handle __vector_size__ like vector_size
llvm-svn: 44358
2007-11-27 07:28:18 +00:00
Anders Carlsson 61d6f8d6c3 Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h
llvm-svn: 44357
2007-11-27 07:22:09 +00:00
Anders Carlsson 24c59958f4 Add comment to CheckVectorCast.h
llvm-svn: 44356
2007-11-27 07:16:40 +00:00
Chris Lattner f04b69b26c take an initial stab at setting function linkage right. Handle
static and inline at least.

llvm-svn: 44355
2007-11-27 06:46:51 +00:00
Zhou Sheng 34ffaeeeed Make this pass for CYGWIN.
llvm-svn: 44354
2007-11-27 06:23:59 +00:00
Zhou Sheng 73286d6309 Make this testcase compatible with CYGWIN.
llvm-svn: 44353
2007-11-27 06:17:01 +00:00
Chris Lattner 698b1cb28d err, no really.
llvm-svn: 44352
2007-11-27 06:14:32 +00:00
Chris Lattner 28caf2717a don't depend on ADL.
llvm-svn: 44351
2007-11-27 06:14:12 +00:00
Anders Carlsson de71adff60 Report errors for invalid casts from/to vectors.
llvm-svn: 44350
2007-11-27 05:51:55 +00:00
Anders Carlsson f511f646a4 Add more semantic analysis for inline asm statements.
llvm-svn: 44349
2007-11-27 04:11:28 +00:00
Owen Anderson b0dd27ee91 Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
llvm-svn: 44348
2007-11-27 03:43:35 +00:00
Owen Anderson 5aad0d7ea2 Add accessor for getting the underlying templated type. This is necessary for templated LoopInfo.
llvm-svn: 44347
2007-11-27 03:33:40 +00:00
Chuck Rose III 20a104c87f Moving TGLexer.h from source to header file tab in TableGen project file
llvm-svn: 44346
2007-11-27 01:25:12 +00:00
Dan Gohman 8bba724afc Change &| to |&.
llvm-svn: 44345
2007-11-27 00:50:57 +00:00
Dan Gohman 2dba0788a5 Change grep '' to grep {}.
Change 2>&1 | to |&.

llvm-svn: 44344
2007-11-27 00:10:35 +00:00
Dan Gohman 9ab9e9fa03 Don't redirect llvm-as's stderr to llvm-dis.
Change grep '' to grep {}.

llvm-svn: 44343
2007-11-27 00:07:33 +00:00
Dan Gohman f151c8e760 Remove unnecessary && from the RUN lines of this test.
llvm-svn: 44342
2007-11-27 00:03:38 +00:00
Dan Gohman 9a69341725 Don't lower srem/urem X%C to X-X/C*C unless the division is actually
optimized. This avoids creating illegal divisions when the combiner is
running after legalize; this fixes PR1815. Also, it produces better
code in the included testcase by avoiding the subtract and multiply
when the division isn't optimized.

llvm-svn: 44341
2007-11-26 23:46:11 +00:00
Chuck Rose III 084b0eb3ca Add TGParser files to VStudio project files. Removed generated files section from TableGen project file as it is no longer needed. #Include <algorithm> directly from TGParser.cpp so it can see std::reverse.
llvm-svn: 44340
2007-11-26 23:19:59 +00:00
Ted Kremenek fbb08bc2e2 Added optional pass-by-reference argument "isExact" to
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.

Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).

llvm-svn: 44339
2007-11-26 23:12:30 +00:00
Ted Kremenek 871422eca9 Removed dependence on #including iostream.
llvm-svn: 44338
2007-11-26 22:50:46 +00:00
Ted Kremenek 6eefb85ef5 Fixed #include of objc/objc.h so that it works on case-sensitive filesystems.
llvm-svn: 44337
2007-11-26 22:49:09 +00:00
Ted Kremenek 2b0ce11952 Reverted changed to getTagDeclType() introduced in patch 44089:
http://llvm.org/viewvc/llvm-project?view=rev&revision=44089

"Decl" once again can no longer be NULL, so the NULL checks are not needed.

llvm-svn: 44336
2007-11-26 21:16:01 +00:00
Fariborz Jahanian 96502afb6f Fixed a rewrite bug in class synthesis (which I first thought was a rewrite API bug).
llvm-svn: 44335
2007-11-26 20:59:57 +00:00
Kevin e01743a3a3 Removes link to status page till the info gets added. Someone put us on Reddit; Don't want it to look bad on the project. :)
http://programming.reddit.com/info/61f8g/comments/

llvm-svn: 44334
2007-11-26 20:47:14 +00:00
Fariborz Jahanian a883d6ed89 Patch to fix a regression caused by recent rewrite changes.
A potential API bug in ReplaceText pending (A FIXME is added).

llvm-svn: 44333
2007-11-26 19:52:57 +00:00
Ted Kremenek ebb1c0ca74 Fixed StmtPrinter to handle GCC extension to the ternary operator "?:" where
the LHS subexpression can be NULL.  Patch provided by Nuno Lopes!

llvm-svn: 44328
2007-11-26 18:27:54 +00:00
Ted Kremenek 138988765c Fixed bug in CFG construction where we did not properly handle the GCC
extension "?:" for the ternary operator, e.g.: x ?: y; This expression is
represented in the clang ASTs as a ConditionalOperator whose LHS expression is
NULL. Now we handle this special case, causing the block containing the
condition to be a predecessor to the block that "merges" the values of the
ternary operator.

Thanks to Nuno Lopes for identifying and diagnosing this bug!

llvm-svn: 44327
2007-11-26 18:20:26 +00:00
Bill Wendling 8da1db4f34 The checking for the delimiters of expected error/warning messages was
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.

llvm-svn: 44326
2007-11-26 08:26:20 +00:00
Owen Anderson 9f0b6e9d46 Fix another bug that was causing siod to fail.
llvm-svn: 44325
2007-11-26 07:17:19 +00:00
Owen Anderson 7cad745d49 Fix a silly bug that Nicholas noticed.
llvm-svn: 44324
2007-11-26 03:27:38 +00:00
Owen Anderson 4f833c7610 Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
llvm-svn: 44323
2007-11-26 02:26:36 +00:00
Chris Lattner 2ab40a6207 Fix sema support for the gnu ?: expression with a
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right 
result type.  This fixes PR1824.

llvm-svn: 44322
2007-11-26 01:40:58 +00:00
Chris Lattner a3ee6fa84f this works.
llvm-svn: 44321
2007-11-26 01:39:17 +00:00
Anton Korobeynikov 2f76e373ae Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...
llvm-svn: 44320
2007-11-25 23:52:02 +00:00
Nick Lewycky cdb7e54ca7 Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Chris Lattner c00e8adfe0 Implement PR1822
llvm-svn: 44318
2007-11-25 21:27:53 +00:00
Anton Korobeynikov bd9df0f200 Remove a leak. Destroy LoopInfoBase object. releaseMemory() is actually called in its dtor.
llvm-svn: 44317
2007-11-25 18:41:39 +00:00
Chris Lattner 852ed06d60 sizeof() return size in bytes, not bits, patch by Nuno Lopes!
llvm-svn: 44316
2007-11-25 17:48:21 +00:00
Duncan Sands 185eeac0f8 Fix PR1816. If a bitcast of a function only exists because of a
trivial difference in function attributes, allow calls to it to
be converted to direct calls.  Based on a patch by Török Edwin.
While there, move the various lists of mutually incompatible
parameters etc out of the verifier and into ParameterAttributes.h.

llvm-svn: 44315
2007-11-25 14:10:56 +00:00
Reid Spencer f7121af96d Don't ignore files that are no longer in use.
llvm-svn: 44313
2007-11-25 07:05:05 +00:00
Ted Kremenek 43fb8b0799 Moved logic for -Wfloat-equal to SemaChecking.cpp.
Moved utility functions IgnoreParen and friends to be static inline functions
defined in SemaUtil.h.

Added SemaUtil.h to Xcode project.

llvm-svn: 44312
2007-11-25 00:58:00 +00:00
Anders Carlsson 290aa8560b Check that the clobber registers are valid.
llvm-svn: 44311
2007-11-25 00:25:21 +00:00
Chris Lattner 5728bdd4db Fix a long standing deficiency in the X86 backend: we would
sometimes emit "zero" and "all one" vectors multiple times,
for example:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M2
	ret

instead of:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	movq	%mm0, _M2
	ret

This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type.  This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.

This patch makes the following changes:

1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
   their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
   immAllZerosV in the wrong form now use *_bc to match them with a
   bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle 
   bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
   is legal, instead of generating one that is illegal and expecting
   a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.

This patch is definite goodness, but has the potential to cause random
code quality regressions.  Please be on the lookout for these and let 
me know if they happen.

llvm-svn: 44310
2007-11-25 00:24:49 +00:00
Anders Carlsson c163657f2f Forgot some X86 registers
llvm-svn: 44309
2007-11-25 00:23:10 +00:00
Anders Carlsson 5fa3f348f7 Add tables for GCC register names and aliases. This will be used for inline asm
llvm-svn: 44308
2007-11-24 23:38:12 +00:00