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
Chris Lattner
9a641510bd
Fix PR1749 and InstCombine/2007-10-28-EmptyField.ll by handling
...
zero-length fields better.
llvm-svn: 43427
2007-10-29 02:40:02 +00:00
Chris Lattner
4a15e04aee
Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators
...
can have uses too. Wouldn't it be nice if invoke didn't exist? :)
llvm-svn: 43426
2007-10-29 02:30:37 +00:00
Ted Kremenek
8be9bc64ce
Fixed assertion in Deserializer::~Deserializer that checks for
...
pointers that were not backpatched (previously checked the wrong invariant).
llvm-svn: 43425
2007-10-28 23:38:38 +00:00
Anton Korobeynikov
9dced3f9ae
Add 'pedantic' mode to verifier rejecting syntactically valid, but 'bad' due to other reasons code
...
llvm-svn: 43424
2007-10-28 22:50:32 +00:00
Ted Kremenek
b6fafb6bf0
Implemented serialization for TypedefType.
...
llvm-svn: 43423
2007-10-28 21:21:04 +00:00
Ted Kremenek
387204749b
Updated backpatching logic during object deserialization to perform
...
eager backpatching instead of waithing until all objects have been
deserialized. This allows us to reduce the memory footprint needed
for backpatching.
llvm-svn: 43422
2007-10-28 21:17:59 +00:00
Duncan Sands
1826deda68
The guaranteed alignment of ptr+offset is only the minimum of
...
of offset and the alignment of ptr if these are both powers of
2. While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is. For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8. Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places. Since I'm on x86 I'm
not very motivated to do this myself...
llvm-svn: 43421
2007-10-28 12:59:45 +00:00
Evan Cheng
c826ac533b
New entry.
...
llvm-svn: 43420
2007-10-28 04:01:09 +00:00
Ted Kremenek
3fd831fd14
Implemented serialization of FunctionTypeProto.
...
llvm-svn: 43419
2007-10-28 00:59:26 +00:00
Ted Kremenek
d33b4adaed
Implemented serialization of FunctionTypeNoProto.
...
llvm-svn: 43418
2007-10-27 19:58:08 +00:00
Ted Kremenek
3e6c227f97
Implemented serialization for VectorType.
...
llvm-svn: 43417
2007-10-27 19:05:09 +00:00
Ted Kremenek
8e8bf5d0bf
More work on type serialization: added support for serializing BuiltinTypes.
...
llvm-svn: 43414
2007-10-26 23:52:52 +00:00
Ted Kremenek
9dd1e702fa
Fixed bug where default SerializeTrait<>::Materialize would not return the materialized object pointer.
...
llvm-svn: 43413
2007-10-26 23:44:59 +00:00