Commit Graph

39289 Commits

Author SHA1 Message Date
Ted Kremenek 93e2031187 Fixed successor order for CFG basic blocks when handling: x && y. The bug
is best explained by illustration:

[ B2 ]
     1: x
     T: [B2.1] && ...
   Predecessors (1): B4
   Successors (2): B3 B1

Block "B3" should be the block where we evaluate "y" when "x" evaluates to
true. Previously we had the successor list reversed. Now this behavior matches
with how we handle other conditional branches.

Thanks to Nuno Lopes for reporting this problem.

llvm-svn: 45288
2007-12-21 19:49:00 +00:00
Devang Patel 505b4f1fd4 Convert opaque type when struct definition is seen.
llvm-svn: 45287
2007-12-21 19:35:28 +00:00
Duncan Sands 8c5822802e Get the verifier to check attributes on calls as well
as on functions.  Make it verify invokes and not just
ordinary calls.  As a (desired) side-effect, it is no
longer legal to have call attributes on arguments that
are being passed to the varargs part of a varargs
function (llvm-as drops them on the floor anyway).

llvm-svn: 45286
2007-12-21 19:19:01 +00:00
Duncan Sands 6a7703ed63 Make DAE not wipe out attributes on calls, and not drop
return attributes on the floor.  In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped.  I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).

llvm-svn: 45285
2007-12-21 19:16:16 +00:00
Devang Patel 016e41e8a6 Keep track of llvm struct size while adding fields.
Update addPaddingFields() interface.

llvm-svn: 45284
2007-12-21 18:43:53 +00:00
Fariborz Jahanian 56b5c96ef7 Patch to compare to objective-c static types where one or the other
(but not both) may be a protocol qualified static type.

llvm-svn: 45283
2007-12-21 17:34:43 +00:00
Nicolas Geoffray 31a2c3948e Fix unintented change from last commit
llvm-svn: 45282
2007-12-21 12:22:29 +00:00
Nicolas Geoffray 80c741e160 Enable EH for linux/ppc32 targets
llvm-svn: 45281
2007-12-21 12:19:44 +00:00
Evan Cheng 78c460c8c4 New entry.
llvm-svn: 45280
2007-12-21 01:31:58 +00:00
Evan Cheng b54038fc29 Add a few more missing gcc builtin's.
llvm-svn: 45278
2007-12-21 01:30:39 +00:00
Fariborz Jahanian fd6f3a2460 Test case for my last patch.
llvm-svn: 45277
2007-12-21 00:35:35 +00:00
Fariborz Jahanian ff7d2bf255 More objective-c type analysis. This time involving objective types
of conforming protocols (or not).

llvm-svn: 45276
2007-12-21 00:33:59 +00:00
Ted Kremenek 1cf6c7aa5b Removed scoped_ptr, as its functionality is subsumed by OwningPtr.
llvm-svn: 45274
2007-12-21 00:15:29 +00:00
Ted Kremenek b149889df6 Added class "StateVariant", a template class which serves to wrap states that
are generated by transfer functions used by the path-sensitive dataflow solver.

llvm-svn: 45273
2007-12-21 00:04:19 +00:00
Ted Kremenek f40d2740b6 Added initial implementation of "AnalysisVertex", a class to represent a
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.

llvm-svn: 45272
2007-12-20 23:24:55 +00:00
Fariborz Jahanian 76fcf32632 Another test for objective-c type comparison.
llvm-svn: 45271
2007-12-20 22:53:29 +00:00
Fariborz Jahanian 4368af07a7 More objective-c type checking. This time comparing objective-c known objects.
llvm-svn: 45269
2007-12-20 22:37:58 +00:00
Evan Cheng 01c7c198ee Fix JIT encoding for CMPSD as well.
llvm-svn: 45268
2007-12-20 19:57:09 +00:00
Ted Kremenek 5e2413384e Added OwningArrayPtr smart pointer class to provide an analogous class to
OwningPtr except that it works for pointers to arrays.

llvm-svn: 45266
2007-12-20 19:53:47 +00:00
Ted Kremenek 71d643f8b1 Converted uses of scoped_ptr to OwningPtr.
llvm-svn: 45265
2007-12-20 19:47:16 +00:00
Fariborz Jahanian 63b19f1b6e Patch to do type-checking for objctive-c's object types.
More is yet to come.

llvm-svn: 45263
2007-12-20 19:24:10 +00:00
Chris Lattner 1991794112 add accessor.
llvm-svn: 45262
2007-12-20 19:14:21 +00:00
Chris Lattner 63fbcdf6ca add new smart pointer for clang.
llvm-svn: 45261
2007-12-20 19:14:02 +00:00
Evan Cheng c226ed0273 Type specification didn't match gcc's.
llvm-svn: 45260
2007-12-20 09:35:28 +00:00
Evan Cheng f989141d30 More accurate checks for two-address constraints.
llvm-svn: 45259
2007-12-20 09:25:31 +00:00
Seo Sanghyeon 58bdfda87c Add newline
llvm-svn: 45257
2007-12-20 07:22:20 +00:00
Christopher Lamb 7d82bc46b8 Implement review feedback, including additional transforms
(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.

llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Chris Lattner e2cf5b8c5c Add m_Zero().
llvm-svn: 45255
2007-12-20 04:47:44 +00:00
Evan Cheng ddc9af11f0 Remove xfail. This is fixed.
llvm-svn: 45254
2007-12-20 02:25:21 +00:00
Evan Cheng a509537e25 The physical register + virtual register joining requirement was much too strict.
llvm-svn: 45253
2007-12-20 02:23:25 +00:00
Evan Cheng 61bc51ee97 Bring back a burr scheduling heuristic that's still needed.
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng 26ee54eb05 Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.
llvm-svn: 45251
2007-12-20 02:20:53 +00:00
Chris Lattner 16a51da0e2 simplify this code with the new m_Zero() pattern. Make sure the select only
has a single use, and generalize it to not require N to be a constant.

llvm-svn: 45250
2007-12-20 01:56:58 +00:00
Devang Patel c006744c38 Revert my previous check-in.
llvm-svn: 45249
2007-12-20 01:46:01 +00:00
Chris Lattner 8304df9024 Fix trivial self-infinite-recursion
llvm-svn: 45248
2007-12-20 01:38:17 +00:00
Anton Korobeynikov dce44d87f8 More eye-candy stuff :)
llvm-svn: 45247
2007-12-20 01:30:27 +00:00
Anton Korobeynikov 5ab614824d Add iterators for child traversal.
llvm-svn: 45246
2007-12-20 01:21:50 +00:00
Bill Wendling 65c001e6bc Updated comments to reflect what "side effects" means in this situation.
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Fariborz Jahanian 134cbefba2 More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.

llvm-svn: 45244
2007-12-20 01:06:58 +00:00
Chris Lattner 6c9ffe9529 Implement codegen for ordered comparison builtins.
llvm-svn: 45243
2007-12-20 00:44:32 +00:00
Scott Michel 5f1470f03a More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads

llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Ted Kremenek 371efafb94 Created initial implementation of "BuildSerializer", and ASTConsumer
which serializes ASTs to a common output directory.  This ASTConsumer
is invoked using a combination of "-o" and "-serialize" from the driver.

llvm-svn: 45241
2007-12-20 00:34:58 +00:00
Ted Kremenek 62c462f9c5 Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"
llvm-svn: 45240
2007-12-20 00:29:44 +00:00
Chris Lattner 2da14fb84f implement semantic analysis for __builtin_islessequal and friends.
llvm-svn: 45239
2007-12-20 00:26:33 +00:00
Devang Patel 6d279d484a Add lto version check mechanism.
llvm-svn: 45238
2007-12-20 00:24:01 +00:00
Ted Kremenek 8babe3d9c4 Added method getFileEntryForID() to SourceManager.
llvm-svn: 45237
2007-12-20 00:15:17 +00:00
Gordon Henriksen 59db63d5fc Use a module to group calling convention values, too.
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Chris Lattner e202e6af48 simplify some code.
llvm-svn: 45235
2007-12-20 00:05:45 +00:00
Chris Lattner 43be2e6004 refactor some code that handles sema of direct function calls.
llvm-svn: 45234
2007-12-19 23:59:04 +00:00
Chris Lattner 9b65d3506e Add iterator interface to function/method parameters.
llvm-svn: 45233
2007-12-19 23:58:25 +00:00