Commit Graph

836 Commits

Author SHA1 Message Date
Misha Brukman
ab5c6003d2 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-02 00:22:19 +00:00
Misha Brukman
9d0802e7dd * If a badref has a name, print it out for ease of debugging
* Doxygenify (some) comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12057 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 19:48:13 +00:00
Chris Lattner
cbee990a29 Fix -debug-pass=Executions, which relied on Function, Module, and BasicBlock
being annotable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12013 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 22:37:04 +00:00
Brian Gaeke
f822ee999f Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 21:55:18 +00:00
Chris Lattner
08092533b1 Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 17:28:25 +00:00
Chris Lattner
1cd4c7294c Make sure that at least one virtual method is defined in a .cpp file to avoid
having the compiler emit RTTI and vtables to EVERY translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 07:24:18 +00:00
Chris Lattner
2a11653fa9 Make the verifier a little more explicit about this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 22:06:07 +00:00
Chris Lattner
b228f9c86b Get all instruction definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 06:25:38 +00:00
Chris Lattner
57cb9883aa Fix PR245: Linking weak and strong global variables is dependent on link order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 21:56:04 +00:00
Chris Lattner
ac89164fa2 Adjust to recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 03:03:47 +00:00
Chris Lattner
2e9bb1a88e Move the folding of gep null, 0, 0, 0 to a place where it can be shared and
enjoyed by all, fixing a fixme.  Add an assert


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11505 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-16 20:46:13 +00:00
Chris Lattner
8709927af8 Fix a bug in the recent rewrite of the leakdetector that caused all of the
nightly tests to be really messed up.  The problem was that the new leakdetector
was depending on undefined behavior: the order of destruction of static objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11488 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 23:33:48 +00:00
Chris Lattner
9b700f7951 By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:24:51 +00:00
Chris Lattner
588e72db75 Refactor code. Now the intrinsic lowering pass tries to recycle preexisting
prototypes, even if they don't precisely match what it would prefer to use.
This fixes: CBackend/2004-02-15-PreexistingExternals.llx compiling it into:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_30 = memcpy(((int *)l27_A), ((unsigned )(long)l27_B), ((int )123u));

instead of:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_27 = l43_memcpy(l27_A, l27_B, 123u);

Which does the wrong thing as you could imagine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11481 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:16:39 +00:00
Chris Lattner
de512b5b2e Adjustments to support the new ConstantAggregateZero class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:55:15 +00:00
Chris Lattner
40bbeb5d07 Add a new ConstantAggregateZero class, to fix PR239. This makes zero
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements.  This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:53:04 +00:00
Chris Lattner
ca705fa31d ConstantArray::get and ConstantStruct::get now just return pointers to
'Constant', instead of specific subclass pointers.  In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11467 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:14:47 +00:00
Chris Lattner
04d1fb6df9 Remove dependence on return type of ConstantStruct::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:07:32 +00:00
Chris Lattner
371064481a Remove dependence on the return type of ConstantArray::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:05:58 +00:00
Chris Lattner
aab54da21c Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
from 16.57 -> 13.46s on 129.compress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 02:46:46 +00:00
Alkis Evlogimenos
b663d76f86 Modularize implementation of LeakDetector into a typed template
implementation class. This makes the code simpler and allows for more
types to be added easily. It also implements caching for generic
objects (it was only available for llvm objects).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 23:33:39 +00:00
Chris Lattner
cc42d2c3cc A target that doesn't support these intrinsics will still meet spec (the
intrinsic will always produce zero), but it will behave unexpectedly, so
warn like GCC does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 04:52:06 +00:00
Chris Lattner
cf89908381 Add llvm.memset/frameaddress/returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11431 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 02:47:17 +00:00
Chris Lattner
a6acb4f5fd Fix the logic in the name mangler. If there are two symbols named 'X', and one
is external, make sure to mangle the *internal* one, not external one


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 00:30:23 +00:00
Chris Lattner
2751e76a70 Add support for the llvm.memmove intrinsic
Patch graciously contributed by Reid Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:11:20 +00:00
Chris Lattner
5fe51cc2c4 Implement the llvm.memcpy intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11349 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:01:09 +00:00
Chris Lattner
82a5ff4c54 Initialize the count instance variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 03:29:16 +00:00
Chris Lattner
b171942441 Remove obsolete method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 01:17:33 +00:00
Chris Lattner
a44fb0d362 Remove the statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11243 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 21:01:23 +00:00
Chris Lattner
c3b5849e92 Speed up type resolution some more. On the testcase in PR224, for example,
this speeds up a release llvm-as from 21.95s to 11.21s, because before it
would do an expensive traversal of the type-graph of every type resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11242 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 20:23:44 +00:00
Chris Lattner
0cdaf94a5e Implement the hashing scheme in an attempt to speed up the "slow" case in
type resolution.  Unfortunately it doesn't help.

Also delete some dead debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11237 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:32:40 +00:00
Chris Lattner
2729540896 Code cleanup in preparation for later changes. Now that ContainedTy's are
consistent across the various type classes, we can factor out a LOT more
almost-identical code.  Also, add a couple of temporary statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11232 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 16:35:14 +00:00
Chris Lattner
f32f56862a Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 05:40:24 +00:00
Chris Lattner
d21cd809b6 Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:37:31 +00:00
Chris Lattner
d5d8996720 Start using the new and improve interface to FunctionType arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11224 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:14:01 +00:00
Chris Lattner
e21f68d1e8 Two problems with these lines of code:
1. The "work" was not in the assert, so it was punishing the optimized release
 2. getNamedFunction is _very_ expensive in large programs.  It is not designed
    to be used like this, and was taking 7% of the execution time of the code
    generator on perlbmk.

Since the assert "can never fail", I'm just killing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 00:59:07 +00:00
Chris Lattner
71151aee60 Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Have I ever mentioned how much I _hate_ constantpointerrefs?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 00:15:41 +00:00
Chris Lattner
a306d3720a vi failed me again. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:52:30 +00:00
Chris Lattner
f37a4268d8 Rename the invoke 'except' destination to the 'unwind' destination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11205 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:52:04 +00:00
Chris Lattner
aeb2a1d708 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:44:31 +00:00
Chris Lattner
4f05611ed9 Adjust to the new BB ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:57:50 +00:00
Chris Lattner
c6aa017eae When splitting a basic block, insert the new half immediately after the first
half.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11110 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:21:31 +00:00
Chris Lattner
786993c01e If changing a parent, don't add then remove the object from the leak detector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 01:06:38 +00:00
Chris Lattner
f2c3106866 In BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
instead of a loop that is really inefficient with large basic blocks.

This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s
which still isn't exactly speedy, but is a lot better.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11105 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-03 23:11:21 +00:00
Chris Lattner
84a102a780 Floating point negates are -0.0 - X, not 0.0 - X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11084 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 20:21:29 +00:00
Chris Lattner
cfdf2419bc Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values.  This is likely to
make the map search be faster anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 22:49:04 +00:00
Chris Lattner
b97e2788ff Fix a crasher bug in my constant folding rewrite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 01:23:19 +00:00
Chris Lattner
90fb19ed2c Fix a problem brian ran into with the bytecode reader asserting. It turns
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it.  This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 00:55:21 +00:00
Misha Brukman
ce218c6492 Let subclasses implement ModuleProvider::materializeModule() which is based on
their implementation of book-keeping for which functions need to be materialized
and which don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10943 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-21 22:54:50 +00:00
Chris Lattner
f2d577b27a SlotCalculator.h moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 19:50:34 +00:00