Ted Kremenek
3d55c84c99
Added "InfeasibleEdge" to represent an infeasible state transition.
...
llvm-svn: 45802
2008-01-10 00:58:25 +00:00
Owen Anderson
51b8e20ccf
Add more comments explaining the basics of how the decision of when to rename and when to insert
...
copies is made.
llvm-svn: 45799
2008-01-10 00:47:01 +00:00
Evan Cheng
fead113fe0
Do not use the stack pointer directly, issue a copyfromreg instead. Otherwise we can end up with something like ADD32ri %esp, x which two-address pass won't like.
...
llvm-svn: 45798
2008-01-10 00:37:26 +00:00
Owen Anderson
8958a78576
Get rid of the isKillInst predicate. LiveVariables already provides this information.
...
llvm-svn: 45797
2008-01-10 00:33:11 +00:00
Chris Lattner
ec79bba97f
Fix PR1845 and rdar://5676945. Generic vectors smaller
...
than hardware supported type will be scalarized, so we
can infer their alignment from that info.
We now codegen pr1845 into:
_boolVectorSelect:
lbz r2, 0(r3)
stb r2, -16(r1)
blr
llvm-svn: 45796
2008-01-10 00:30:57 +00:00
Chris Lattner
e34d7d0e24
new testcase for PR1845
...
llvm-svn: 45795
2008-01-10 00:30:38 +00:00
Fariborz Jahanian
db701b47d2
Pass rewritten output to 'clang' for verification.
...
llvm-svn: 45794
2008-01-10 00:30:24 +00:00
Fariborz Jahanian
82ae0152a7
Allow messaging expression as foreach's collection expression.
...
llvm-svn: 45793
2008-01-10 00:24:29 +00:00
Evan Cheng
73d1017871
Remove comments that do not correspond to anything after recent refactoring.
...
llvm-svn: 45792
2008-01-10 00:09:10 +00:00
Owen Anderson
1c8152ba03
Copies need to be inserted before the first terminator, not at the end of the block.
...
llvm-svn: 45791
2008-01-10 00:01:41 +00:00
Steve Naroff
a385fb8c2e
Add a FIXME to commit r45784. Thanks mrs!
...
llvm-svn: 45790
2008-01-09 23:44:05 +00:00
Steve Naroff
e6b0ec8b5e
Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs).
...
llvm-svn: 45789
2008-01-09 23:34:55 +00:00
Ted Kremenek
24ea11d4e0
Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImpl
...
so that nodes can be marked as representing an infeasible program point. This
flag lets the path-sensitive solver know that no successors should be generated
for such nodes.
llvm-svn: 45788
2008-01-09 23:11:36 +00:00
Evan Cheng
0e400d4cb7
Special copy SUnit's do not have SDNode's.
...
llvm-svn: 45787
2008-01-09 23:01:55 +00:00
Ted Kremenek
84ab850e46
Renamed Stmt***Edge and ***StmtEdge (where *** = "Stmt" or "Blk") classes to
...
BExpr*** and ***BExpr respectively. These edges represent program locations
between the entrance/exit of a block and Block-level Expressions.
Also added ***SExpr and SExpr*** ProgramEdges to represent the locations in the
program between the evaluation of subexpressions and block-level expressions.
llvm-svn: 45786
2008-01-09 22:52:38 +00:00
Ted Kremenek
fed4cce0cc
Removed some files related to the path-sensitive solver as part of some
...
code restructuring. (new files will be introduced shortly)
llvm-svn: 45785
2008-01-09 22:49:37 +00:00
Steve Naroff
c6edcbdb5d
Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 6.7.2.2p4).
...
Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible...
llvm-svn: 45784
2008-01-09 22:43:08 +00:00
Owen Anderson
436db42a3c
Clean up StrongPHIElimination a bit, and add some more comments to the internal structures. There's
...
still more work to do on this front.
llvm-svn: 45783
2008-01-09 22:40:54 +00:00
Steve Naroff
08ddb8c55c
Teach Sema::ActOnCompoundLiteral about constraint C99 6.5.2.5p3.
...
llvm-svn: 45782
2008-01-09 20:58:06 +00:00
Duncan Sands
48f22f0b80
Fix compile failures with g++-4.3.
...
llvm-svn: 45781
2008-01-09 19:42:09 +00:00
Chris Lattner
204e4a27b6
many cleanups and fixed, contributed by Sam Bishop
...
llvm-svn: 45780
2008-01-09 19:28:50 +00:00
Chris Lattner
119d81a4f4
Fix isIntegerConstantExpr to compare against zero for casts to bool instead of
...
truncating. This allows us to compile:
void foo() {
static _Bool foo = 4;
}
into:
@foo1 = internal global i8 1
instead of:
@foo1 = internal global i8 4
llvm-svn: 45779
2008-01-09 18:59:34 +00:00
Chris Lattner
41a1ef0dfe
implement proper support for _Bool in memory, which is usually i8, not i1.
...
This fixes a crash reported by Seo Sanghyeon
llvm-svn: 45778
2008-01-09 18:47:25 +00:00
Fariborz Jahanian
6fa7516bc9
Type-cast RHS of assignment to prevent warning compiling rewritten foreach code.
...
llvm-svn: 45777
2008-01-09 18:15:42 +00:00
Fariborz Jahanian
22f2347791
Fixed a bug whereby a parethesized collection expression was not being rewritten correctly.
...
llvm-svn: 45776
2008-01-09 17:50:00 +00:00
Owen Anderson
4de0c3978d
StrongPHIElim: Now with even fewer trivial bugs!
...
llvm-svn: 45775
2008-01-09 10:41:39 +00:00
Owen Anderson
77c3fe441b
Fix an infinite recursion bug in InsertCopies.
...
llvm-svn: 45774
2008-01-09 10:32:30 +00:00
Owen Anderson
e0fd9bd35a
Fix some simple bugs. StrongPHIElimination now does not crash on 164.gzip.
...
llvm-svn: 45773
2008-01-09 06:19:05 +00:00
Evan Cheng
a31824a08e
Fix sse2.psrl.w and sse2.psrl.q definitions.
...
llvm-svn: 45772
2008-01-09 02:16:44 +00:00
Fariborz Jahanian
b7e7ee9ff3
Typo fixed.
...
llvm-svn: 45771
2008-01-09 01:25:54 +00:00
Chris Lattner
7ff4a8bf3f
Fix llvm-ld -Xlinker, patch by Daniel Teske!
...
llvm-svn: 45770
2008-01-09 01:01:17 +00:00
Fariborz Jahanian
05d2876ec3
Another test case for testing rewriteing of nested foreach-statement.
...
llvm-svn: 45769
2008-01-09 00:47:02 +00:00
Chris Lattner
9129f51f9b
add a testcase
...
llvm-svn: 45768
2008-01-09 00:37:18 +00:00
Fariborz Jahanian
a305a5609e
Remove dependency on objc.h
...
llvm-svn: 45767
2008-01-09 00:33:05 +00:00
Chris Lattner
45e5032b1d
add a note
...
llvm-svn: 45766
2008-01-09 00:17:57 +00:00
Steve Naroff
66a26044f8
Teach Expr::isConstantExpr() about CompoundLiterals.
...
llvm-svn: 45764
2008-01-09 00:05:37 +00:00
Chris Lattner
82bebb2432
Fix a typo, patch by Mike Stump!
...
llvm-svn: 45763
2008-01-09 00:00:15 +00:00
Chris Lattner
51b01bf8a5
Make load->store deletion a bit smarter. This allows us to compile this:
...
void test(long long *P) { *P ^= 1; }
into just:
_test:
movl 4(%esp), %eax
xorl $1, (%eax)
ret
instead of code like this:
_test:
movl 4(%esp), %ecx
xorl $1, (%ecx)
movl 4(%ecx), %edx
movl %edx, 4(%ecx)
ret
llvm-svn: 45762
2008-01-08 23:08:06 +00:00
Fariborz Jahanian
965a8961c7
Patch to rewrite ObjC2's foreach-stmt.
...
llvm-svn: 45760
2008-01-08 22:06:28 +00:00
Owen Anderson
1b0d5c747e
Rename registers that do not need copies.
...
llvm-svn: 45759
2008-01-08 21:54:52 +00:00
Duncan Sands
7b1460cca4
Crashes llc when using Chris's new legalization logic.
...
llvm-svn: 45758
2008-01-08 21:51:53 +00:00
Ted Kremenek
a0a2881b1e
Added "getRoot()" to ImmutableMap.
...
Made the ctor for ImmutableMap to construct a map from an AVL tree public.
llvm-svn: 45756
2008-01-08 21:05:59 +00:00
Ted Kremenek
9b0f70bb85
Fixed 80 col. violation.
...
llvm-svn: 45752
2008-01-08 19:38:55 +00:00
Ted Kremenek
96b1ce4f0a
Added VISIBILITY_HIDDEN to classes/structs in anonymous namespaces.
...
llvm-svn: 45750
2008-01-08 18:19:08 +00:00
Ted Kremenek
83ebcef8ae
Added VISIBILITY_HIDDEN to classes/structs in anonymous namespace.
...
llvm-svn: 45749
2008-01-08 18:15:10 +00:00
Chris Lattner
07fde9bde1
add a mayLoad property for machine instructions, a correlary to mayStore.
...
This is currently not set by anything.
llvm-svn: 45748
2008-01-08 18:05:21 +00:00
Ted Kremenek
7e41c29a86
Added most of the boilerplate to the driver needed to run the graph-reachability
...
constant propagation analysis.
llvm-svn: 45747
2008-01-08 18:04:06 +00:00
Duncan Sands
bb956ca730
Use size_t to store Pos, avoid truncating value
...
on 64-bit builds. Analysis and original patch
by Török Edwin. Code audit found another place
with the same problem, also fixed here.
llvm-svn: 45746
2008-01-08 10:06:15 +00:00
Chris Lattner
2940c5c56d
Implement PR1795, an instcombine hack for forming GEPs with integer pointer arithmetic.
...
llvm-svn: 45745
2008-01-08 07:23:51 +00:00
Chris Lattner
ff71ec4dfb
add match support for casts.
...
llvm-svn: 45744
2008-01-08 07:02:44 +00:00