Commit Graph

40944 Commits

Author SHA1 Message Date
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
Chris Lattner 60fb1d80fe close an li tag
llvm-svn: 46929
2008-02-10 17:52:05 +00:00
Duncan Sands e09506a2c9 Add some Ada info and correct a few buglets.
llvm-svn: 46928
2008-02-10 13:40:55 +00:00
Duncan Sands 56689502c1 Add truncate and AssertZext result expansion.
llvm-svn: 46926
2008-02-10 10:08:52 +00:00
Chris Lattner 5628d24d85 remove the in progress marker.
llvm-svn: 46925
2008-02-10 08:19:35 +00:00
Chris Lattner 458e79fa72 validation fixes
llvm-svn: 46924
2008-02-10 08:18:42 +00:00
Chris Lattner dd6acc0184 final set of major updates
llvm-svn: 46923
2008-02-10 08:17:19 +00:00
Bill Wendling 9c2ce9a32d Return "(c1 + c2)" instead of yet another ADD node (which made this a
no-op).

llvm-svn: 46922
2008-02-10 08:10:24 +00:00
Chris Lattner 2b8a52e259 more prose, some organization improvements.
llvm-svn: 46921
2008-02-10 07:46:44 +00:00
Chris Lattner a273586b53 random notes
llvm-svn: 46920
2008-02-10 07:04:35 +00:00
Steve Naroff 1018ea35b7 Refine bug fix to Expr::isLvalue (commit r46917).
llvm-svn: 46919
2008-02-10 01:39:04 +00:00
Chris Lattner 0ededbc68e add anote
llvm-svn: 46918
2008-02-10 01:01:35 +00:00
Steve Naroff 43c50866f1 Change Expr::isLvalue() to allow the "void" type. This fixes bz2000 submitted by Neil Booth.
Neil, can you point me to the place in the C99 spec that says this is allowed? I thought Expr::isLvalue() conformed to the spec, which says "C99 6.3.2.1: an lvalue is an expression with an object type or an incomplete type other than void.". Please advise.

llvm-svn: 46917
2008-02-10 00:30:18 +00:00
Nick Lewycky 52ea27db17 Match GCC's behaviour for these sections.
llvm-svn: 46916
2008-02-10 00:03:54 +00:00
Nate Begeman 727c7634c7 memopv16i8 had wrong alignment requirement, would have broken pabsb
pabs{b,w,d} are not two address
fix extract-to-mem sse4 ops
add sse4 vector sign extend nodes

llvm-svn: 46915
2008-02-09 23:46:37 +00:00
Chris Lattner 20ed4ef554 add some more notes, still not ready for review :)
llvm-svn: 46914
2008-02-09 22:58:07 +00:00
Chris Lattner 56e82884db scoped_ptr.h was removed.
llvm-svn: 46913
2008-02-09 22:50:06 +00:00