Evan Cheng
b024c4c81d
- Bug fixes.
...
- Allow icmp rewrite using an iv / stride of a smaller integer type.
llvm-svn: 43480
2007-10-29 22:07:18 +00:00
Hartmut Kaiser
f557d896cb
Updated VC++ build system
...
llvm-svn: 43479
2007-10-29 21:56:15 +00:00
Hartmut Kaiser
b20beb88cd
Updated VC++ build system
...
llvm-svn: 43478
2007-10-29 21:54:46 +00:00
Hartmut Kaiser
ae240716ec
Added a missing #include.
...
llvm-svn: 43477
2007-10-29 21:54:12 +00:00
Steve Naroff
e093339601
Remove a bunch of TODO's that have been done for quite some time...
...
llvm-svn: 43476
2007-10-29 21:39:29 +00:00
Steve Naroff
33a1e80dd1
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
...
llvm-svn: 43475
2007-10-29 21:38:07 +00:00
Ted Kremenek
31974dfcdf
Added support for StmtIterators to iterate over the size expressions
...
of VariableArrayTypes that appear in TypedefDecls.
for example:
typedef int T[x][x];
the StmtIterator will iterate over "x" and "x" as subexpressions of
the DeclStmt for T.
llvm-svn: 43474
2007-10-29 21:38:03 +00:00
Ted Kremenek
899ef13376
Fixed deadcode bug where check for NULL decl occured within a block
...
where the decl would always be non-NULL. Moved the check to after the
block to properly tidy up the iterator's state.
llvm-svn: 43473
2007-10-29 21:23:58 +00:00
Devang Patel
134b3f4b55
Add RecordOrganizer::layoutUnionFields()
...
llvm-svn: 43472
2007-10-29 20:50:19 +00:00
Ted Kremenek
2f70e71dcc
Modified StmtIterator to support iteration over the size expressions
...
of VariableTypeArray types that appear in DeclStmts.
Removed operator-- from StmtIterator. operator-- added undesired
complexity, and we have no consumers of it.
llvm-svn: 43471
2007-10-29 20:50:16 +00:00
Dan Gohman
ae95d72a52
Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
...
llvm-svn: 43470
2007-10-29 20:44:42 +00:00
Ted Kremenek
6d845f0414
Modified CFG pretty-printing to directly use the (reverse) body
...
iterator of a CompountStmt instead of relying on StmtIterators.
llvm-svn: 43469
2007-10-29 20:41:04 +00:00
Dan Gohman
2aec186dd0
Don't bitcast from pointer-to-vector to pointer-to-array when
...
lowering load and store instructions.
llvm-svn: 43468
2007-10-29 20:34:35 +00:00
Dan Gohman
3bcd5fe9f1
Use an array instead of a fixed-length std::vector.
...
llvm-svn: 43467
2007-10-29 20:24:00 +00:00
Dan Gohman
d9911e21df
Do a real assert if there is an unhandled vector instruction instead
...
of just printing to cerr.
llvm-svn: 43466
2007-10-29 20:14:29 +00:00
Evan Cheng
e106e2f142
Enable more fold (sext (load x)) -> (sext (truncate (sextload x)))
...
transformation. Previously, it's restricted by ensuring the number of load uses
is one. Now the restriction is loosened up by allowing setcc uses to be
"extended" (e.g. setcc x, c, eq -> setcc sext(x), sext(c), eq).
llvm-svn: 43465
2007-10-29 19:58:20 +00:00
Dan Gohman
1961c28d46
Add explicit keywords.
...
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Dan Gohman
7414e21ec0
Update a comment to reflect the current code.
...
llvm-svn: 43463
2007-10-29 19:32:39 +00:00
Dan Gohman
f5feb01056
Remove an unused function argument.
...
llvm-svn: 43462
2007-10-29 19:31:25 +00:00
Dan Gohman
50d42224d0
Fix a typo in a comment.
...
llvm-svn: 43461
2007-10-29 19:26:14 +00:00
Dan Gohman
8e8adada83
Avoid calling ValidStride when not all uses are addresses.
...
llvm-svn: 43460
2007-10-29 19:23:53 +00:00
Ted Kremenek
ef23e34bba
Fixed warning concerning implicit conversion from a NULL pointer
...
constant to an unsigned int. We now just directly assign the literal 0.
llvm-svn: 43459
2007-10-29 18:43:39 +00:00
Ted Kremenek
a80b257a21
Renamed internal variables of StmtIteratorBase to make the code
...
slightly more succinct.
Introduced VariableArrayType* within StmtIteratorBase to (soon)
support iteration over the size expressions of variable length arrays.
llvm-svn: 43455
2007-10-29 18:04:38 +00:00
Fariborz Jahanian
bc2759372b
Do the encoding of ivar types in the ivar metadata.
...
llvm-svn: 43454
2007-10-29 17:16:25 +00:00
Ted Kremenek
e2763b0948
Added some comments.
...
Moved a dependent predicate in an if statement to be an assertion
within the if statement body.
llvm-svn: 43453
2007-10-29 17:13:39 +00:00
Chris Lattner
00860d7574
update testcase
...
llvm-svn: 43452
2007-10-29 17:06:35 +00:00
Ted Kremenek
5d18ce750a
Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
...
should emit warnings.
llvm-svn: 43451
2007-10-29 17:02:56 +00:00
Ted Kremenek
e451eae8d7
For non-floating point types, added check for expressions of the form
...
"x == x" and "x != x". We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.
Added test case for this check.
llvm-svn: 43450
2007-10-29 16:58:49 +00:00
Devang Patel
d45e055f2c
Insetead of assert() just emit an error message for
...
an unimplemented work and continue.
llvm-svn: 43449
2007-10-29 16:56:27 +00:00
Ted Kremenek
fa907b8168
For floating point equality check, we now ignore parentheses. e.g.:
...
(x) == x is the treated the same as x == x.
llvm-svn: 43448
2007-10-29 16:45:23 +00:00
Ted Kremenek
d4ecc6da67
For checking for floating point comparison using == or !=, we now suppress
...
errors for cases such as "x == x".
Added test case to test this feature.
llvm-svn: 43447
2007-10-29 16:40:01 +00:00
Evan Cheng
7b3f7feaea
Avoid doing something dumb like rewriting using a 64-bit iv in 32-bit mode.
...
llvm-svn: 43446
2007-10-29 07:57:50 +00:00
Anders Carlsson
18acd44514
Address Chris's comments.
...
llvm-svn: 43445
2007-10-29 06:33:42 +00:00
Chris Lattner
909a54ccd4
add a note.
...
llvm-svn: 43444
2007-10-29 06:19:48 +00:00
Anders Carlsson
0f1cacd049
Fix logic error.
...
llvm-svn: 43443
2007-10-29 05:58:43 +00:00
Chris Lattner
c541c3ee15
Model stacksave and stackrestore as both writing memory, since we
...
don't model their dependences on allocas correctly. This fixes
PR1745.
llvm-svn: 43442
2007-10-29 05:47:52 +00:00
Chris Lattner
b104d31bd9
when checking for type equality, ignore typedefs.
...
llvm-svn: 43441
2007-10-29 05:15:40 +00:00
Chris Lattner
5c5808a9a3
improve error recovery handling broken 'then' or 'else' stmts in
...
if statements. This implements Sema/if-empty-body.c:f3, silencing
a bogus secondary warning. It also improve the location info for
the nullstmts created for recovery purposes.
llvm-svn: 43440
2007-10-29 05:08:52 +00:00
Anders Carlsson
d849982e84
Add (partial) support for @encode.
...
llvm-svn: 43439
2007-10-29 05:01:08 +00:00
Owen Anderson
3692dbe492
Add a first attempt at dominator information for MBB's. Use with caution: this has been tested to compile. It has not yet been confirmed to generate correct analysis.
...
llvm-svn: 43438
2007-10-29 04:50:50 +00:00
Chris Lattner
70ae491e42
The callers of ParseStructDeclaration are not expecting it to
...
eat the terminating ;. Fix one place where it did, allowing this
to compile without error:
struct x {
int a;
union {
int b;
float c;
};
int d;
};
This reduces diagnostics on PR1750 from 33 to 27.
llvm-svn: 43437
2007-10-29 04:42:53 +00:00
Chris Lattner
3bc4d20862
casting to void is ok for structs (C99 6.5.4p2), this fixes
...
one bogus error on PR1750.
llvm-svn: 43436
2007-10-29 04:26:44 +00:00
Chris Lattner
cc779571b8
Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
...
PR1750
llvm-svn: 43435
2007-10-29 04:18:06 +00:00
Chris Lattner
645ff3ff61
Fix a parser bug on labeled inline asm stmts, allowing us
...
to parse stuff like:
asm volatile("1: rex64/fxrstor (%[fx])\n\t"
"2:\n"
".section .fixup,\"ax\"\n"
"3: movl $-1,%[err]\n"
" jmp 2b\n"
".previous\n"
".section __ex_table,\"a\"\n"
" .align 8\n"
" .quad 1b,3b\n"
".previous"
: [err] "=r" (err)
: [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));
This reduces # diagnostics on PR1750 from 49 to 37.
llvm-svn: 43434
2007-10-29 04:06:22 +00:00
Chris Lattner
73c56c0735
Implement *skeletal* support for representing GNU inline asm stmts in the AST,
...
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.
llvm-svn: 43433
2007-10-29 04:04:16 +00:00
Chris Lattner
1159f065be
Fix a major bug in the Type::getAs*Type methods: they didn't strip off
...
typeof(type) and typeof(expr) correctly. Now provide a single point of
contact (Type::getDesugaredType) for doing the shallow stripping we need.
llvm-svn: 43432
2007-10-29 03:41:11 +00:00
Chris Lattner
b6fc40e60f
I am not sure this is a good idea to be an option, but rename the option for
...
now. It conflicts with clang's -pedantic flag.
llvm-svn: 43431
2007-10-29 03:14:55 +00:00
Chris Lattner
5e99fd8c0d
Add support for the x86-64 'q' regigster modifier, and add support for the
...
b/h/w/k/q inline asm memory modifiers, which are just ignored. This fixes
PR1748 and CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll
llvm-svn: 43430
2007-10-29 03:09:07 +00:00
Anders Carlsson
ceced4ca73
Generate code for __builtin_classify_type.
...
llvm-svn: 43429
2007-10-29 02:59:40 +00:00
Anders Carlsson
7080597adf
Add BuiltinType::Char_S to Type::isCharType
...
llvm-svn: 43428
2007-10-29 02:52:18 +00:00