Gordon Henriksen
8430f1ff9a
Reverting dtor devirtualization patch.
...
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day
llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Chris Lattner
11bc69b3c8
fix some warnings.
...
llvm-svn: 44756
2007-12-10 01:51:22 +00:00
Chris Lattner
3d939a50a5
Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll
...
llvm-svn: 44755
2007-12-10 01:48:29 +00:00
Gordon Henriksen
a18a78e6e5
Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
...
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Duncan Sands
928143423b
Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
...
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.
llvm-svn: 44626
2007-12-05 21:03:28 +00:00
Duncan Sands
1e2e4972ff
Rather than having special rules like "intrinsics cannot
...
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).
llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands
97ddf89236
Small optimization of parameter attribute lookup.
...
llvm-svn: 44458
2007-11-30 18:20:58 +00:00
Duncan Sands
94d751995e
Add a convenience method for modifying parameter
...
attributes. While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.
llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Duncan Sands
8d9be63cd3
Check that there are not more attributes than
...
function parameters.
llvm-svn: 44452
2007-11-30 15:52:20 +00:00
Duncan Sands
19a1638e99
Small parameter attributes cleanup.
...
llvm-svn: 44433
2007-11-29 08:30:15 +00:00
Duncan Sands
1b0feb42e2
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Duncan Sands
114968a3e8
Fix PR1816. If a bitcast of a function only exists because of a
...
trivial difference in function attributes, allow calls to it to
be converted to direct calls. Based on a patch by Török Edwin.
While there, move the various lists of mutually incompatible
parameters etc out of the verifier and into ParameterAttributes.h.
llvm-svn: 44315
2007-11-25 14:10:56 +00:00
Duncan Sands
d05a55f03f
Rename the 'const' parameter attribute to 'readnone',
...
and the 'pure' parameter attribute to 'readonly'.
Names suggested by DannyB.
llvm-svn: 44273
2007-11-22 20:23:04 +00:00
Duncan Sands
f69444f091
In order for parameter attribute uniquing to make
...
any sense it is important that ParamAttr::None gets
treated the same as not supplying an attribute at
all. Rather than stripping ParamAttr::None out of
the list of attributes, assert if ParamAttr::None
is seen. Fix up the bitcode reader which liked to
insert ParamAttr::None all over the place. Patch
based on one by Török Edwin.
llvm-svn: 44250
2007-11-20 14:09:29 +00:00
Dan Gohman
27ac53cc23
Remove meaningless qualifiers from return types, avoiding compiler warnings.
...
llvm-svn: 44240
2007-11-19 20:46:23 +00:00
Chris Lattner
cf741eccd6
print a call to a fastcc function as:
...
call x86_fastcallcc void @func( i32* %X, i64 0 )
not:
callx86_fastcallcc void @func( i32* %X, i64 0 )
This fixes Codegen/X86/fast-cc-merge-stack-adj.ll
llvm-svn: 44217
2007-11-18 18:32:16 +00:00
Nate Begeman
2a8ef3f29a
Add support for vectors to int <-> float casts.
...
llvm-svn: 44204
2007-11-17 03:58:34 +00:00
Nate Begeman
a42e2c2272
Basic non-power-of-2 vector support
...
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Duncan Sands
5924300986
I discover array_lengthof, thanks to gabor on #llvm.
...
llvm-svn: 44139
2007-11-14 21:58:02 +00:00
Duncan Sands
805a8ba9cf
Simplify the attribute verification code.
...
llvm-svn: 44116
2007-11-14 14:02:11 +00:00
Anton Korobeynikov
00f3ace7e9
Add pure/const attributes. Documentation will follow.
...
llvm-svn: 44109
2007-11-14 09:52:30 +00:00
Duncan Sands
fc061f4e20
Don't barf on empty basic blocks. Do not rely on assert
...
doing something - this needs to work for release builds
too. I chose to just abort rather than following the
fancy logic of abortIfBroken, because (1) it is a pain
to do otherwise, and (2) nothing is going to work if the
module is this broken.
llvm-svn: 43611
2007-11-01 10:50:26 +00:00
Chris Lattner
4618bf2f11
remove verifier command line option: this should be part of the API, not
...
a command line optn.
llvm-svn: 43603
2007-11-01 04:43:13 +00:00
Owen Anderson
8eb7b6ed84
Now with less tabs!
...
llvm-svn: 43601
2007-11-01 03:54:23 +00:00
Chris Lattner
38a21a25f2
Fix InstCombine/2007-10-31-StringCrash.ll by removing an obvious
...
(in hindsight) infinite recursion. Simplify the code.
llvm-svn: 43597
2007-11-01 02:30:35 +00:00
Dan Gohman
a9d080508e
Fix a regression in test/CodeGen/X86/2007-04-24-VectorCrash.ll introduced
...
by r43510. Gracefully handle constants with vector type that aren't
ConstantVector or ConstantAggregateZero.
llvm-svn: 43579
2007-10-31 21:36:31 +00:00
Owen Anderson
89dee120a1
Add a preverifier pass to check that every basic block ends in a terminator, so that we don't segfault when verifying invalid code.
...
llvm-svn: 43578
2007-10-31 21:04:18 +00:00
Dan Gohman
9365affecc
Add support for folding binary operators with vector zero operands.
...
llvm-svn: 43510
2007-10-30 19:00:49 +00:00
Chris Lattner
1659eb3c3f
I am not sure this is a good idea to be an option, but rename the option for
...
now. It conflicts with clang's -pedantic flag.
llvm-svn: 43431
2007-10-29 03:14:55 +00:00
Anton Korobeynikov
ab0c5f6d32
Add 'pedantic' mode to verifier rejecting syntactically valid, but 'bad' due to other reasons code
...
llvm-svn: 43424
2007-10-28 22:50:32 +00:00
Owen Anderson
33b9693ab8
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
...
llvm-svn: 43259
2007-10-23 20:58:37 +00:00
Dan Gohman
e223bab494
The #include <iterator> isn't needed in this header.
...
llvm-svn: 43232
2007-10-22 20:44:10 +00:00
Chris Lattner
61de0c50b7
this doesn't need dynamic_cast.
...
llvm-svn: 43133
2007-10-18 16:26:24 +00:00
Chris Lattner
4656de62bf
Reduce reliance on rtti info
...
llvm-svn: 43130
2007-10-18 16:11:18 +00:00
Chris Lattner
80a2b5e53b
fix typo
...
llvm-svn: 43129
2007-10-18 16:10:48 +00:00
Dan Gohman
231159e8a3
Define a helper function ConstantVector::getSplatValue for testing for
...
and working with broadcasted constants.
llvm-svn: 43076
2007-10-17 17:51:30 +00:00
Owen Anderson
1235d1218b
Move splitBlock into DomTreeBase from DomTree.
...
llvm-svn: 43059
2007-10-17 02:03:17 +00:00
Dale Johannesen
fdb488d4b5
Disable attempts to constant fold PPC f128.
...
Remove the assumption that this will happen from
various places.
llvm-svn: 43053
2007-10-16 23:38:29 +00:00
Owen Anderson
43fefb53a6
Template DominatorTreeBase by node type. This is the next major step towards
...
having dominator information on MBB's.
llvm-svn: 43036
2007-10-16 19:59:25 +00:00
Duncan Sands
9d622a6de1
Initial infrastructure for arbitrary precision integer
...
codegen support. This should have no effect on codegen
for other types. Debatable bits: (1) the use (abuse?)
of a set in SDNode::getValueTypeList; (2) the length of
getTypeToTransformTo, which maybe should be refactored
with a non-inline part for extended value types.
llvm-svn: 43030
2007-10-16 09:56:48 +00:00
Chris Lattner
bf2f5b472f
avoid an APFloat copy.
...
llvm-svn: 42979
2007-10-15 05:34:10 +00:00
Dale Johannesen
4cbce377c6
Disable some compile-time optimizations on PPC
...
long double.
llvm-svn: 42958
2007-10-14 01:56:47 +00:00
Dale Johannesen
0ee2a2fb59
Next PPC long double bits. First cut at constants.
...
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Gordon Henriksen
84b068154b
C and Objective Caml bindings for PHINode::addIncoming etc.
...
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Evan Cheng
1a6e294c27
Remove debugging printf to get build going on x86-64.
...
llvm-svn: 42757
2007-10-08 17:49:43 +00:00
Dan Gohman
7fa473514d
Add explicit keywords.
...
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Owen Anderson
ffcd82d1ed
Begin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.
...
llvm-svn: 42743
2007-10-08 07:44:39 +00:00
Gordon Henriksen
8d8fae73c5
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
...
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
2007-10-08 03:45:09 +00:00
Gordon Henriksen
454d171c26
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00