Chris Lattner
bbddd96406
fix PR5983, reject function bodies with no blocks per the grammar.
...
llvm-svn: 93067
2010-01-09 19:20:07 +00:00
Chris Lattner
0de4caa57b
improve documentation for linkonce to be less confusing.
...
llvm-svn: 93066
2010-01-09 19:15:14 +00:00
Jeffrey Yasskin
bb857e5d68
Fix http://llvm.org/PR5729 : x86-64 tail calls were putting their targets into
...
R11, and then asserting that the target was in R9. Since R9 isn't reserved for
the target anymore, and is used as an argument, this patch changes the
assertion.
llvm-svn: 93065
2010-01-09 18:56:43 +00:00
Benjamin Kramer
60fbd641ad
Simplify with StringSwitch.
...
llvm-svn: 93064
2010-01-09 18:53:11 +00:00
Chris Lattner
09ac1b888c
2010 is here.
...
llvm-svn: 93063
2010-01-09 18:40:42 +00:00
Chris Lattner
d2510d97cf
2010 is upon us.
...
llvm-svn: 93062
2010-01-09 18:40:31 +00:00
Benjamin Kramer
dc2f006f4e
Hopefully unbreak build with g++ >= 4.3.
...
llvm-svn: 93060
2010-01-09 18:20:57 +00:00
Dan Gohman
bc694918cc
Use WriteAsOperand instead of getName() to print loop header names,
...
so that unnamed blocks are handled.
llvm-svn: 93059
2010-01-09 18:17:45 +00:00
Benjamin Kramer
2d6fda3205
Use MacroBuilder for TargetDefines instead of std::vector.
...
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Benjamin Kramer
3f6323dea5
Move MacroBuilder into Frontend/Utils.h and clean it up a bit.
...
llvm-svn: 93057
2010-01-09 17:43:21 +00:00
Dan Gohman
62f05b262b
Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
...
highlighting rule for identifiers.
llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman
d5ae136971
Set the vim auto-indent setting for open braces after case statements to
...
follow LLVM source convention.
Before:
case X: {
stuff;
}
After:
case X: {
stuff;
}
llvm-svn: 93055
2010-01-09 17:15:21 +00:00
David Chisnall
2c4a34aeef
Fixed linking of modules containing aliases to constant bitcasts. Existing behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee).
...
Linking modules containing aliases to GEPs is still not quite right. GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break. Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later).
llvm-svn: 93052
2010-01-09 16:27:31 +00:00
Benjamin Kramer
f65e959035
Rework InitPreprocessor to use a MacroBuilder class instead of pushing around
...
std::vectors.
- MacroBuilder wraps a raw_ostream so it can easily write to any buffer
supported by raw_ostream.
- MacroBuilder's method take Twines for easy string concatenation (this was done
with sprintf and temporary buffers before).
- Targets still use std::vector as they don't have access to the builder.
llvm-svn: 93051
2010-01-09 16:17:37 +00:00
Kovarththanan Rajaratnam
e8ed5be89f
Switch UndefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93049
2010-01-09 09:31:32 +00:00
Kovarththanan Rajaratnam
2f14619d89
Switch DefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93048
2010-01-09 09:27:11 +00:00
Zhongxing Xu
f1eeb78ffc
When binding an rvalue to a reference, create a temporary object. Use
...
CXXObjectRegion to represent it.
In Environment, lookup a literal expression before make up a value for it.
llvm-svn: 93047
2010-01-09 09:16:47 +00:00
Duncan Sands
a230552b94
Suppress use of uninitialized variable warning.
...
llvm-svn: 93046
2010-01-09 08:30:33 +00:00
Chris Lattner
ab7087ad66
only factor from expressions whose uses are empty and whose
...
base is the right expression type. This fixes PR5981.
llvm-svn: 93045
2010-01-09 06:01:36 +00:00
Chris Lattner
002ba6b4d0
improve support for dragonfly, patch by Sascha Wildner!
...
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Dan Gohman
6bd3ef82ff
Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
...
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.
Also, fix some more issues with legalization of vector casts.
llvm-svn: 93043
2010-01-09 02:13:55 +00:00
Chris Lattner
003143c582
clean up this code, add a fixme.
...
llvm-svn: 93042
2010-01-09 02:02:37 +00:00
Devang Patel
71ff547575
Delete NamedMDSymTable while destrucing Module.
...
Disable copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public.
llvm-svn: 93041
2010-01-09 01:44:59 +00:00
Dale Johannesen
237254dcab
Add DEBUG_DECLARE. Not used yet.
...
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Devang Patel
44c06e1966
NamedMDNode is never used so there is no need to enumerate it here.
...
llvm-svn: 93039
2010-01-09 01:24:03 +00:00
Julien Lerouge
f50a3f19da
Fix nondeterministic behavior.
...
llvm-svn: 93038
2010-01-09 01:06:49 +00:00
Devang Patel
330cde488e
NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
...
llvm-svn: 93037
2010-01-09 01:02:22 +00:00
Devang Patel
99ff5a864b
Derive NamedMDNode from Value.
...
llvm-svn: 93032
2010-01-09 00:30:14 +00:00
Evan Cheng
0c6defd577
Dan pointed out checking whether a node is dead by comparing its opcode to ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead.
...
llvm-svn: 93031
2010-01-09 00:21:08 +00:00
Dale Johannesen
8f04740650
Add DEBUG_VALUE. Not used yet.
...
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Evan Cheng
cc6d56bd3b
Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock.
...
llvm-svn: 93028
2010-01-08 23:41:50 +00:00
Eric Christopher
3070e16e6f
Grammar thinko.
...
llvm-svn: 93027
2010-01-08 21:42:39 +00:00
Eric Christopher
4a1d7e1506
Remove unnecessary dyn_cast and add a comment. Part of a WIP.
...
llvm-svn: 93026
2010-01-08 21:37:11 +00:00
Chris Lattner
9242ae047c
mplement a theoretical fixme.
...
llvm-svn: 93024
2010-01-08 19:28:47 +00:00
Mike Stump
b3ed45b67c
Fix indentation.
...
llvm-svn: 93023
2010-01-08 19:28:41 +00:00
Mike Stump
9620622431
Add in final overrider logic.
...
llvm-svn: 93022
2010-01-08 19:25:36 +00:00
Chris Lattner
10840e9e13
rename CanEvaluateInDifferentType -> CanEvaluateTruncated and
...
simplify it now that it is only used for truncates.
llvm-svn: 93021
2010-01-08 19:19:23 +00:00
Evan Cheng
4bb448c41b
Fix comment.
...
llvm-svn: 93020
2010-01-08 19:14:57 +00:00
Chris Lattner
a1e223ea10
teach instcombine to delete sign extending shift pairs (sra(shl X, C), C) when
...
the input is already sign extended.
llvm-svn: 93019
2010-01-08 19:04:21 +00:00
Chris Lattner
a69f89c17a
fix PR5978 by peeling the loop so that we avoid shifting the
...
result int by 8 for the first byte. While normally harmless,
if the result is smaller than a byte, this shift is invalid.
llvm-svn: 93018
2010-01-08 19:02:23 +00:00
Ted Kremenek
b92304b42f
Fix handling in GRExprEngine of 'default' branch in switch statements
...
when the default case is winnowed down to be infeasible. When all
cases were ruled out (and the analysis state for the default case
would be infeasible) we would still consider the default case
possible. This fixes PR 5969.
llvm-svn: 93017
2010-01-08 18:54:04 +00:00
John McCall
af07fbe210
Organize testcase into namespaces.
...
llvm-svn: 93015
2010-01-08 18:40:32 +00:00
Duncan Sands
4a8b15dc74
Suppress an unused variable warning when assertions are off;
...
remove some trailing whitespace while there.
llvm-svn: 93008
2010-01-08 17:51:48 +00:00
Chris Lattner
8c92b57df9
tidy up some stuff duncan pointed out.
...
llvm-svn: 93007
2010-01-08 17:48:19 +00:00
Johnny Chen
ab6e6819b2
Minor change, change the order of two "let Inst{...}" stmts within multiclass
...
T2I_bin_ii12rs definition.
llvm-svn: 93006
2010-01-08 17:41:33 +00:00
Ted Kremenek
ea903067e1
For now, add back clang_getDeclSource().
...
llvm-svn: 93003
2010-01-08 17:11:32 +00:00
Eric Christopher
7482ad7272
After further thought revert the patch to make fast-isel avoid
...
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.
If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.
llvm-svn: 92995
2010-01-08 08:24:49 +00:00
John McCall
12f97bc48a
Change the printing of OR_Deleted overload results to print all the candidates,
...
not just the viable ones. This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls; users
therefore will want to figure out why some other options were excluded.
Started sorting overload results. Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.
Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.
llvm-svn: 92990
2010-01-08 04:41:39 +00:00
Evan Cheng
58ec4fec88
ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
...
llvm-svn: 92988
2010-01-08 02:36:12 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00