Commit Graph

1340 Commits

Author SHA1 Message Date
Chris Lattner
0b8e076d0b Patch #1 of Saem Ghani's Pass Manager refactoring. From the man:
"All this should do is create what will eventually be the specialised
passmanagers.  Currently, the templates are inheriting them, once the
template specialisations' methods have been absorbed, patches
submitted method by method.  I'll nuke the specialisations and have
the new objects inherit directly from passmanagert, and sanitise the
world of all references to templates.
"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25053 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 20:00:46 +00:00
Duraid Madina
3e317534c7 more HP-UX cleanliness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:35:06 +00:00
Reid Spencer
14f497452f Revert previous patch. Additional tests fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24968 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:46:37 +00:00
Reid Spencer
84c744fe58 Fix PR409:
Implement the suggested check to ensure that out-of-range float constants
don't get accepted by LLVM accidentally. Adjust the supporting test cases
as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24963 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:07:29 +00:00
Chris Lattner
b9d4100f32 Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24906 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:22:19 +00:00
Chris Lattner
30614675f4 Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24604 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 05:30:21 +00:00
Nate Begeman
6a648614e8 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 05:45:29 +00:00
Nate Begeman
5fbb5d2459 Teach LLVM how to scalarize packed types. Currently, this only works on
packed types with an element count of 1, although more generic support is
coming.  This allows LLVM to turn the following code:

void %foo(<1 x float> * %a) {
entry:
  %tmp1 = load <1 x float> * %a;
  %tmp2 = add <1 x float> %tmp1, %tmp1
  store <1 x float> %tmp2, <1 x float> *%a
  ret void
}

Into:

_foo:
        lfs f0, 0(r3)
        fadds f0, f0, f0
        stfs f0, 0(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 00:36:38 +00:00
Chris Lattner
a1fecc9c26 This requires proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:53 +00:00
Chris Lattner
3787c95e86 * Fix DerivedType::dropAllTypeUses to not change the number of types in a
type when it gets refined.  This allows us to hash on this crucial value.
* Fix several issues in TypeMap::RefineAbstractType that prevent it from
  handling hash values that change correctly.
* Define hashTypeStructure to not always return 0.  :)

This last part (which depends on the first two) speeds up gccld time on eon
from 3.78s to 2.75s with a release build (a 28% speedup!).  This resolves
PR474.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24372 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 06:09:47 +00:00
Chris Lattner
d358cfc1bf Fix handling of multiple unnamed globals with the same type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24362 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 01:32:03 +00:00
Chris Lattner
c35abc2393 Add some dummy method impls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:26:33 +00:00
Chris Lattner
cfe822728f Move some methods around. Refactor the parts of TypeMap that do not depend
on its template arguments into a base class so that the code isn't duplicated
5 times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:14:09 +00:00
Chris Lattner
bcf6bc2610 Split the type refinement case completely out of the type-becomes-concrete
case, simplifying the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24340 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 01:58:06 +00:00
Chris Lattner
66cafb33bc Separate the type-became-concrete case from the type-is-resolved case, the
former of which takes much less work than the later.  This speeds up linking
eon from 3.749 to 3.637s with a release build (about 3%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 01:27:50 +00:00
Chris Lattner
7548590ecc Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 08:39:48 +00:00
Chris Lattner
d4f328e8c1 Tiny speedup, improve comments and code organization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24323 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 08:22:41 +00:00
Chris Lattner
60962dbfba print section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24313 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:10:19 +00:00
Andrew Lenharth
51b8d54922 continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:47:30 +00:00
Chris Lattner
92c4bb904f Fix the optimized code handling of user asm strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 23:24:26 +00:00
Chris Lattner
bc076665cb speedup the common case where nothing needs to be quoted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:47:01 +00:00
Chris Lattner
91150e5d46 Allow per-character control over what target assemblers allow in symbol
names.  This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names.  If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set.  This corresponds with what GAS accepts by default.

Also, this includes some minor speedups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:40:01 +00:00
Chris Lattner
ac8c834288 Add a new option for targets that accept quoted labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24283 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:30:07 +00:00
Chris Lattner
2f9bc4f2d3 remove the M instance var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:02:18 +00:00
Chris Lattner
9ddf21276e Make this more efficient of the common case where we are only mangling globals.
Do not mangle internal global names that do not collide with anything.

This gives us strings that now look like this:

__2E_str_1:                             ; '.str_1'
        .asciz  "foo"

instead of this:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:48:58 +00:00
Chris Lattner
d115ef8973 Force packed vectors to be a power of two in length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 01:40:59 +00:00
Chris Lattner
30caa2876c print alignment info for globals and functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24212 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:48:53 +00:00
Chris Lattner
6033716140 verify that alignments are always a power of 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24200 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:57:54 +00:00
Chris Lattner
9fad0b9974 fix printing the alignment directive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24197 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:20:34 +00:00
Nate Begeman
14b0529532 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 09:21:28 +00:00
Chris Lattner
306f6fefc9 Fix an iterator invalidation problem in code used by the -strip pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24124 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 18:42:37 +00:00
Chris Lattner
b4871ad694 Allow $
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23721 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 01:28:34 +00:00
Chris Lattner
71abaab1d2 add a hack to work around broken VC++ scoping rules. Thx to JeffC for pointing
this out to me


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23655 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-07 05:23:36 +00:00
Chris Lattner
a1e3f54396 refactor a bit of code.
When moving constant entries in 'Map' if the entry is the representative
constant for the abstractypemap, make sure to update it as well.  This
fixes the bcreader failures from last night on several C++ apps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23628 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 21:35:50 +00:00
Chris Lattner
23ec01fcc3 Minor speedup to avoid array searches given a Use*. This speeds up bc reading
of the python test from 1:00 to 54s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 18:47:09 +00:00
Chris Lattner
d0ff1adbdb Change the signature of replaceUsesOfWithOnConstant. The bool was always
true dynamically.  Finally, pass the Use* that replaceAllUsesWith has into
the method for future use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 18:13:04 +00:00
Chris Lattner
a55b30a225 For large constants (e.g. arrays and structs with many elements) just
creating the keys and doing comparisons to index into 'Map' takes a lot
of time.  For these large constants, keep an inverse map so that 'remove'
and move operations are much faster.

This speeds up a release build of the bc reader on Eric's nasty python
bytecode file from 1:39 to 1:00s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23624 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 17:48:46 +00:00
Chris Lattner
d7a3fc6819 minor cleanup/fastpath for the bcreader. This speeds up the bcreader
from 1:41 -> 1:39 on the large python .bc file in a release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 16:52:46 +00:00
Chris Lattner
c182a88aec implement the struct version of the array speedup, speeding up the
testcase a bit more from 1:48 -> 1.40.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23619 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-04 01:17:50 +00:00
Chris Lattner
cea141f1d1 Change ConstantArray::replaceUsesOfWithOnConstant to attempt to update
constant arrays in place instead of reallocating them and replaceAllUsesOf'ing
the result.  This speeds up a release build of the bcreader from:

136.987u 120.866s 4:24.38
to
49.790u 49.890s 1:40.14

... a 2.6x speedup parsing a large python bc file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23614 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 22:51:37 +00:00
Chris Lattner
5cbade9f83 move some methods, no other changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23613 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 21:58:36 +00:00
Chris Lattner
dfdd6c5d7a minor microoptimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23612 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 21:56:24 +00:00
Chris Lattner
df0ef1d0fe Split SimpleConstantVal up into its components, so each Constant subclass getsa different enum value. This allows 'classof' for these to be really simple,not needing to call getType() anymore.
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 06:09:08 +00:00
Chris Lattner
5b845c9443 Add support for a marker byte that indicates that we shouldn't add the user
prefix to a symbol name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23421 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-24 08:24:28 +00:00
Chris Lattner
8064e8fbf4 add printer support for flag operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23054 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-25 17:59:23 +00:00
Jim Laskey
3a1eff732b Move code dependency for MathExtras.h out of Constants.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22840 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-17 20:06:22 +00:00
Jim Laskey
cb6682fa44 Culling out use of unions for converting FP to bits and vice versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-17 19:34:49 +00:00
Andrew Lenharth
9ca65c7110 only build .a on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-14 15:14:34 +00:00
Andrew Lenharth
40b37cc28d Testing a variable before it is defined doesn't work so well. It is a fairly small thing, so just let everyone build the .a file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22783 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-13 14:58:23 +00:00
Andrew Lenharth
7ac17529d2 Fix oversized GOT problem with gcc-4 on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22777 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-13 05:09:50 +00:00
Chris Lattner
6a13aed525 Add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22768 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-12 22:14:06 +00:00
Chris Lattner
0fe34d8912 add new helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22698 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-08 05:21:50 +00:00
Chris Lattner
d7231ac523 PHINode::hasConstantValue should never return the PHI itself, even if the
PHI is its only operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22676 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 15:37:31 +00:00
Chris Lattner
80f4d88a97 Fix an iterator invalidation problem when we decide a phi has a constant value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22675 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 15:34:10 +00:00
Chris Lattner
8313a25d27 Invoke instructions do not dominate all successors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22671 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 01:03:27 +00:00
Chris Lattner
1325b42a7d Now that hasConstantValue is more careful w.r.t. returning values that only
dominate the PHI node, this code can go away.  This also makes passes more
aggressive, e.g. implementing Transforms/CondProp/phisimplify2.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22670 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 01:02:04 +00:00
Chris Lattner
b3b48e11da Use the bool argument to hasConstantValue to decide whether the client is
prepared to deal with return values that do not dominate the PHI.  If we
cannot prove that the result dominates the PHI node, do not return it if
the client can't cope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22669 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 01:00:58 +00:00
Chris Lattner
9acbd611ec Mark hasConstantValue as a const method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22666 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 00:49:06 +00:00
Nate Begeman
c523f4c096 Add an extra parameter that Chris requested
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22665 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-04 23:50:43 +00:00
Nate Begeman
a83ba0f5c9 Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
BasicBlock's removePredecessor routine.  This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22664 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-04 23:24:19 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Chris Lattner
37c121acf4 Verify that varargs functions all have ccc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21792 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-08 22:27:09 +00:00
Chris Lattner
d511898b58 add support for explicit calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21746 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 20:26:43 +00:00
Chris Lattner
ddb6db4fa1 Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21722 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:51:46 +00:00
Andrew Lenharth
691ef2ba06 Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
population (ctpop).  Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.

More coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21676 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 17:19:30 +00:00
Chris Lattner
f818cfe096 fix a bug in the 1 index GEP handling code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21670 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 16:44:45 +00:00
Chris Lattner
38bacf29e8 add direct support for making GEP instrs with one index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21665 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 05:43:30 +00:00
Jeff Cohen
a97e8db835 Use ANSI-approved way of getting the value infinity (otherwise VC++ won't compile it)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21662 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 03:13:01 +00:00
Andrew Lenharth
8b9e3e6511 fold fp div by 0 to inf, the way gcc does. This is legal according to the FP spec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21655 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-02 21:25:47 +00:00
Chris Lattner
eed37bad01 Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-30 03:44:07 +00:00
Chris Lattner
22cab6c752 Unbreak the sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21598 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 18:57:15 +00:00
Chris Lattner
3f80a38859 don't let Reid build void*'s :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21571 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-26 20:03:33 +00:00
Chris Lattner
91bd25d9df Make dominates(A,B) work with post dominators. Patch contributed by
Naveen Neelakantam, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 20:50:33 +00:00
Reid Spencer
e8f3848639 Older compilers won't like the inline virtual destructor in the header file
so we put the destructor in Pass.cpp and make it non-inline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 01:01:35 +00:00
Reid Spencer
2b2a528374 Shut GCC 4.0 up about classes with virtual functions but no virtual
destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21510 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 22:27:20 +00:00
Chris Lattner
64001d0a13 Allow these methods to take a generic Value* to simplify clients. Use
const_cast instead of c casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 07:28:37 +00:00
Chris Lattner
ea1049139e Fix a bug in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21485 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 22:01:39 +00:00
Chris Lattner
4f0247c10d Add a method, remove last use of Type.def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 22:00:09 +00:00
Jeff Cohen
9d80930e95 Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 21:38:35 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00
Misha Brukman
edf128a7fa Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 22:36:52 +00:00
Chris Lattner
566f600779 Improve doxygen, from part of Evan's patch that didn't apply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21394 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:06:03 +00:00
Chris Lattner
0f67dd6237 Improve doxygen documentation, patch contributed by Evan Jones!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:04:49 +00:00
Chris Lattner
3464547968 add an argument to allow avoiding deleting phi nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21255 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-12 18:52:14 +00:00
Andrew Lenharth
7f4ec3b2e3 First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20900 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 20:05:49 +00:00
Alkis Evlogimenos
1cecd3a1d2 Add new function getPtrPtrFromArrayPtr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20684 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 11:40:31 +00:00
Misha Brukman
fd67824386 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20638 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 05:42:00 +00:00
Chris Lattner
39220ded94 stop using arg_front
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20599 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 05:03:36 +00:00
Chris Lattner
e4d5c441e0 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
76da61621c correct the computation of the isAbstract bit for types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20533 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 17:34:27 +00:00
Reid Spencer
9dbf1e5bb8 Fix a typo in an assertion comment.
Patch contributed by Vladimir Merzliakov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 15:19:41 +00:00
Chris Lattner
f1b4d1dee6 rename insertEntry to insert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:55:40 +00:00
Chris Lattner
e4c872a8fa Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:51:09 +00:00
Chris Lattner
c27aa8ddb2 Delete the really inefficient method: void remove(const Type* Typ);
Speed up the symbol stripping code by avoiding a linear search of the
type table.

Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20481 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:46:41 +00:00
Chris Lattner
a98cbe57ea Remove some really gross and hard to understand code now that
InternallyInconsistent is always false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20477 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:21:40 +00:00
Chris Lattner
ee4da939b0 Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20476 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:13:42 +00:00
Chris Lattner
921c565888 remove these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:37:47 +00:00
Chris Lattner
04cb800c32 This fixes PR531, a crash when running the CBE on a bytecode file.
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).

The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one.  This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.

This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20469 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:14:28 +00:00
Chris Lattner
0d1e40728d remove all of the various setName implementations, consolidating them into
Value::setName, which is no longer virtual.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20464 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:51:50 +00:00
Chris Lattner
8e1b8473eb 2nd arg to setName goes away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20460 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:02:15 +00:00
Chris Lattner
ffdb920ec2 Constants never get names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20459 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:01:59 +00:00
Chris Lattner
18221ed507 Remove the 2nd argument to Value::setName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20458 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:01:49 +00:00
Misha Brukman
0fbd914362 Fix the spelling of the word `the'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 23:17:31 +00:00
Chris Lattner
31ab1b3d74 Print the module ID as a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 23:12:40 +00:00
Chris Lattner
ded3613fef Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's an
explanation from IRC:

	|sabre|	I think it's an order of evaluation thing
	|sabre|	for me, the RHS of the assignment is evaluated first
	|sabre|	getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything
	|sabre|	since it doesn't, it computes and returns the value
	|sabre|	this gets put into the map.
	|sabre|	For you, the LHS is evaluated first.
	|sabre|	Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference
	|sabre|	getTypeDesc then sees the empty string in the map
	|sabre|	and returns it
	|sabre|	bork :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20394 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 03:54:43 +00:00
Chris Lattner
edac2d1a80 recognize llvm.prefetch. Patch contributed by Justin Wick!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:28:00 +00:00
Chris Lattner
6f72282e02 Verify llvm.prefetch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:27:42 +00:00
Chris Lattner
aab1820816 Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20302 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 16:58:29 +00:00
Chris Lattner
d1a326006d switch instructions only allow constantints for their values, be more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20298 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:32:09 +00:00
Chris Lattner
ad993cbb77 add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 02:37:26 +00:00
Chris Lattner
1f21ef1511 make this more efficient. Scan up to 16 nodes, not the whole list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:53:04 +00:00
Chris Lattner
8daf056c90 new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:51:11 +00:00
Chris Lattner
35f0aecdb0 Reduce the amount of searching this assertion does. On a testcase of mine,
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 07:09:08 +00:00
Chris Lattner
1117bb0e99 Nuke blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20154 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 17:54:21 +00:00
Chris Lattner
fe0343a1cd Fix test/Regression/Assembler/2005-02-09-AsmWriterStoreBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20089 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-09 17:45:03 +00:00
Chris Lattner
286629736f Instead of initializing the volatile field, use accessors to set it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20045 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-05 01:38:38 +00:00
Chris Lattner
905547b02b Initialize new field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-05 01:37:58 +00:00
Chris Lattner
29d1ca6c42 Updates for new use list changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19961 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:24:21 +00:00
Chris Lattner
5c461404fe Update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19960 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:24:01 +00:00
Chris Lattner
bca81448ac Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:09:23 +00:00
Chris Lattner
3cf8e6857e Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:41:12 +00:00
Chris Lattner
1f377fcaad Make sure that we always grow a multiple of 2 operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19902 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 01:05:12 +00:00
Chris Lattner
96d83f63cd Adjust to changes in User class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19892 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:35:33 +00:00
Chris Lattner
b12261ac69 Merge InstrTypes.cpp into this file
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19891 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:35:16 +00:00
Chris Lattner
e467147b30 Adjust to changes in User class. Aggregate constants now must explicitly
manage their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19890 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:34:39 +00:00
Chris Lattner
265287f714 This file is now merged into Instructions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19889 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:33:32 +00:00
Chris Lattner
f4aa3351de Fix a nasty thinko in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 23:17:27 +00:00
Chris Lattner
ce04a6d7f6 Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
not change the address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19874 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 19:09:51 +00:00
Misha Brukman
1bae291cb9 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19854 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-27 06:46:38 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Chris Lattner
353c3e4981 Add missing entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 17:32:28 +00:00
Chris Lattner
57bf3287dd implement these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19571 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:52:40 +00:00
Chris Lattner
9a791eaf8f Make this compatible with the HP/intel compiler. Fix by Duraid, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 15:53:26 +00:00
Chris Lattner
7d7a0ed4ec Allow arrays to have more than 4G elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:19:51 +00:00
Chris Lattner
fe59d36c45 Add convenience method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:40:32 +00:00
Chris Lattner
488742a28e No need to pessimize current code for future possibilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19311 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 16:26:38 +00:00
Chris Lattner
71d94d16b6 To not break TBAA rules, use a union.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-04 01:56:57 +00:00
Chris Lattner
f5ac6c27ac Allow getZeroExtend and getSignExtend to work with boolean inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 15:59:57 +00:00
Chris Lattner
56998b26ae Add a verifier assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18965 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 20:23:49 +00:00
Chris Lattner
fcdd82e4a9 Change this method to return ulong, not uint, for 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:48:51 +00:00
Chris Lattner
f23586c7ef Check in the file I forgot last night, to solve all of the crashes in every
test in the suite.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18804 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 22:10:29 +00:00
Alkis Evlogimenos
9913e59678 Fix writer to properly quote label names when they don't contain
simple characters.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18744 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:41:10 +00:00
Chris Lattner
1d875b854c Work correctly with MSVC and ICC, patch contributed by Bjørn Wennberg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18631 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 16:22:48 +00:00
Reid Spencer
574cdb32a0 Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
of them seem to work everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 07:38:08 +00:00
Reid Spencer
e2432596ac Provide a missing header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 07:08:08 +00:00
Reid Spencer
79457c791e Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18596 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 07:06:47 +00:00
Alkis Evlogimenos
eb61d60e1b Fix check for valid floats. Also use and HUGE_VALF instead
of std::numeric_limits, because they work in more platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18593 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 06:46:50 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00