Commit Graph

43628 Commits

Author SHA1 Message Date
Chris Lattner 47fed61526 Fix various DOUTs to not call the extremely expensive Value::getName()
method.  DOUT statements are disabled when assertions are off, but the
side effects of getName() are still evaluated.  Just call getNameSTart,
which is close enough and doesn't cause heap traffic.

llvm-svn: 50958
2008-05-11 01:55:59 +00:00
Chris Lattner 82146fa267 Simplify code by using SwitchInst::findCaseValue instead of reimplementing it.
llvm-svn: 50957
2008-05-10 23:56:54 +00:00
Bill Wendling 9fbd6e7e8c Remove warnings when using -Wshorten-64-to-32.
llvm-svn: 50952
2008-05-10 19:59:59 +00:00
Duncan Sands 8111b67ca8 Testcase for PR2303.
llvm-svn: 50951
2008-05-10 16:43:10 +00:00
Anton Korobeynikov acbdaa2406 Fix linking of internal aliases
llvm-svn: 50950
2008-05-10 14:41:43 +00:00
Bill Wendling 7385b08d34 Prevent -W64-to-32-shortened warnings.
llvm-svn: 50947
2008-05-10 11:26:52 +00:00
Bill Wendling a6c46c2f21 Prevent warnings from the -Wshorten-64-to-32 flag.
llvm-svn: 50946
2008-05-10 10:58:07 +00:00
Nuno Lopes de9746cd45 fix free/delete mismatch problem in add/mergeProperties (found by valgrind)
llvm-svn: 50945
2008-05-10 10:31:54 +00:00
Gabor Greif a1f949a2df remove commented-out code, it is subsumed by DECLARE_TRANSPARENT_OPERAND_ACCESSORS
llvm-svn: 50944
2008-05-10 09:36:58 +00:00
Gabor Greif f6caff66a1 merge of use-diet branch to trunk
llvm-svn: 50943
2008-05-10 08:32:32 +00:00
Owen Anderson 18709fef4a Re-enable loop deletion by default.
llvm-svn: 50941
2008-05-10 07:10:24 +00:00
Evan Cheng 71b9afb053 When transforming a vector_shuffle to a load, the base address must not be an undef.
llvm-svn: 50940
2008-05-10 06:46:49 +00:00
Tanya Lattner b93cfdb48a Set to 2.4 and regenerate configure.
llvm-svn: 50935
2008-05-10 04:20:38 +00:00
Evan Cheng 9c4d685165 Add nounwind.
llvm-svn: 50931
2008-05-10 02:22:25 +00:00
Dan Gohman 3c0e11af64 For now, abort when an ISD::VAARG is encountered on x86-64, rather
than silently generate invalid code.

llvm-gcc does not currently use VAArgInst; it lowers va_arg in the
front-end.

llvm-svn: 50930
2008-05-10 01:26:14 +00:00
Evan Cheng da2587cedc Some clean up.
llvm-svn: 50929
2008-05-10 00:59:18 +00:00
Evan Cheng bb48d55a88 If movl top bits are undef, let it be selected to movlps, etc.
llvm-svn: 50928
2008-05-10 00:58:41 +00:00
Evan Cheng bec201fa06 If all sources of a PHI node are defined by an implicit_def, just emit an implicit_def instead of a copy.
llvm-svn: 50927
2008-05-10 00:17:50 +00:00
Bill Wendling 19e3c857b8 Cosmetic changes:
- Comment fixes.
 - Moar whitespace.
 - Made ivars "private" by default.
No functionality change.

llvm-svn: 50926
2008-05-10 00:12:52 +00:00
Chris Lattner 14196c099f Implement -rewrite-macros, which is a crazy macro expander that expands
macros but doesn't expand #includes, remove comments, remove #defines
etc.

For example:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x

bbaa  bbaa

#if 1 
funclike("gar")
foo /*blah*/  bar
bar
#endif

#if 0
funclike()
#endif
----


rewrites to:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x 

/*bbaa  bbaa*/

#if 1
 "gar" "a" "gar" "b" "gar"/*funclike*//*("gar")*/
foo /*blah*/  bar
bar
#endif

#if 0
/*funclike()*/
#endif
----

llvm-svn: 50925
2008-05-10 00:02:33 +00:00
Ted Kremenek acdde6f099 Rename IsPointerType to LVal::IsLValType, and update CFRefCount::EvalSummary to use IsLValType when conjuring symbols for return values (this fixes a bug with an assertion firing in the analyzer when two qualified objective-c types were compared).
llvm-svn: 50924
2008-05-09 23:45:33 +00:00
Argyrios Kyrtzidis fa8e15bfa5 -Implement proper name lookup for namespaces.
-identifierResolver exposes an iterator interface to get all decls through the scope chain.
-The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier.

llvm-svn: 50923
2008-05-09 23:39:43 +00:00
Evan Cheng 867af2678f Add a pattern to do move the low element of a v4f32 and zero extend the rest.
llvm-svn: 50922
2008-05-09 23:37:55 +00:00
Dale Johannesen 66da8b5334 Remove an evil vector bool. Cosmetic refactoring,
no functional change.

llvm-svn: 50921
2008-05-09 23:28:24 +00:00
Chris Lattner 664ef65981 make #if 0 code compile, even though it still isn't very useful.
llvm-svn: 50920
2008-05-09 22:43:24 +00:00
Mon P Wang b84407d6ec Added support to generate some atomic operators (add, sub, and, or etc..)
llvm-svn: 50919
2008-05-09 22:40:52 +00:00
Evan Cheng 961339bbdb Handle a few more cases of folding load i64 into xmm and zero top bits.
Note, some of the code will be moved into target independent part of DAG combiner in a subsequent patch.

llvm-svn: 50918
2008-05-09 21:53:03 +00:00
Evan Cheng 7f76852a50 Make OpActionsCapacity multiple of 4.
llvm-svn: 50917
2008-05-09 21:50:23 +00:00
Dale Johannesen cff7df201c Rewrite tail merging algorithm to handle the
case where there are multiple blocks with a large
number of common tail instructions more efficiently
(compile time optimization).

llvm-svn: 50916
2008-05-09 21:24:35 +00:00
Steve Naroff d30f8c5b54 Fix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw declaration in preamble does not match objc/objc-exception.h.
llvm-svn: 50915
2008-05-09 21:17:56 +00:00
Steve Naroff 530c3f9403 DO NOT pre-defined __OBJC2__. The __OBJC2__ macro should only be defined when targeting the new, Apple 2.0 *runtime ABI*. It is not intended to be used to #ifdef ObjC 2.0 langauge features. This is unfortunate (given it's name). In a perfect world, this defined would be named __OBJC2_RUNTIME_ABI__. Oh well.
llvm-svn: 50913
2008-05-09 20:52:28 +00:00
Torok Edwin 42d46f2aa3 put LibCallAliasAnalysis into anonymous namespace to avoid
clashes on ::X

llvm-svn: 50912
2008-05-09 20:35:45 +00:00
Evan Cheng 0352e63e39 Simplify test.
llvm-svn: 50911
2008-05-09 19:56:32 +00:00
Mikhail Glushenkov 4ae55648bc Rename Example.td to Graph.td.
llvm-svn: 50910
2008-05-09 19:11:28 +00:00
Steve Naroff 0889b9bfac More VC++ project file updates.
llvm-svn: 50909
2008-05-09 19:10:27 +00:00
Nick Kledzik db18f328d7 use doxygen comments for makeBuffer()
llvm-svn: 50908
2008-05-09 18:44:41 +00:00
Ted Kremenek 82e8d07b02 Remove repeated word.
llvm-svn: 50907
2008-05-09 17:53:57 +00:00
Ted Kremenek 712c91f8a9 Add attribute "format" support for typedefs of function pointers.
llvm-svn: 50906
2008-05-09 17:36:24 +00:00
Ted Kremenek bbd4695a45 Grammar.
llvm-svn: 50905
2008-05-09 17:13:18 +00:00
Ted Kremenek 4d180b36f3 Added text on librewrite and libanalysis to the README.
llvm-svn: 50904
2008-05-09 17:12:45 +00:00
Nate Begeman 1d30431002 Handle all attributes on a parameter
llvm-svn: 50903
2008-05-09 16:56:01 +00:00
Chris Lattner a4ee1f516f don't sink invokes, even if they are readonly. This fixes a
crash on kimwitu++.

llvm-svn: 50901
2008-05-09 15:07:33 +00:00
Duncan Sands 437435dcbc Fix a type and formatting.
llvm-svn: 50900
2008-05-09 12:20:10 +00:00
Gabor Greif fb38b2123c ignore Output dirs
llvm-svn: 50899
2008-05-09 11:56:35 +00:00
Gabor Greif a484def8a7 ignore AutoGenerated.inc, it is created by TableGen
llvm-svn: 50898
2008-05-09 11:49:54 +00:00
Gabor Greif 1a40412efe ignore Output dir
llvm-svn: 50897
2008-05-09 11:44:30 +00:00
Mikhail Glushenkov 22ce861ffe Reapply 50867: A small refactoring (extract method) + some comment fixes.
Fixed the build breakage, sorry for that.

llvm-svn: 50895
2008-05-09 08:27:26 +00:00
Nate Begeman f322eabbce Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector.  This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.

llvm-svn: 50892
2008-05-09 06:41:27 +00:00
Chris Lattner ba7a6c14ed set long/pointers to 64-bits on ppc64/x86-64
llvm-svn: 50891
2008-05-09 06:17:04 +00:00
Chris Lattner 5e2ef0c18a parameterize pointer size/align better without doing virtual method calls in normal case.
llvm-svn: 50890
2008-05-09 06:08:39 +00:00