Chris Lattner
f6e3669eb2
only update the llvm type for a struct when we used the struct
...
previously in an opaque context. If we didn't do this,
computing its layout could be wasted: just be lazy.
llvm-svn: 46802
2008-02-06 05:12:09 +00:00
Chris Lattner
68be60694e
sink more of the type related code into CodeGenTypes.
...
llvm-svn: 46801
2008-02-06 05:08:19 +00:00
Chris Lattner
8b945ee058
codegen static variables in a function into a different namespace from
...
static variables outside functions.
llvm-svn: 46800
2008-02-06 04:54:32 +00:00
Eli Friedman
d49a720d52
Be a bit stricter about array type compatibility.
...
llvm-svn: 46799
2008-02-06 04:53:22 +00:00
Chris Lattner
a5e4d30942
Finish off the refactoring of type handling stuff. Now we recompile every
...
tag decl after it has been completed
llvm-svn: 46798
2008-02-06 04:51:19 +00:00
Ted Kremenek
73451846a7
Fixed bug in '=' transfer function: RHS does not have to be a non-LValue.
...
llvm-svn: 46797
2008-02-06 04:41:14 +00:00
Ted Kremenek
d17f05435a
Fixed signedness bug in cast transfer function when casting integers to pointers.
...
Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0).
llvm-svn: 46796
2008-02-06 04:31:33 +00:00
Ted Kremenek
b2652827e6
Modified state pretty-printing to include the '!=' and '==' constraints on
...
symbols (for constant integers).
llvm-svn: 46795
2008-02-06 03:56:15 +00:00
Ted Kremenek
0ea8fea0ba
Disabled operator= for ValueStateImpl.
...
ValueState no longer inherits FoldingSetNode (not needed).
Removed redundant operator= implementation for ValueState (it simply did the default behavior).
llvm-svn: 46794
2008-02-06 02:50:36 +00:00
Ted Kremenek
4ff4e7ce9f
Fixed bug when allocating a ValueStateImpl object in getPersistentState()
...
using the bump-pointer allocator and a placed new; we accidentally allocated
a ValueStateImpl* instead, causing an overrun when we did a placed new().
llvm-svn: 46793
2008-02-06 02:45:20 +00:00
Chris Lattner
adf1f51fc5
move the codegen ASTConsumer out of the driver into libcodegen,
...
eliminating a bunch of forwarding methods and generally
simplifying things.
llvm-svn: 46792
2008-02-06 02:01:47 +00:00
Chris Lattner
b5eda6253b
pull .ll and .bc writing out of the ASTConsumer destructors into some top
...
level code in clang. This is a cleanup, but does implement "-o" for
-emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or
"clang < foo.c -emit-llvm" to get the old behavior.
llvm-svn: 46791
2008-02-06 01:42:25 +00:00
Tanya Lattner
182a9fd39f
Throttle the non-local dependence analysis for basic blocks with more than 50 predecessors. Added command line option to play with this threshold.
...
llvm-svn: 46790
2008-02-06 00:54:55 +00:00
Ted Kremenek
03e7b55f22
Added some skeleton code for performing "assume" on symbols: e.g. assume($0 != 0).
...
This action will add constraints to the possible values of a symbol.
Still needs to be debugged.
llvm-svn: 46789
2008-02-06 00:54:14 +00:00
Chris Lattner
622c193a32
inform astconsumer about tagdecls as they are defined.
...
llvm-svn: 46788
2008-02-06 00:51:33 +00:00
Chris Lattner
fe0e0af434
pass the astconsumer into Sema's ctor, clean up some stuff in
...
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.
llvm-svn: 46787
2008-02-06 00:46:58 +00:00
Chris Lattner
8082d870bd
rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}
...
llvm-svn: 46786
2008-02-06 00:23:21 +00:00
Chris Lattner
4afeded499
kill the ASTStreamer class, inlining it into its only client: clang::ParseAST
...
llvm-svn: 46785
2008-02-06 00:15:02 +00:00
Anders Carlsson
3ed4aea198
Even more inline asm codegen fixes.
...
llvm-svn: 46784
2008-02-06 00:11:32 +00:00
Nate Begeman
3399bb424c
simple implementation of __builtin_alloca
...
llvm-svn: 46783
2008-02-06 00:02:50 +00:00
Steve Naroff
2352150043
Add a FIXME to clarify previous commit/experiment.
...
llvm-svn: 46782
2008-02-05 23:59:27 +00:00
Anton Korobeynikov
c107b133ba
Don't dereference an invalid pointer if string is empty.
...
llvm-svn: 46781
2008-02-05 23:34:40 +00:00
Anders Carlsson
487e527fcf
Handle the memory clobber.
...
llvm-svn: 46780
2008-02-05 23:30:20 +00:00
Anders Carlsson
b737b6247f
Improvements to inline asm code generation.
...
llvm-svn: 46779
2008-02-05 23:18:57 +00:00
Ted Kremenek
38b32e976c
Added pretty-printing support for lval::SymIntConstraintVal and
...
nonlval::SymIntConstraintVal.
Reworked transfer function for '==' and '!=' for LValues to return
SymIntConstraintVal when comparing a symbol with a constant.
llvm-svn: 46778
2008-02-05 23:08:41 +00:00
Anders Carlsson
19fe116fc0
Handle simple asm statements correctly.
...
llvm-svn: 46777
2008-02-05 23:03:50 +00:00
Evan Cheng
87fbd66f9f
Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.
...
llvm-svn: 46776
2008-02-05 22:50:29 +00:00
Evan Cheng
0f32916111
Move to getCALLSEQ_END to ensure CALLSEQ_END node produces a flag. This is consistent with the definition in td file.
...
llvm-svn: 46775
2008-02-05 22:44:06 +00:00
Chris Lattner
9413a016f4
simplify some code.
...
llvm-svn: 46774
2008-02-05 22:40:55 +00:00
Ted Kremenek
8f6dcfaa30
Moved implementation of cast<> for SymbolData closer to SymbolData's definition.
...
llvm-svn: 46772
2008-02-05 22:21:54 +00:00
Ted Kremenek
1ee50cd9c1
Added new "NonLValue" class: SymIntConstraintVal. This class represents a binary
...
contraint between a symbol and an integer constant.
llvm-svn: 46771
2008-02-05 22:10:48 +00:00
Ted Kremenek
1e3fa134de
Moved subclasses of LValue and NonLValue into their own namespaces.
...
This noticeably cleans up the naming of these classes.
llvm-svn: 46770
2008-02-05 21:52:21 +00:00
Ted Kremenek
a4aa95bd9d
Added "SymIntConstraint", a utility class to represent intermediate values for
...
transfer function evaluation that represent constraints between symbolic values
and constant integers.
llvm-svn: 46769
2008-02-05 21:32:43 +00:00
Steve Naroff
e6016798bf
Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.
...
This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.
llvm-svn: 46768
2008-02-05 21:27:35 +00:00
Chris Lattner
a838141957
Make RenamePass faster by making the 'is this a new phi node'
...
check more intelligent. This speeds up mem2reg from 5.29s to
0.79s on a synthetic testcase with tons of predecessors and
phi nodes.
llvm-svn: 46767
2008-02-05 21:26:23 +00:00
Anders Carlsson
fcbb11a86f
Add some binops.
...
llvm-svn: 46766
2008-02-05 20:54:21 +00:00
Dale Johannesen
d88f1d060e
Implement sseregparm.
...
llvm-svn: 46764
2008-02-05 20:46:33 +00:00
Evan Cheng
8d78b0597b
If a vr is already marked alive in a bb, then it has PHI uses that are visited earlier, then it is not killed in the def block (i.e. not dead).
...
llvm-svn: 46763
2008-02-05 20:04:18 +00:00
Anders Carlsson
b170d0cf7e
More improvements to inline asm CG.
...
llvm-svn: 46762
2008-02-05 20:01:53 +00:00
Chris Lattner
e115fb5b87
regenerate
...
llvm-svn: 46761
2008-02-05 19:43:53 +00:00
Chris Lattner
42e35d4fcc
Make the check for GCC version more robust, fix shared library
...
dependencies in makefile, and fix llvm_cv_no_link_all_option
on darwin.
Patch by Shantonu Sen, more info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012410.html
llvm-svn: 46760
2008-02-05 19:43:40 +00:00
Ted Kremenek
e1bbf8e549
Added "batch" processing versions of Nodify and SetValue. Created typedefs
...
for buffers for RValues and States.
llvm-svn: 46759
2008-02-05 19:35:18 +00:00
Ted Kremenek
1cc95f6cd3
Added a "ConstantNotEq" map to ValueState (and added necessary typedefs and factory objects to ValueStateManager).
...
llvm-svn: 46758
2008-02-05 18:51:06 +00:00
Ted Kremenek
571e9b409e
Added FoldingSet profiling support to ImmutableSet.
...
llvm-svn: 46757
2008-02-05 18:50:25 +00:00
Ted Kremenek
961ec7bc22
Added some comments.
...
llvm-svn: 46756
2008-02-05 18:24:17 +00:00
Ted Kremenek
db814b5415
Renamed typedef "iterator" in ValueState to "vb_iterator" (for "VariableBindings").
...
llvm-svn: 46755
2008-02-05 18:19:15 +00:00
Ted Kremenek
17e5b5c99e
Reordered fields/methods in ValueState to make it more aesthetically pleasing.
...
llvm-svn: 46754
2008-02-05 18:17:58 +00:00
Ted Kremenek
e96bd56de9
Changed profiling method for ImmutableMap to once again just use its
...
unique ImutAVLTree* for profiling.
Modified ImutAVLTree:
(1) changed ComputeHash() to ComputeDigest() and
(2) changed Profile() to use the computed digest and
(3) modified insertion of IMutAVLTree into the FoldingSet owned by
the ImutAVLTreeFactory object to use profiling instead of computing
a direct hash. This fixes a bug where our abuse of the FoldingSet would
not work when the FoldingSet was resized.
llvm-svn: 46753
2008-02-05 17:30:43 +00:00
Anders Carlsson
063ab86775
Use correct flag value.
...
llvm-svn: 46752
2008-02-05 17:26:36 +00:00
Anders Carlsson
d0cd0d89a0
Append input argument to args vector.
...
llvm-svn: 46751
2008-02-05 16:57:38 +00:00