Bill Wendling
0b973210f8
Rename the .c to .ll
...
llvm-svn: 46396
2008-01-26 06:53:40 +00:00
Bill Wendling
0f69974fdb
Move testcase to the code gen directory.
...
llvm-svn: 46395
2008-01-26 06:53:06 +00:00
Bill Wendling
5079483957
If there are no machine instructions emitted for a function, then insert
...
a "nop" instruction so that we don't have the function's label associated
with something that it's not supposed to be associated with.
llvm-svn: 46394
2008-01-26 06:51:24 +00:00
Duncan Sands
c4dc3dc3a2
Create an explicit copy for byval parameters even
...
when inlining a readonly function.
llvm-svn: 46393
2008-01-26 06:41:49 +00:00
Anders Carlsson
8a88c3815a
Tweaks to EmitLValue in CGExprConstant. Patch by Eli Friedman.
...
llvm-svn: 46389
2008-01-26 04:30:23 +00:00
Anders Carlsson
a413911373
Add CodeGen for AddrOf in constant initializers. Original patch by Eli Friedman.
...
llvm-svn: 46388
2008-01-26 02:08:50 +00:00
Bill Wendling
0862e3421d
If we have a function like this:
...
void bork() {
int *address = 0;
*address = 0;
}
It's compiled into LLVM code that looks like this:
define void @bork() noreturn nounwind {
entry:
unreachable
}
This is bad on some platforms (like PPC) because it will generate the label for
the function but no body. The label could end up being associated with some
non-code related stuff, like a section. This places a "trap" instruction if the
SimplifyCFG pass removed all code from the function leaving only one
"unreachable" instruction.
llvm-svn: 46387
2008-01-26 01:43:44 +00:00
Anders Carlsson
610ee7134e
Factor out the constant generation into its own file.
...
llvm-svn: 46386
2008-01-26 01:36:00 +00:00
Devang Patel
8797851fbe
Add another testcase.
...
llvm-svn: 46385
2008-01-26 01:21:48 +00:00
Chris Lattner
31e9edce1c
Fix some bugs in SimplifyNodeWithTwoResults where it would call deletenode to
...
delete a node even if it was not dead in some cases. Instead, just add it to
the worklist. Also, make sure to use the CombineTo methods, as it was doing
things that were unsafe: the top level combine loop could touch dangling memory.
This fixes CodeGen/Generic/2008-01-25-dag-combine-mul.ll
llvm-svn: 46384
2008-01-26 01:09:19 +00:00
Chris Lattner
720d8999c7
don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
...
llvm-svn: 46383
2008-01-26 01:05:42 +00:00
Evan Cheng
2df73ea849
New test case.
...
llvm-svn: 46382
2008-01-26 00:35:43 +00:00
Ted Kremenek
95a123c0ec
Added back logic in patch r46361 ( http://llvm.org/viewvc/llvm-project?rev=46361&view=rev ) with the addition of
...
some previously missing NULL pointer checks.
Modified the UninitializedValues analysis to not expect that every Expr* at the
block-level is a block-level expression (we probably need to change the name of
such expressions to something truer to their meaning).
llvm-svn: 46380
2008-01-26 00:03:27 +00:00
Ted Kremenek
5588c9e9ce
Implemented transfer function for '/='.
...
llvm-svn: 46379
2008-01-25 23:45:34 +00:00
Ted Kremenek
2b8a7c80b8
Further refactoring of transfer functions by having APSIntSetOp take
...
a template-template parameter.
llvm-svn: 46378
2008-01-25 23:43:12 +00:00
Chris Lattner
cb3cf546c3
reduce indentation
...
llvm-svn: 46377
2008-01-25 23:34:24 +00:00
Ted Kremenek
0cb1ba2c5e
Reverting r46361 ( http://llvm.org/viewvc/llvm-project?rev=46361&view=rev ) until
...
I diagnose the source of the failures it causes in the test suite.
llvm-svn: 46376
2008-01-25 23:22:27 +00:00
Ted Kremenek
ec5a444de6
Renamed RValueDisjunctiveEqual to RValEqualityORSet.
...
Renamed RValueConjunctiveUnequal to RValInequalityANDSet.
Refactored add/subtract/multiple (and now divide) operations for
RValEqualityORSet to be based on a single template function.
llvm-svn: 46374
2008-01-25 22:55:56 +00:00
Chris Lattner
0af861c43a
add a testcase for a bug Duncan pointed out.
...
llvm-svn: 46372
2008-01-25 22:36:24 +00:00
Steve Naroff
fda820970a
Add more support for Apple's "private extern" extension...
...
llvm-svn: 46371
2008-01-25 22:14:40 +00:00
Ted Kremenek
109e362fbd
Fixed 80 col. violation.
...
llvm-svn: 46370
2008-01-25 22:07:26 +00:00
Duncan Sands
f52faf9a64
Do this more neatly.
...
llvm-svn: 46369
2008-01-25 22:06:51 +00:00
Ted Kremenek
555855c779
Renamed RValueMayEqualSet to RValueDisjunctiveEqual.
...
llvm-svn: 46368
2008-01-25 22:06:07 +00:00
Chris Lattner
77927cc33c
Add support for dispatching an objc message to a variable
...
in an initializer list.
llvm-svn: 46367
2008-01-25 19:43:26 +00:00
Chris Lattner
8917c5ace2
First half of a fix for the "objc message send in initializer" bug. This only
...
handles message sends with typenames to start with.
llvm-svn: 46366
2008-01-25 19:37:24 +00:00
Chris Lattner
e10c6da41e
Factor a complex predicate out to a helper method.
...
llvm-svn: 46365
2008-01-25 19:25:00 +00:00
Chris Lattner
de001c186e
fix isIntegerConstantExpr evaluation of unary !.
...
llvm-svn: 46364
2008-01-25 19:16:19 +00:00
Chris Lattner
8f6970663a
split the second half of ParseObjCMessageExpression into a new
...
ParseObjCMessageExpressionBody method.
llvm-svn: 46363
2008-01-25 18:59:06 +00:00
Chris Lattner
b241a1ba4c
remove an implemented todo
...
llvm-svn: 46362
2008-01-25 18:58:06 +00:00
Ted Kremenek
463b726698
When adding assignment expressions to the set of block-level expressions, only
...
include the assignment expressions whose result (as in the value of the
expression) is used by other expressions.
llvm-svn: 46361
2008-01-25 18:28:28 +00:00
Chris Lattner
6532001fc0
Reorder a field to reduce the size of StackObject. Note that this
...
may require a clean rebuild on leopard. :(
llvm-svn: 46360
2008-01-25 17:49:41 +00:00
Fariborz Jahanian
cc9c5452d1
Diagnose bad receiver type.
...
llvm-svn: 46358
2008-01-25 17:43:39 +00:00
Duncan Sands
e5433a90ce
Test for PR1942.
...
llvm-svn: 46357
2008-01-25 17:36:44 +00:00
Chris Lattner
fc80996a21
fix long lines.
...
llvm-svn: 46355
2008-01-25 17:24:52 +00:00
Chris Lattner
919ad97c01
JITEmitter.cpp was trying to sync the icache for function stubs, but
...
was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct
size), just make the target sync its own stubs.
llvm-svn: 46354
2008-01-25 16:41:09 +00:00
Seo Sanghyeon
d145ac0b34
Implement -print-prog-name. Patch by Nuno Lopes.
...
llvm-svn: 46353
2008-01-25 14:57:54 +00:00
Duncan Sands
d7d4d2b522
Add more assertions to catch accesses outside of
...
arrays. Also, as a convenience, don't barf, just
return false, if someone calls isTruncStoreLegal
or isLoadXLegal with an extended type for the in
memory type.
llvm-svn: 46352
2008-01-25 10:20:53 +00:00
Owen Anderson
6af19fd1e2
DeadStoreElimination can treat byval parameters as if there were alloca's for the purpose of removing end-of-function stores.
...
llvm-svn: 46351
2008-01-25 10:10:33 +00:00
Chris Lattner
fe34236d73
move this field back. Moving the field causes miscompilations (!) of voronoi and others.
...
llvm-svn: 46350
2008-01-25 07:29:34 +00:00
Chris Lattner
2d7a830ff3
Add skeletal code to increase the alignment of loads and stores when
...
we can infer it. This will eventually help stuff, though it doesn't
do much right now because all fixed FI's have an alignment of 1.
llvm-svn: 46349
2008-01-25 07:20:16 +00:00
Chris Lattner
6068832dbe
move MachineFrameInfo::CreateFixedObject out of line, give MachineFrameInfo
...
a reference to TargetFrameInfo. Rearrange order of fields in StackObject to
save a word.
llvm-svn: 46348
2008-01-25 07:19:06 +00:00
Chris Lattner
da52d9e093
include alignment and volatility information in -view-*-dags output
...
llvm-svn: 46347
2008-01-25 06:40:45 +00:00
Chris Lattner
c0afc54c7f
add a fixme.
...
llvm-svn: 46346
2008-01-25 06:20:20 +00:00
Chris Lattner
f4523c35cb
optimize fxor like for
...
llvm-svn: 46345
2008-01-25 06:14:17 +00:00
Chris Lattner
84ab724e06
Add target-specific dag combines for FAND(x,0) and FOR(x,0). This allows
...
us to compile:
double test(double X) {
return copysign(0.0, X);
}
into:
_test:
andpd LCPI1_0(%rip), %xmm0
ret
instead of:
_test:
pxor %xmm1, %xmm1
andpd LCPI1_0(%rip), %xmm1
movapd %xmm0, %xmm2
andpd LCPI1_1(%rip), %xmm2
movapd %xmm1, %xmm0
orpd %xmm2, %xmm0
ret
llvm-svn: 46344
2008-01-25 05:46:26 +00:00
Nate Begeman
43eec490fb
Support checking and codegen of constant vector globals
...
llvm-svn: 46343
2008-01-25 05:34:48 +00:00
Steve Naroff
78c6cdf95e
Replace Sema::CheckVariableInitList, CheckConstantInitList, and CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.
...
This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)
Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)
llvm-svn: 46339
2008-01-25 00:51:06 +00:00
Anton Korobeynikov
fcde616864
Provide correct DWARF register numbering for debug information emission on x86-32/Darwin.
...
This should fix bunch of issues.
llvm-svn: 46337
2008-01-25 00:34:13 +00:00
Chris Lattner
3efff5472b
Fix a bug recovering from broken code with a goto that Eli reported.
...
llvm-svn: 46336
2008-01-25 00:01:10 +00:00
Chris Lattner
9046dc1080
Change the location we return for the EOF token to actually be on the last
...
line of the file, in the common case where a file ends with a newline.
llvm-svn: 46335
2008-01-25 00:00:30 +00:00