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
Neil Booth
6e01c5df37
convertFromInteger, as originally written, expected sign-extended
...
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.
llvm-svn: 42732
2007-10-07 11:45:55 +00:00
Gordon Henriksen
99c0e2918b
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Gordon Henriksen
ee9c8932e4
Adopting a uniform naming convention for type constructors in bindings.
...
llvm-svn: 42698
2007-10-06 16:05:20 +00:00
Gordon Henriksen
574434313a
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
65ce7c3085
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Gordon Henriksen
8d97ababb0
Wrapping Value::dump.
...
llvm-svn: 42668
2007-10-06 00:08:49 +00:00
Gordon Henriksen
543f859a00
Removing the silly CHelpers header by rolling wrap and unwrap into the C
...
bindings headers themselves, hidden behind #ifdef __cplusplus.
llvm-svn: 42666
2007-10-05 23:59:36 +00:00
Devang Patel
36b68478cb
Fix bug in updating dominance frontier after loop
...
unswitch when frontier includes basic blocks that
are not inside loop.
llvm-svn: 42654
2007-10-05 22:29:34 +00:00
Owen Anderson
cb51170957
Completely merge the implementation details of DomTree and PostDomTree.
...
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,
llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Dan Gohman
30ba45b569
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Dan Gohman
b278232a22
Fix a using namespace llvm; in a header file.
...
llvm-svn: 42584
2007-10-03 19:04:09 +00:00
Owen Anderson
91e23d710c
Factor some code from the DomTree and PostDomTree calculate methods up into
...
each one's runOnFunction method.
llvm-svn: 42563
2007-10-03 03:20:17 +00:00
Dale Johannesen
2a0b2ab2fc
Constant fold int-to-long-double conversions;
...
use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).
llvm-svn: 42484
2007-09-30 18:19:03 +00:00
Owen Anderson
09ba812a80
Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
...
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Duncan Sands
5e73fe090a
Check that the second parameter of init_trampoline
...
can be resolved to a function. This is required
for codegen and used by instcombine.
llvm-svn: 42469
2007-09-29 16:25:54 +00:00
Gordon Henriksen
b3d98e2023
Demoting CHelpers.h to include/llvm/Support.
...
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Chris Lattner
14442c9a4d
Make Value::getNameLen not crash on an empty name, fixing PR1712.
...
llvm-svn: 42444
2007-09-28 20:09:40 +00:00
Owen Anderson
a533c458f5
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Owen Anderson
e529f66979
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
...
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Dale Johannesen
089d2e760f
Make temporaries explicit to avoid premature
...
destruction of compiler-created ones.
llvm-svn: 42383
2007-09-26 23:20:33 +00:00