40510 Commits

Author SHA1 Message Date
Chris Lattner
25624858f2 remove unknown details
llvm-svn: 46985
2008-02-12 05:07:12 +00:00
Steve Naroff
ab468cb14b Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.
This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition(). 

We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.

llvm-svn: 46984
2008-02-12 04:08:59 +00:00
Tanya Lattner
779593cd9d Add 2.2 release tag.
llvm-svn: 46981
2008-02-12 02:42:55 +00:00
Steve Naroff
c1e22c7fa1 Fix unsafe static cast...
llvm-svn: 46980
2008-02-12 01:09:36 +00:00
Nate Begeman
fd82c308e5 Stuff noticed while grepping code
llvm-svn: 46979
2008-02-11 23:47:56 +00:00
Dan Gohman
47ff55c41b Correct the order of the arguments in the examples in the comments
for APInt::getBitsSet. And fix an off-by-one bug in "wrapping" mode.

llvm-svn: 46978
2008-02-11 23:45:14 +00:00
Steve Naroff
69e8f9efab Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().
llvm-svn: 46977
2008-02-11 23:15:56 +00:00
Ted Kremenek
633654ffab Consolidated use of BumpPtrAllocator shared by various ImmutableSet/ImmutableMap
factories.

Fixed a horrible bug in lval:DeclVar::classof(RValue* V); we weren't checking
V was an LValue, allowing nonlval::ConcereteInts to match isa<lval::DeclVar>.

llvm-svn: 46976
2008-02-11 23:12:59 +00:00
Ted Kremenek
71941a99d1 The factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
BumpPtrAllocator argument to their constructors.  This BumpPtrAllocator
will be used to allocate trees.  If no BumpPtrAllocator is provided, one
is created (as before).

llvm-svn: 46975
2008-02-11 23:11:12 +00:00
Steve Naroff
bff738543d Move policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclaration() to the driver.
llvm-svn: 46974
2008-02-11 22:40:08 +00:00
Steve Naroff
5915777fca Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.
llvm-svn: 46973
2008-02-11 22:29:58 +00:00
Steve Naroff
5a858df0b3 Fix http://llvm.org/bugs/show_bug.cgi?id=2013.
llvm-svn: 46972
2008-02-11 22:17:33 +00:00
Steve Naroff
b5fc2551e4 After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().
This commit simply changes a couple comments to reflect this decision.

llvm-svn: 46970
2008-02-11 21:52:37 +00:00
Scott Michel
7c48a8f3d7 Added blurb for CellSPU progress
llvm-svn: 46968
2008-02-11 21:05:47 +00:00
Duncan Sands
a6ab6e7adb Generalize the handling of call and return arguments,
in preparation for apint support.  These changes are
intended to have no functional effect.

llvm-svn: 46967
2008-02-11 20:58:28 +00:00
Ted Kremenek
ed3be17b6f Separate bindings for subexpressions to be in a separate map for
bindings for block-level expressions.

Moved pretty-printing logic (DOT) for ValueStates to ValueState.cpp.

llvm-svn: 46965
2008-02-11 19:21:59 +00:00
Dan Gohman
11f6212bc0 From Chris' review: use isa instead of explicitly using classof.
llvm-svn: 46964
2008-02-11 19:00:34 +00:00
Dan Gohman
991056808b From Chris' review: minor corrections in comments.
llvm-svn: 46963
2008-02-11 19:00:03 +00:00
Dan Gohman
54d3b5a1f5 From Chris' review: use cast instead of dyn_cast with an assert.
llvm-svn: 46962
2008-02-11 18:58:42 +00:00
Dan Gohman
7b5d916c98 From Chris' review: fix 80 column violations
llvm-svn: 46961
2008-02-11 18:57:43 +00:00
Dan Gohman
d96dd34637 From Chris' review: change MemOperandSDNode's constructor to pass its
argument by reference, rather than by value. 

llvm-svn: 46960
2008-02-11 18:56:50 +00:00
Wojciech Matyjewicz
adae053b53 If the LHS of the comparison is a loop-invariant we also want to move it
to the RHS. This simple change allows to compute loop iteration count 
for loops with condition similar to the one in the testcase (which seems 
to be quite common).

llvm-svn: 46959
2008-02-11 18:37:34 +00:00
Ted Kremenek
6f30a0798f Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().

Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.

llvm-svn: 46957
2008-02-11 17:24:50 +00:00
Duncan Sands
e6f630e77e Add arbitrary integer support to getRegisterType and
getNumRegisters.  This is needed for calling functions
with apint parameters or return values.

llvm-svn: 46956
2008-02-11 11:09:23 +00:00
Wojciech Matyjewicz
d2d9764cc8 Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
arbitrary iteration.

The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the 
computations (essentially, the division) in BinomialCoefficient() are 
performed with the apprioprate bitwidth necessary to avoid overflow; 
unsigned division is used instead of the signed one.

Computations in BinomialCoefficient() require support from the code 
generator for APInts. Currently, we use a hack rounding up the 
neccessary bitwidth to the nearest power of 2. The hack is easy to turn 
off in future.

One remaining issue: we assume the divisor of the binomial coefficient 
formula can be computed accurately using 16 bits. It means we can handle 
AddRecs of length up to 9. In future, we should use APInts to evaluate 
the divisor.

Thanks to Nicholas for cooperation!

llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Duncan Sands
7377f5fbe3 Add a isBigEndian method to complement isLittleEndian.
llvm-svn: 46954
2008-02-11 10:37:04 +00:00
Evan Cheng
ad4d57a2f5 Determine whether a spill kills the register it's spilling before insertion rather than trying to undo the kill marker afterwards.
llvm-svn: 46953
2008-02-11 08:30:52 +00:00
Chris Lattner
887f5ebfa9 tweaks from dale.
llvm-svn: 46952
2008-02-11 07:27:21 +00:00
Chris Lattner
b0e9321090 updates from Evan
llvm-svn: 46951
2008-02-11 07:21:08 +00:00
Anders Carlsson
6a8350b4f1 Get rid of bogus warnings when the second argument in va_start is either an implicit cast expr or a paren expr.
llvm-svn: 46950
2008-02-11 04:20:54 +00:00
Nate Begeman
2d77e8e446 Enable SSE4 codegen and pattern matching.
Add some notes to the README.

llvm-svn: 46949
2008-02-11 04:19:36 +00:00
Nate Begeman
3090b0fbd1 additional missing feature
llvm-svn: 46948
2008-02-11 04:16:09 +00:00
Steve Naroff
4b32796d1c Add a comment/FIXME to an earlier change.
llvm-svn: 46947
2008-02-11 02:42:07 +00:00
Steve Naroff
e78e2af754 Tweak test...
llvm-svn: 46946
2008-02-11 02:16:41 +00:00
Chris Lattner
c9b96ae832 strings are arrays too
llvm-svn: 46945
2008-02-11 01:35:07 +00:00
Eli Friedman
f54c4e5fea A couple of minor fixes to aggregate codegen, to stop asserting on some
edge cases.

llvm-svn: 46944
2008-02-11 01:09:17 +00:00
Eli Friedman
a5b2023810 Make unsupported constant exprs fail with a warning instead of crashing
codegen.

llvm-svn: 46943
2008-02-11 00:23:10 +00:00
Steve Naroff
326389b8ce Fix http://llvm.org/bugs/show_bug.cgi?id=1988.
Sema::CheckInitializerListTypes() needs to ignore invalid structures.

llvm-svn: 46942
2008-02-11 00:06:17 +00:00
Chris Lattner
36fc8790b7 Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type.  This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.

llvm-svn: 46941
2008-02-11 00:02:17 +00:00
Eli Friedman
de4496bb9e Basic codegen test for conditional with void*.
llvm-svn: 46940
2008-02-10 23:18:23 +00:00
Eli Friedman
fadc8462be Add a couple of sema tests for qualifiers with conditionals containing
void*.

llvm-svn: 46939
2008-02-10 23:14:16 +00:00
Chris Lattner
7b8134f5c6 Fix PR1999, by emitting a hard error only if an argument declarator is completely
missing.  Otherwise, it is an implicit int case, which is valid in c90 and invalid 
elsewhere, but accepted as an extension.

llvm-svn: 46938
2008-02-10 23:08:00 +00:00
Eli Friedman
15888c23f5 Fix the type of conditionals involving void* to be self-consistent and
spec-compliant.

I'll put together some testcases in a bit.

llvm-svn: 46937
2008-02-10 22:59:36 +00:00
Steve Naroff
15833ed168 Add a diagnostics helper to remove some redundant code.
llvm-svn: 46936
2008-02-10 21:38:56 +00:00
Chris Lattner
00c5b28923 long is 32-bit is on win32.
llvm-svn: 46935
2008-02-10 21:12:45 +00:00
Gabor Greif
8dacd3a985 corrected some spellings
maybe c380004 can be hyperlinked too?

llvm-svn: 46934
2008-02-10 20:08:16 +00:00
Chris Lattner
a1ad2bf890 Various updates from Sam Bishop:
"I have been working my way through the JIT and Kaleidoscope tutorials in my
(minuscule) spare time.  Thanks again for writing them!  I have attached a
patch containing some minor changes, ranging from spelling and grammar fixes
to adding a "Next: <next tutorial section>" hyperlink to the bottom of each
page.

Every page has been given the "next link" treatment, but otherwise I'm only
half way through the Kaleidoscope tutorial.  I will send a follow-on patch
if time permits."

llvm-svn: 46933
2008-02-10 19:11:04 +00:00
Chris Lattner
dcddd64424 Fix scalarrepl to not 'miscompile' undefined code, part #2.
This fixes the store case, my previous patch just fixed the load
case.  rdar://5707076.

llvm-svn: 46932
2008-02-10 19:05:37 +00:00
Nate Begeman
3050f74a1d xmm0 variable blends
llvm-svn: 46931
2008-02-10 18:47:57 +00:00
Dan Gohman
3a4be0fdef Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00