Argyrios Kyrtzidis
9321c74bd0
Allow array-to-pointer conversion for rvalues.
...
llvm-svn: 56094
2008-09-11 04:25:59 +00:00
Argyrios Kyrtzidis
0fdbd6cf25
CXXConditionDeclExpr expression node is an lvalue.
...
llvm-svn: 56093
2008-09-11 04:22:26 +00:00
Argyrios Kyrtzidis
e7092bafc2
LangOptions.C99 should be false in C++.
...
llvm-svn: 56092
2008-09-11 04:21:06 +00:00
Dale Johannesen
58d084c05b
The version of AtomicSDNode::AtomicSDNode used (only) for
...
cmp-and-swap reversed the Cmp and Swap arguments; comments
make it clear this is unintentional. Unfortunately, the
x86 BE had a compensating reversal, which is removed here.
PPC is OK.
From inspection of the Alpha code I think it is OK, but
if somebody has that platform please check it out. I
cannot test on that platform.
llvm-svn: 56091
2008-09-11 03:12:59 +00:00
Argyrios Kyrtzidis
504bb844ba
Revert r56078, getLang().C99 being true in C++ is a bug that will be fixed.
...
llvm-svn: 56090
2008-09-11 03:06:46 +00:00
Douglas Gregor
e972aa471d
Add support for expected-note to Clang's -verify option
...
llvm-svn: 56089
2008-09-11 02:46:36 +00:00
Owen Anderson
41baf8b22a
If ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before giving up. This fixes 445.gobmk on
...
X86-64 in fast isel.
llvm-svn: 56088
2008-09-11 02:41:37 +00:00
Dale Johannesen
e5ca04e70d
Succumb utterly to compatibility and implement
...
__sync_fetch_and_nand as ANDC, even though that's
not what nand means.
llvm-svn: 56087
2008-09-11 02:15:03 +00:00
Daniel Dunbar
d3674e6f40
Use ABIArgInfo for decisions about function arguments (not just return
...
value).
- Added ABIArgInfo::ByVal (mostly supported) and ABIArgInfo::Expand
(asserted out).
- Added classifyArgumentType which currently just uses
ABIArgInfo::Default or ByVal. This nearly matches old behavior, but
we now set ByVal in a few situations we may have left it off before
(on complex, for example).
llvm-svn: 56086
2008-09-11 01:48:57 +00:00
Evan Cheng
b401449ceb
Propagate subreg index when promoting a load to a copy.
...
llvm-svn: 56085
2008-09-11 01:02:12 +00:00
Daniel Dunbar
ce05c8eb49
Fix two bugs exposed by array passing assert:
...
(1) Additional arguments to variadic methods should have default
promotions applied.
(2) Additional arguments to non-variadic methods were allowed.
llvm-svn: 56084
2008-09-11 00:50:25 +00:00
Daniel Dunbar
16211a2cc7
Add ObjCMethodDecl::getSourceRange.
...
llvm-svn: 56083
2008-09-11 00:47:15 +00:00
Dan Gohman
9d9a4be588
In my analysis for r56076 I missed the case where the original
...
multiplication overflows.
llvm-svn: 56082
2008-09-11 00:25:00 +00:00
Argyrios Kyrtzidis
f01fa82423
Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
...
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html
llvm-svn: 56081
2008-09-11 00:21:41 +00:00
Daniel Dunbar
83876b4594
Bug fix, apply default argument promotion in message sends for which
...
no method declaration was found.
- This was allowing arrays to pass "by value" among other things.
Add assert in CodeGen that arguments cannot have array type.
llvm-svn: 56080
2008-09-11 00:04:36 +00:00
Daniel Dunbar
aa9326c7e2
Refactor common Obj-C message send checking code into
...
CheckMessageArgumentTypes.
- No functionality change.
llvm-svn: 56079
2008-09-11 00:01:56 +00:00
Argyrios Kyrtzidis
48dea3b9f5
-getLang().C99 is true in C++ too, remove the use of the C99orCXX variable.
...
-Scoping in C99 works good for C++ too, remove the C++-specific comments.
If someone thinks that the C++-specific comments are necessary for clarification, let me know and I'll put them back on.
llvm-svn: 56078
2008-09-10 23:46:08 +00:00
Argyrios Kyrtzidis
996677e12d
In the 'condition.cpp' test case, make sure that condition declarations are local to the statement.
...
llvm-svn: 56077
2008-09-10 23:34:50 +00:00
Dan Gohman
c1ae01688f
Fix an icmp+sdiv optimization to check for and handle an overflow
...
condition. This fixes PR2740.
llvm-svn: 56076
2008-09-10 23:30:57 +00:00
Daniel Dunbar
b034bc71d4
Add XFAIL test case for:
...
<rdar://problem/6211479> [sema] array type invalid for Obj-C property
llvm-svn: 56075
2008-09-10 23:11:23 +00:00
Dan Gohman
dd51d52c0f
Add more documentation advertising the -view-*-dags options.
...
llvm-svn: 56073
2008-09-10 22:23:41 +00:00
Dan Gohman
bf646f2986
X86FastISel support for double->float and float->double casts.
...
llvm-svn: 56070
2008-09-10 21:02:08 +00:00
Dan Gohman
1dc9b0514f
FastISel support for i1 PHI nodes.
...
llvm-svn: 56069
2008-09-10 21:01:31 +00:00
Dan Gohman
940bafb687
FastISel support for i1 constants.
...
llvm-svn: 56068
2008-09-10 21:01:08 +00:00
Owen Anderson
7591130946
Fix a bug in the coalescer where it didn't check if a live interval existed before trying to manipulate it. This
...
was exposed by fast isel's handling of shifts on X86-64. With this, FreeBench/pcompress2 passes on X86-64 in fast isel.
llvm-svn: 56067
2008-09-10 20:41:13 +00:00
Dan Gohman
39d82f902a
Add X86FastISel support for static allocas, and refences
...
to static allocas. As part of this change, refactor the
address mode code for laods and stores.
llvm-svn: 56066
2008-09-10 20:11:02 +00:00
Evan Cheng
534fe1c405
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands.
...
llvm-svn: 56065
2008-09-10 20:08:45 +00:00
Steve Naroff
2752a17a00
More semantic analysis for blocks...
...
llvm-svn: 56064
2008-09-10 19:17:48 +00:00
Steve Naroff
3ef15b5c2a
Sema::ActOnIdentifierExpr(): Lookup block arguments.
...
llvm-svn: 56063
2008-09-10 18:33:00 +00:00
Evan Cheng
710c3cf36a
Fix a fastcc + sret bug. If fastcc and sret, callee doesn't need to pop the hidden struct ptr; Re-enable fastcc.
...
llvm-svn: 56061
2008-09-10 18:25:29 +00:00
Argyrios Kyrtzidis
eece3fe4fd
Add some C++-specific comments in the parsing methods of if/switch/while/for.
...
llvm-svn: 56060
2008-09-10 17:38:35 +00:00
Dale Johannesen
4cc893bab6
Handle new intrinsics with vector arguments.
...
Patch by Paul Redmond.
llvm-svn: 56059
2008-09-10 17:31:40 +00:00
Dan Gohman
222018da7b
Add a break statement that I accidentally deleted when
...
I shuffled the fast-isel command-line options around. This fixes
a bunch of fast-isel failures.
llvm-svn: 56057
2008-09-10 15:52:34 +00:00
Devang Patel
728c44ab56
fix white spaces.
...
llvm-svn: 56056
2008-09-10 14:49:55 +00:00
Duncan Sands
6d6a65310b
Fix name.
...
llvm-svn: 56055
2008-09-10 13:22:10 +00:00
Duncan Sands
83e45acc25
Add trampoline support for the new FastCC calling
...
convention (not related to recent Ada testsuite
failures).
llvm-svn: 56054
2008-09-10 13:11:09 +00:00
Duncan Sands
536c399579
Turn off the new FastCC for the moment. It causes
...
a slew of Ada testsuite failures on x86-32 linux.
Seems to be related to the use of float.
llvm-svn: 56053
2008-09-10 13:09:24 +00:00
Daniel Dunbar
573884eaf7
Implement ABIArgType::Coerce support.
...
- As a test, enable basic usage for some common x86-32 cases. This
increases our x86-32 compliance (on other targets our compliance
will just be broken in a different way).
llvm-svn: 56051
2008-09-10 07:04:09 +00:00
Daniel Dunbar
b8b4759462
Add CodeGenTypes::GetFunctionType overload for getting the effective
...
type of a call.
Change NeXT runtime to use this instead of trying to bitcasting
internally (which doesn't respect the ABI).
Fix subtle bug, use of ConvertTypeRecursive instead of ConvertType is
bad inside GetFunctionType.
llvm-svn: 56050
2008-09-10 07:00:50 +00:00
Bill Wendling
6987fec11c
Remove unnecessary bit-wise AND from the limited precision work.
...
llvm-svn: 56049
2008-09-10 06:26:10 +00:00
Daniel Dunbar
999096065f
Fix 80 col violation.
...
llvm-svn: 56048
2008-09-10 04:16:29 +00:00
Daniel Dunbar
7a95ca3197
Move FunctionType conversion into CGCall.cpp:
...
- Added CodeGenTypes::GetFunctionType, taking a CGFunctionInfo.
- Updated Obj-C runtimes to use this instead of rolling the
llvm::FunctionType by hand.
- Killed CodeGenTypes::{ConvertReturnType, DecodeArgumentTypes}.
Add ABIArgInfo class to encapsulate ABI decision of how to lower types
to LLVM.
- Will move to target sometime soon.
llvm-svn: 56047
2008-09-10 04:01:49 +00:00
Daniel Dunbar
a72d4aece6
Add ABIArgInfo class to encapsulate ABI decision of how to lower types
...
to LLVM.
- Will move to target sometime soon.
llvm-svn: 56046
2008-09-10 02:41:04 +00:00
Argyrios Kyrtzidis
07052350f0
Implement CodeGen support for the 'CXXConditionDeclExpr' expression node, which represents a 'condition' declaration, e.g: "if (int x=0) {...}".
...
llvm-svn: 56045
2008-09-10 02:36:38 +00:00
Argyrios Kyrtzidis
7620ee4550
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).
...
llvm-svn: 56044
2008-09-10 02:17:11 +00:00
Argyrios Kyrtzidis
791dc3cd4e
Change line endings: CRLF -> LF
...
llvm-svn: 56043
2008-09-10 02:14:49 +00:00
Argyrios Kyrtzidis
ac1f2abd93
Use Sema::isDeclInScope instead of IdentifierResolver::isDeclInScope.
...
llvm-svn: 56042
2008-09-10 02:11:07 +00:00
Dan Gohman
97f0a0f28d
Fix a warning about comparing signed and unsigned values.
...
llvm-svn: 56040
2008-09-10 01:09:32 +00:00
Daniel Dunbar
c68897d2c3
Tweak CGCall functions again:
...
- Realized these functions will eventually need access to more data,
moved to CodeGenModule. Eventually they should probably live
together in some other helper class.
llvm-svn: 56039
2008-09-10 00:41:16 +00:00
Daniel Dunbar
76c8eb75b1
Tweak CGCall functions:
...
- Move actual param attr list creation to
CodeGenFunction::ConstructParamAttrList.
- Make ReturnTypeUsesSret static.
llvm-svn: 56038
2008-09-10 00:32:18 +00:00