Sebastian Redl
8b2540439f
Introduce an explicit case for member pointers in CodeGenTypes. However, it simply asserts.
...
llvm-svn: 62960
2009-01-25 13:35:30 +00:00
Sebastian Redl
a865ade730
Fix compile error from r62953.
...
llvm-svn: 62959
2009-01-25 13:34:47 +00:00
Nick Lewycky
21add8f983
Start generating arbitrary precision integer SCEVs. This removes the temporary
...
code that rounded up and capped the size.
llvm-svn: 62958
2009-01-25 08:16:27 +00:00
Nick Lewycky
cb7a10ab63
Actually run the test in this directory.
...
llvm-svn: 62957
2009-01-25 08:05:07 +00:00
Nick Lewycky
5647c5d1a4
The function that does nothing but call malloc is noalias return.
...
llvm-svn: 62956
2009-01-25 07:59:57 +00:00
Evan Cheng
1c7c019229
Private linkage support for PPC / Darwin.
...
llvm-svn: 62955
2009-01-25 06:32:01 +00:00
Evan Cheng
abda665f5f
Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
...
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1028
%reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead>
In this case, it might not be possible to coalesce the second MOV8rr
instruction if the first one is coalesced. So it would be profitable to
commute it:
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1029
%reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead>
llvm-svn: 62954
2009-01-25 03:53:59 +00:00
Eli Friedman
8bad1c5903
One more case for Expr::isConstantInitializer; I think this covers
...
everything that we aren't intending to implement in Expr::Evaluate.
llvm-svn: 62953
2009-01-25 03:27:40 +00:00
Eli Friedman
384da27131
Enhancements to Expr::isConstantInitializer to deal with a few
...
cases it couldn't deal with before.
llvm-svn: 62952
2009-01-25 03:12:18 +00:00
Eli Friedman
7139af42ce
Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
...
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.
llvm-svn: 62951
2009-01-25 02:32:41 +00:00
Eli Friedman
cf2b7ba4a7
Get rid of some code that should be unnecessary.
...
llvm-svn: 62950
2009-01-25 02:10:46 +00:00
Eli Friedman
c69d454d5a
Make the constant folder aware of
...
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)
llvm-svn: 62949
2009-01-25 01:54:01 +00:00
Eli Friedman
529a99bcf4
Fix the address of a label to be properly considered and emitted as a
...
constant.
llvm-svn: 62948
2009-01-25 01:21:06 +00:00
Eli Friedman
8b7c52658b
Fix for PR2100: merge types for variables.
...
llvm-svn: 62947
2009-01-24 23:49:55 +00:00
Eli Friedman
588395702f
Correct test; sorry for any inconvenience.
...
llvm-svn: 62946
2009-01-24 23:44:26 +00:00
Fariborz Jahanian
a887e63434
Compute instaceStart/instanceSize fields of the class_ro_t meta-data
...
for objc2's non-fragile abi.
llvm-svn: 62945
2009-01-24 23:43:01 +00:00
Sebastian Redl
c6d52f5dfb
Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug.
...
llvm-svn: 62944
2009-01-24 23:29:36 +00:00
Eli Friedman
52cc016f21
PR3062: statement expressions should be illegal at file scope. I don't
...
think this has any significant effects at the moment, but it could
matter if we start constant-folding statement expressions like gcc does.
llvm-svn: 62943
2009-01-24 23:09:00 +00:00
Eli Friedman
8549e5dcc8
Fix for PR2910: implement CodeGen for non-constant offsetof.
...
Note that there are still other issues in this area; see PR3396.
llvm-svn: 62942
2009-01-24 22:38:55 +00:00
Eli Friedman
2aa38fea35
Refactor sizeof handling to use constant folding logic for constant
...
sizeof expressions.
llvm-svn: 62941
2009-01-24 22:19:05 +00:00
Nate Begeman
b09b0242ca
Fix an indent and a typo.
...
llvm-svn: 62940
2009-01-24 22:12:48 +00:00
Chris Lattner
6806131c6b
add initial support for the gcc "alignof(decl) is the alignment of the decl
...
not the type" semantics. This can definitely be improved, but is better than
what we had.
llvm-svn: 62939
2009-01-24 21:53:27 +00:00
Dale Johannesen
2b3389a626
Revert previous change; even this mild and clearly
...
more accurate change loses more than it gains on
benchmarks.
llvm-svn: 62938
2009-01-24 21:49:34 +00:00
Sebastian Redl
887ce84b2b
Undo accidental disabling of smart pointers.
...
llvm-svn: 62937
2009-01-24 21:36:33 +00:00
Chris Lattner
5eca6ada3a
Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)
...
llvm-svn: 62936
2009-01-24 21:29:22 +00:00
Fariborz Jahanian
4723fb70a9
Patch to build class meta-data for each implementation
...
of class in objc2's nonfragile abi.
llvm-svn: 62935
2009-01-24 21:21:53 +00:00
Sebastian Redl
9ed6efdd75
Add support for declaring pointers to members.
...
Add serialization support for ReferenceType.
llvm-svn: 62934
2009-01-24 21:16:55 +00:00
Chris Lattner
04964bbebe
remove a bunch of alignment handling code out of CGExprScalar, since
...
alignment must always be a constant. Just let the constant folder
do it.
llvm-svn: 62933
2009-01-24 21:09:45 +00:00
Chris Lattner
24aeeab05c
Improve handling of alignof. alignof(VLA) now works properly for example.
...
llvm-svn: 62932
2009-01-24 21:09:06 +00:00
Chris Lattner
7bf46469f3
fix some const-correctness issues.
...
llvm-svn: 62931
2009-01-24 21:08:33 +00:00
Chris Lattner
096d3ecb51
remove dead code.
...
llvm-svn: 62930
2009-01-24 20:24:49 +00:00
Fariborz Jahanian
9e3ad5220d
This patch builds the meta-class object for each
...
implemented class in objc2's nonfrigile abi.
llvm-svn: 62929
2009-01-24 20:21:50 +00:00
Chris Lattner
8dff017695
Fix PR3386 by handling GCC's rules for alignof, which are substantially
...
different than those for sizeof. Reject alignof(bitfield) like gcc does.
llvm-svn: 62928
2009-01-24 20:17:12 +00:00
Chris Lattner
619393762b
fix a fixme, don't leak the expr on error.
...
llvm-svn: 62927
2009-01-24 19:49:13 +00:00
Chris Lattner
b1355b1545
minor formatting changes, no functionality change.
...
llvm-svn: 62926
2009-01-24 19:46:37 +00:00
Torok Edwin
3cedd4dc64
add note about possible GEP improvement with fields of size 0.
...
llvm-svn: 62925
2009-01-24 19:30:25 +00:00
Daniel Dunbar
134a02586e
Fix invalid evaluation of _Complex float (real & imaginary parts had
...
mismatched semantics).
- Enforce this in APValue.
llvm-svn: 62924
2009-01-24 19:08:01 +00:00
Anders Carlsson
a0b892113a
Handle the 'e' constraint. Fixes PR3385
...
llvm-svn: 62923
2009-01-24 18:03:09 +00:00
Anders Carlsson
b66a312f93
Ignore parens when determining if an expr is a string literal. Fixes PR3382.
...
llvm-svn: 62922
2009-01-24 17:47:50 +00:00
Dan Gohman
73fd5a5651
Add a PR comment to this test.
...
llvm-svn: 62921
2009-01-24 17:32:54 +00:00
Torok Edwin
f4395ea97a
testcase for PR3381.
...
Also it was an empty struct, not a void after all.
llvm-svn: 62920
2009-01-24 17:16:04 +00:00
Dan Gohman
142ccc0e15
Add more documentation mentioning the limitations due to PR2660.
...
llvm-svn: 62919
2009-01-24 15:58:40 +00:00
Torok Edwin
73ff92272f
void* is represented as pointer to empty struct {}.
...
Thus we need to check whether the struct is empty before trying to index into
it. This fixes PR3381.
llvm-svn: 62918
2009-01-24 11:30:49 +00:00
Owen Anderson
ee34b8f179
Some cleanups. No functional changes.
...
llvm-svn: 62917
2009-01-24 10:07:43 +00:00
Daniel Dunbar
ed4361ecbb
Add simple make based harness for running ABI tests.
...
llvm-svn: 62916
2009-01-24 08:43:22 +00:00
Daniel Dunbar
3334a44501
Start filling in x86_64 ABI implementation.
...
- No functionality change, moved behind -use-x86_64-abi option until
it becomes non-experimental.
llvm-svn: 62915
2009-01-24 08:32:22 +00:00
Ted Kremenek
b239341ec4
Updated checker build.
...
llvm-svn: 62914
2009-01-24 08:11:59 +00:00
Ted Kremenek
b3fcaa7a77
Fix crash ElementRegion::getRValueType() when the RvalueType of the ArrayRegion is a typedef and not (directly) a pointer.
...
llvm-svn: 62909
2009-01-24 06:11:36 +00:00
Dale Johannesen
899ecdbbba
Improve the inlining cost function a bit.
...
Little practical effect.
llvm-svn: 62908
2009-01-24 01:27:33 +00:00
Chris Lattner
72cd68fe64
Make InstCombineStoreToCast handle aggregates more aggressively,
...
handling the case in Transforms/InstCombine/cast-store-gep.ll, which
is a heavily reduced testcase from Clang on x86-64.
llvm-svn: 62904
2009-01-24 01:00:13 +00:00