Commit Graph

39267 Commits

Author SHA1 Message Date
Gordon Henriksen 0c43064daf Fix a partial application typo.
llvm-svn: 45317
2007-12-22 19:41:30 +00:00
Gordon Henriksen 41689b52ab Use getIntrinsicID instead of looking up intrinsic prototypes. Also
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)

llvm-svn: 45316
2007-12-22 17:27:01 +00:00
Anton Korobeynikov eed7c0b9f7 Unbreak build on gcc 3.x
llvm-svn: 45315
2007-12-22 14:27:49 +00:00
Anton Korobeynikov 2ffb2c9e59 Unbreak mingw build
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Evan Cheng 345a00ba05 Preliminary PIC JIT support for X86 (32-bit) / Darwin.
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Evan Cheng db33a0211b Oops.
llvm-svn: 45312
2007-12-22 09:14:34 +00:00
Chris Lattner 74b2ab59fd implement InstCombine/shift-trunc-shift.ll. This allows
us to compile:
#include <math.h>
int t1(double d) { return signbit(d); }

into:

_t1:
	movd	%xmm0, %rax
	shrq	$63, %rax
	ret

instead of:

_t1:
	movd	%xmm0, %rax
	shrq	$32, %rax
	shrl	$31, %eax
	ret

on x86-64.

llvm-svn: 45311
2007-12-22 09:07:47 +00:00
Owen Anderson 5a4c05d047 Note what still needs doing.
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson 4534100765 Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
llvm-svn: 45309
2007-12-22 04:50:11 +00:00
Gordon Henriksen 1621129e6b Ignoring generated files.
llvm-svn: 45308
2007-12-22 04:44:11 +00:00
Evan Cheng f4f52dbc8c Fix JIT code emission of X86::MovePCtoStack.
llvm-svn: 45307
2007-12-22 02:26:46 +00:00
Ted Kremenek dbc5385608 Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.

llvm-svn: 45306
2007-12-22 01:43:37 +00:00
Devang Patel 7a2c66b11e If succ has succ itself as one of the predecessors then do
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.

llvm-svn: 45305
2007-12-22 01:32:53 +00:00
Evan Cheng ac134551c6 Allow JIT with non-static relocation model.
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Fariborz Jahanian 4f41b272c9 Another test case, testing a variety of objective-c type comparisons.
llvm-svn: 45302
2007-12-22 00:17:49 +00:00
Fariborz Jahanian 24e1a0bd35 Another test for objective-c's type comparison.
llvm-svn: 45301
2007-12-21 23:48:59 +00:00
Anton Korobeynikov 1e8c1308bb Fix silly typo in the FP CEP handling.
llvm-svn: 45300
2007-12-21 23:33:44 +00:00
Ted Kremenek e7e26cd01e Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.

llvm-svn: 45299
2007-12-21 23:23:12 +00:00
Ted Kremenek e1d1a9479f Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.

llvm-svn: 45298
2007-12-21 23:21:58 +00:00
Ted Kremenek 908cff9fa4 Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).

llvm-svn: 45297
2007-12-21 22:57:10 +00:00
Ted Kremenek 95416706ed SimulVertex now subclasses FoldingSetNode.
llvm-svn: 45296
2007-12-21 22:41:58 +00:00
Ted Kremenek 1616945a7d Added Profile method to SimulVertex.
llvm-svn: 45295
2007-12-21 22:40:41 +00:00
Fariborz Jahanian a7c705ddca This patch implements some of the more obscure type-checking involving
'id' quallified with protocols and static types which have categories and
inheritance which implement these protocols.

llvm-svn: 45294
2007-12-21 22:22:33 +00:00
Ted Kremenek fda0aaf01b Updated Xcode project to be in sync with recent changes in file locations
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev)

llvm-svn: 45293
2007-12-21 21:48:31 +00:00
Ted Kremenek bf593f81fa Directory restructing of Analysis files.
Created include/clang/Analysis/Analyses directory.
  - Moved LiveVariables.h and UninitializedValues.h into this dir.
  
Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.

llvm-svn: 45292
2007-12-21 21:42:19 +00:00
Ted Kremenek f55ed782b4 Renamed file AnalysisVertex.h to SimulVertex.h
llvm-svn: 45291
2007-12-21 21:17:22 +00:00
Ted Kremenek 3d8b0d6948 Renamed class AnalysisVertex to SimulVertex
llvm-svn: 45290
2007-12-21 21:16:58 +00:00
Duncan Sands 85f26f28b9 Fix a brain fart by our beloved leader (the content
of this patch is the last line).

llvm-svn: 45289
2007-12-21 20:18:41 +00:00
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