Commit Graph

44360 Commits

Author SHA1 Message Date
Matthijs Kooijman 230d6fbfeb Use use_iterator::getOperandNo instead of CallSite::hasArgument to check if a
function is passed as an argument instead of called. Also do this check a bit
earlier.

llvm-svn: 51990
2008-06-05 08:34:25 +00:00
Matthijs Kooijman b0dffd691c * Make CallSite::hasArgument const and let it take a const parameter.
llvm-svn: 51989
2008-06-05 08:04:58 +00:00
Chris Lattner 6cb64030e5 more updates and random notes, including changes up through Week-of-Mon-20080324.
llvm-svn: 51988
2008-06-05 08:02:49 +00:00
Matthijs Kooijman 5afc2740b7 Update comments and documentation to reflect that GCSE and ValueNumbering are
deprecated by the GVN and GVNPRE passes.

llvm-svn: 51983
2008-06-05 07:55:49 +00:00
Bill Wendling 18fbf1bc37 Cast because I think I know what I'm doing. There are warnings about converting
from 64-bit to 32-bit.

llvm-svn: 51982
2008-06-05 07:35:27 +00:00
Matthijs Kooijman 63a2cb59b0 Fix 80 column violations.
llvm-svn: 51981
2008-06-05 07:26:15 +00:00
Bill Wendling b80d63268a Remove unused parameter. Some clients might use -Werror when compiling and
cause drama.

llvm-svn: 51980
2008-06-05 07:24:08 +00:00
Chris Lattner 618a99f920 add llvmc2 notes, stack realignment.
llvm-svn: 51979
2008-06-05 06:57:39 +00:00
Chris Lattner a1a4c9a227 various status updates.
llvm-svn: 51978
2008-06-05 06:35:40 +00:00
Chris Lattner b711222b27 Start adding 2.3 content.
llvm-svn: 51977
2008-06-05 06:25:56 +00:00
Steve Naroff d1c3d1130b Fix trivial crasher and downgrade an error to warning (to match GCC).
llvm-svn: 51976
2008-06-05 04:33:44 +00:00
Steve Naroff cfdf6166fc Support "<p>" as a short-hand for "id<p>". Here's a comment from GCC (the only documentation I could find on it).
/* Make "<SomeProtocol>" equivalent to "id <SomeProtocol>" - nisse@lysator.liu.se.  */

This commit adds the parser magic. The type associated with <p> is still incorrect. Will discuss with Chris.

llvm-svn: 51972
2008-06-05 00:02:44 +00:00
Evan Cheng 976b1eee81 Fix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desired alignment, the frame destination alignment may still be larger than the desired alignment. Don't change its alignment to something smaller.
llvm-svn: 51970
2008-06-04 23:37:54 +00:00
Steve Naroff d5bf26fa26 Fix crash identified by <rdar://problem/5986085>.
llvm-svn: 51969
2008-06-04 23:08:38 +00:00
Devang Patel dbb7263fd9 Add ObjCInterface layout support.
Reuse RecordLayout.

llvm-svn: 51968
2008-06-04 21:54:36 +00:00
Steve Naroff 524fbe8687 Update a test and add a FIXME.
llvm-svn: 51967
2008-06-04 21:38:52 +00:00
Devang Patel 21979193bb Refactoring.
Move field layout code in a ASTRecordLayout member fn.

llvm-svn: 51966
2008-06-04 21:22:16 +00:00
Ted Kremenek 6da61be501 ccc-analyzer now properly eats the -install_name, -exported_symbols_list, -current_version, -compatibility_version, and -sectorder command line arguments.
llvm-svn: 51965
2008-06-04 20:49:03 +00:00
Ted Kremenek 46267c839d Added fixmes.
llvm-svn: 51964
2008-06-04 20:48:08 +00:00
Steve Naroff d9c2607014 Parser::ParseObjCSynchronizedStmt() needs to Enter/Exit a decl scope.
llvm-svn: 51963
2008-06-04 20:36:13 +00:00
Eli Friedman 3e1852fa7e Make sure the types are consistent for a void conditional. No visible
difference, but it's better to be consistent.

llvm-svn: 51961
2008-06-04 19:47:51 +00:00
Eli Friedman 2425cd8158 For setting attributes, don't assume there are ParamVarDecls available,
because trying to access non-existent ParamVarDecls can crash. 
Testcase from the original source for PR2414.

llvm-svn: 51960
2008-06-04 19:41:28 +00:00
Nuno Lopes 7bd6e58ddc fix crash when codegening 'cond ? lhs : call-to-void-func()'
llvm-svn: 51958
2008-06-04 19:15:45 +00:00
Nuno Lopes 28bcfec325 fix type of ?: operator. If one of the operator is void, the type should be void as well.
Please confirm this is safe

llvm-svn: 51957
2008-06-04 19:14:12 +00:00
Fariborz Jahanian 6e59392e4b Fix a gcc compatibility issue which allows more protocol-qualified id on RHS to be
assigned to less protocol qualified object on LHS.

llvm-svn: 51956
2008-06-04 19:00:03 +00:00
Owen Anderson 61c7f2a633 Remove unneeded #include.
llvm-svn: 51955
2008-06-04 18:28:10 +00:00
Chris Lattner 09ebde227e Fix inst_iterator example.
llvm-svn: 51954
2008-06-04 18:20:42 +00:00
Evan Cheng 9e27316337 Oops. Should not be enabled by default.
llvm-svn: 51953
2008-06-04 18:09:20 +00:00
Chris Lattner c596ec04e1 Rewrite a bunch of the CBE's inline asm code, giving it the
ability to handle indirect input operands.  This fixes PR2407.

llvm-svn: 51952
2008-06-04 18:03:28 +00:00
Eli Friedman 8547e1d129 Don't assume that the type of a FunctionDecl is a FunctionType; that
assumption isn't accurate in the presence of typedefs.

llvm-svn: 51951
2008-06-04 17:58:41 +00:00
Owen Anderson 3a697779fe Correctly construct live intervals for the copies we inserted into the predecessors of a block containing a PHI.
llvm-svn: 51950
2008-06-04 17:55:58 +00:00
Evan Cheng 805cde4fbf Revert this.
llvm-svn: 51949
2008-06-04 17:21:44 +00:00
Eli Friedman 67b827900e Make the width and alignment for long double consistent with the
hardcoded data layout in getTargetDescription.  Hopefully fixes a test 
failure.

Of course, this should be fixed properly, but that's a bigger fix.

llvm-svn: 51948
2008-06-04 17:01:45 +00:00
Matthijs Kooijman 2353f35989 Replace two manual loops with calls to CallSite::hasArguments (no functional changes).
llvm-svn: 51947
2008-06-04 16:57:50 +00:00
Matthijs Kooijman d901e5842f Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.
llvm-svn: 51946
2008-06-04 16:31:12 +00:00
Matthijs Kooijman 76d8dec5db Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.
llvm-svn: 51945
2008-06-04 16:14:12 +00:00
Eli Friedman c0b54901f4 clang fix to parallel LLVM r51928
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080602/063306.html).

llvm-svn: 51944
2008-06-04 16:13:19 +00:00
Ted Kremenek b147ad1051 Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.
llvm-svn: 51943
2008-06-04 15:55:15 +00:00
Matthijs Kooijman a6bb22e9bc Fix example to be valid LLVM assembly.
llvm-svn: 51942
2008-06-04 15:46:35 +00:00
Ted Kremenek 1cb246ef20 Update Xcode project.
llvm-svn: 51941
2008-06-04 15:38:06 +00:00
Steve Naroff c68e382ba9 ASTContext::typesAreCompatible(): id is compatible with all qualified id types.
llvm-svn: 51939
2008-06-04 15:07:33 +00:00
Steve Naroff f4308aac53 Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods.
llvm-svn: 51938
2008-06-04 14:43:54 +00:00
Matthijs Kooijman cfd41dbd5e Implement the two constructors in InsertValueInst and ExtractValueInst.
Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.

llvm-svn: 51937
2008-06-04 14:40:55 +00:00
Argyrios Kyrtzidis 6301884dc0 Move Decl and DeclContext implementations into a new DeclBase.cpp file.
llvm-svn: 51936
2008-06-04 13:04:04 +00:00
Evan Cheng 12a0222a01 Add a stack slot coloring pass. Not yet enabled.
llvm-svn: 51934
2008-06-04 09:18:41 +00:00
Evan Cheng a15e7eb29b LowerSubregs should not clobber any analysis.
llvm-svn: 51933
2008-06-04 09:17:16 +00:00
Evan Cheng eecdf659e8 Move #include to right place.
llvm-svn: 51932
2008-06-04 09:16:33 +00:00
Evan Cheng c5b3a3bea5 Register if-converter pass for -debug-pass.
llvm-svn: 51931
2008-06-04 09:15:51 +00:00
Evan Cheng 93af6ce129 More pass manager debugging outputs.
llvm-svn: 51930
2008-06-04 09:13:31 +00:00
Duncan Sands fc3c489b52 Change packed struct layout so that field sizes
are the same as in unpacked structs, only field
positions differ.  This only matters for structs
containing x86 long double or an apint; it may
cause backwards compatibility problems if someone
has bitcode containing a packed struct with a
field of one of those types.
The issue is that only 10 bytes are needed to
hold an x86 long double: the store size is 10
bytes, but the ABI size is 12 or 16 bytes (linux/
darwin) which comes from rounding the store size
up by the alignment.  Because it seemed silly not
to pack an x86 long double into 10 bytes in a
packed struct, this is what was done.  I now
think this was a mistake.  Reserving the ABI size
for an x86 long double field even in a packed
struct makes things more uniform: the ABI size is
now always used when reserving space for a type.
This means that developers are less likely to
make mistakes.  It also makes life easier for the
CBE which otherwise could not represent all LLVM
packed structs (PR2402).
Front-end people might need to adjust the way
they create LLVM structs - see following change
to llvm-gcc.

llvm-svn: 51928
2008-06-04 08:21:45 +00:00