Nick Lewycky
eae7e7d00b
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Evan Cheng
8010320365
Enable if-conversion for ARM by default.
...
llvm-svn: 42156
2007-09-20 00:48:22 +00:00
Dale Johannesen
7d67e547b5
More long double fixes. x86_64 should build now.
...
llvm-svn: 42155
2007-09-19 23:55:34 +00:00
Evan Cheng
d0e360e16e
Avoid referencing deleted instruction.
...
llvm-svn: 42153
2007-09-19 21:48:07 +00:00
Ted Kremenek
66d130a584
Added support to clang driver to view ASTs using GraphViz. This
...
functionality is still preliminary.
llvm-svn: 42152
2007-09-19 21:29:43 +00:00
Ted Kremenek
ebc5500e50
Previously GraphWriter assumed operator*() for node_iterator always
...
returned a reference type. This patch allows operator*() to return a
non-reference type while still maintaining the old behavior when it
does return a reference type.
This patch was motivated when I tried to use "df_iterator" (see
llvm/ADT/DepthFirstIterator.h) as a "node_iterator", as df_iterator
does not return a reference type and thus we would get a compilation
error when trying to take the address of a temporary.
llvm-svn: 42151
2007-09-19 21:26:49 +00:00
Ted Kremenek
a8f4ef5846
Moved GraphTraits<Stmt*> to StmtGraphTraits.h. This allows consumers of Stmt.h not to have to pay the cost
...
of parsing the GraphTraits templates if they don't need that functionality.
Defined nodes_iterator for GraphTraits<Stmt*> to be based on llvm::df_iterator.
llvm-svn: 42150
2007-09-19 21:21:39 +00:00
Devang Patel
464276f831
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00
Fariborz Jahanian
62fd2b4730
Patch to parse objective-c's @try-statement and @throw-statement.
...
llvm-svn: 42148
2007-09-19 19:14:32 +00:00
Evan Cheng
513874cf3c
PSHUFDmi, etc. are actually folding a load, not a store.
...
llvm-svn: 42147
2007-09-19 19:02:47 +00:00
Ted Kremenek
a3d706a778
Added GraphTraits template specialization for Stmt* to treat ASTs like graphs.
...
llvm-svn: 42146
2007-09-19 18:18:40 +00:00
Ted Kremenek
ec55ce39a6
More refactoring: decl and expr regisitration now uses CFGRecStmtDeclVisitor.
...
llvm-svn: 42145
2007-09-19 18:00:03 +00:00
Ted Kremenek
5885a5b417
Added two new visitors that extend CFGStmtVisitor: CFGRecStmtVisitor and CFGRecStmtDeclVisitor.
...
The extended functionality of these visitors is that they automatically visit all statements in
an AST (no explicit recursion is required from subclasses), and the for the latter, decls are visited
as well.
llvm-svn: 42144
2007-09-19 17:59:28 +00:00
Dale Johannesen
b59d25fe54
Fix longdouble -> uint conversion.
...
llvm-svn: 42143
2007-09-19 17:53:26 +00:00
Chris Lattner
d79f3d51b1
reject things like "declare internal @foo"
...
llvm-svn: 42140
2007-09-19 17:14:45 +00:00
Steve Naroff
2cd263ff71
Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.
...
Rationale:
We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).
It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:
Two tables:
*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824
One table:
*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316
llvm-svn: 42139
2007-09-19 16:18:46 +00:00
Owen Anderson
c201cbc802
Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
...
help non-local memdep caching.
llvm-svn: 42137
2007-09-19 16:13:57 +00:00
Dale Johannesen
f4bad97ea0
Fix some long double issues.
...
llvm-svn: 42133
2007-09-19 14:22:58 +00:00
Duncan Sands
d31649bc59
Improve comment.
...
llvm-svn: 42132
2007-09-19 10:25:38 +00:00
Duncan Sands
a38e527523
Partial fix for PR1678: correct some parts of constant
...
fold that were missed in the fix for PR1646. Probably
this null/not-null logic should be factorized somewhere.
llvm-svn: 42131
2007-09-19 10:16:17 +00:00
Duncan Sands
56df7dec2b
A global variable with external weak linkage can be null, while
...
an alias could alias such a global variable.
llvm-svn: 42130
2007-09-19 10:10:31 +00:00
Gabor Greif
ef858c9ff6
include alloca.h if available. this helps Solaris, but intnat and uintnat types are still undefined, causing errors
...
llvm-svn: 42129
2007-09-19 09:29:58 +00:00
Duncan Sands
4e426623f5
Testcase for PR1678.
...
llvm-svn: 42128
2007-09-19 07:43:17 +00:00
Steve Naroff
59155be0b2
Remove #include of config.h, it is no longer needed.
...
llvm-svn: 42126
2007-09-19 03:01:22 +00:00
Evan Cheng
0effc3a6b8
Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
...
in tracking physical register output dependencies.
llvm-svn: 42125
2007-09-19 01:38:40 +00:00
Evan Cheng
17f589f76e
Set CCR (EFLAGS) copy cost to -1, i.e. extremely expensive to copy.
...
llvm-svn: 42124
2007-09-19 01:36:39 +00:00
Evan Cheng
f73fb6261b
Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
...
between two registers in the specific class.
llvm-svn: 42123
2007-09-19 01:35:01 +00:00
Devang Patel
69a55a38ed
Relax loop ExitCondition predicate restriction.
...
llvm-svn: 42122
2007-09-19 00:28:47 +00:00
Devang Patel
455a53b7db
Filter loops where split condition's false branch is not empty. For example
...
for (int i = 0; i < N; ++i) {
if (i == somevalue)
dosomething();
else
dosomethingelse();
}
llvm-svn: 42121
2007-09-19 00:15:16 +00:00
Devang Patel
4c238c451f
Bail out early, before modifying anything.
...
llvm-svn: 42120
2007-09-19 00:11:01 +00:00
Devang Patel
31f2c8592c
Work is incomplete. Loop is not modified at all right now.
...
llvm-svn: 42119
2007-09-19 00:08:13 +00:00
Devang Patel
ee35011d01
ooops...
...
llvm-svn: 42118
2007-09-18 23:58:14 +00:00
Steve Naroff
467e619a65
Remove alloca import...
...
llvm-svn: 42117
2007-09-18 23:56:42 +00:00
Steve Naroff
d54978ba8b
Progress on message expressions...
...
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.
Next step, installing a correct type, among other tweaks...
llvm-svn: 42116
2007-09-18 23:55:05 +00:00
Ted Kremenek
fb9ea52a13
DataflowSolver now acccepts an "_Equal" template parameter that allows the user
...
to specify how two dataflow values should be compared for equality. The default
is to use std::equal_to.
llvm-svn: 42115
2007-09-18 23:40:51 +00:00
Ted Kremenek
d51126b97e
Fixed bug where getBitRef would incorrectly grab the bit from the
...
wrong bitvector.
llvm-svn: 42114
2007-09-18 23:30:45 +00:00
Ted Kremenek
9427b0e23b
Changed solver to use "==" operator when comparing dataflow values
...
rather than a special "equal" method defined in the class for the
value.
llvm-svn: 42113
2007-09-18 23:30:21 +00:00
Evan Cheng
e7ff9da64b
Clean up.
...
llvm-svn: 42112
2007-09-18 22:56:31 +00:00
Evan Cheng
e2e8f2d96b
Fix a bogus splat xform:
...
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>
llvm-svn: 42111
2007-09-18 21:54:37 +00:00
Ted Kremenek
8d4dcc5409
Minor performance fix in transfer function logic. Previously we
...
called VisitStmt, but VisitChildren is more direct and creates less
boilerplate logic.
llvm-svn: 42110
2007-09-18 21:47:41 +00:00
Ted Kremenek
271161078b
More refactoring and code reduction.
...
llvm-svn: 42109
2007-09-18 21:43:18 +00:00
Gabor Greif
49122edc98
rename test, it is obviously misspelled
...
llvm-svn: 42108
2007-09-18 21:42:39 +00:00
Ted Kremenek
b1361eaaa7
Add overloaded versions of DataflowSolver::runOnBlock to simplify
...
invocation of the solver.
UninitializedValues checker now uses CFG::runOnAllBlocks to query the
computed dataflow values (tighter code).
llvm-svn: 42107
2007-09-18 21:08:21 +00:00
Ted Kremenek
360c3b4abb
Added member template CFG::VisitBlockStmts to provide a succinct way
...
of visiting all block-level statements in a CFG.
Tightened implementation of UninitializedValues.
llvm-svn: 42106
2007-09-18 20:59:00 +00:00
Ted Kremenek
2bde624474
Additional comments and cosmetic cleanups.
...
llvm-svn: 42105
2007-09-18 20:44:03 +00:00
Fariborz Jahanian
867a7eb5cb
Patch for object creation and handling of category declarations.
...
llvm-svn: 42104
2007-09-18 20:26:58 +00:00
Dale Johannesen
af12b57405
Prevent crash on long double.
...
llvm-svn: 42103
2007-09-18 18:36:59 +00:00
Ted Kremenek
df9a2a9f8b
Moved TransferFunction object within DataflowSolver to be a instance
...
variable instead of a temporary.
llvm-svn: 42102
2007-09-18 18:17:19 +00:00
Gordon Henriksen
dc88c06732
Tests of the ocaml (and thus C) bindings for constants.
...
llvm-svn: 42101
2007-09-18 18:07:51 +00:00
Ted Kremenek
584e21a349
Modified DataFlowValues and DataflowSolver to associate dataflow value
...
with CFG *edges* instead of blocks. This will fascilitate dataflow
analyses that are sensitive to block terminators, and also simplifies
some reasoning.
Updated UninitializedValues to comply to this new interface.
llvm-svn: 42099
2007-09-18 18:02:44 +00:00