1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

5378 Commits

Author SHA1 Message Date
Chris Lattner
cd6a595db5 No need to scan zero initializers. This should make DSA a bit faster.
llvm-svn: 11471
2004-02-15 05:53:42 +00:00
Chris Lattner
363cd9e4b8 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.

llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner
0f819b9523 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.

llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner
52cc69f39e Remove dependence on return type of ConstantStruct::get
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
3fd2b573f1 Remove dependence on the return type of ConstantArray::get
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
c8d0942108 Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
from 16.57 -> 13.46s on 129.compress.

llvm-svn: 11462
2004-02-15 02:46:46 +00:00
Chris Lattner
af97b8450d Implement llvm.(frame|return)address(0) correctly. They are used by the LLVM JIT, among other
applications

llvm-svn: 11459
2004-02-15 01:04:03 +00:00
Alkis Evlogimenos
fc768e6db0 Fix problem in DEBUG code. I could be pointing past the end and
dereferencing it causes an assertion error.

llvm-svn: 11458
2004-02-15 00:46:41 +00:00
Chris Lattner
679c106ce3 Fix the 'have a framepointer' case, so that the frame pointer always points
to the old saved EBP.

llvm-svn: 11455
2004-02-15 00:15:37 +00:00
Chris Lattner
18c5e0065f Allow for fixed objects to reside in the local area, and if they don't to not
clobber them by allocating other objects in the same space!

llvm-svn: 11454
2004-02-15 00:14:20 +00:00
Alkis Evlogimenos
e8f9647831 Add back machine code deleter pass until we get a MachineCode pass
that will be responsible for the creation of MachineFunctions and will
be required by all MachineFunctionPass passes.

llvm-svn: 11453
2004-02-15 00:03:15 +00:00
Alkis Evlogimenos
0a88b596b1 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).

llvm-svn: 11452
2004-02-14 23:33:39 +00:00
Chris Lattner
cc5bf36481 Add support for the 'pop' instruction
llvm-svn: 11451
2004-02-14 21:06:02 +00:00
Chris Lattner
3246911460 There is no reason to align the stack pointer if there are no callees of this
function!

llvm-svn: 11450
2004-02-14 20:11:07 +00:00
Chris Lattner
1130fb28d9 There is no reason to align the stack pointer if there are no callees of this function!
llvm-svn: 11449
2004-02-14 20:10:59 +00:00
Chris Lattner
f28479d600 The prologue/epilogue related method calls have no reason to return a value,
make them return void.

This allows us to avoid some costly MBB.size() calls

llvm-svn: 11448
2004-02-14 19:49:54 +00:00
Chris Lattner
1248c8a7f7 finegrainify namespacification, fix 80col prob
llvm-svn: 11445
2004-02-14 06:00:36 +00:00
Chris Lattner
a25668bd6d 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.

llvm-svn: 11444
2004-02-14 04:52:06 +00:00
Chris Lattner
c87772961e Urg, right. These need an input value...
llvm-svn: 11443
2004-02-14 04:47:23 +00:00
Chris Lattner
69b716e81c Codegen llvm.memset into rep stos[bwd]. Simplify code for llvm.memcpy
llvm-svn: 11442
2004-02-14 04:46:05 +00:00
Chris Lattner
6890963e48 add 'rep stos[bwd]' instructions
llvm-svn: 11441
2004-02-14 04:45:37 +00:00
Chris Lattner
b8ecb673d1 Add support for the returnaddress and frameaddress intrinsics
llvm-svn: 11433
2004-02-14 02:55:36 +00:00
Chris Lattner
cdfcb976c7 Add llvm.memset/frameaddress/returnaddress intrinsics.
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Alkis Evlogimenos
a31a767307 Use newly added next() and prior() utility functions.
llvm-svn: 11430
2004-02-14 01:18:34 +00:00
Alkis Evlogimenos
3eeb600093 Use std::numeric_limits<float>::infinity() instead of
std::numeric_limits<float>::max() for weighting preallocated
intervals.

llvm-svn: 11427
2004-02-14 00:44:07 +00:00
Chris Lattner
83c5c942ca Use intrinsic lowering like the rest of the backends. Get rid of crufty hacky
code that worked around problems in the mangler

llvm-svn: 11426
2004-02-14 00:31:10 +00:00
Chris Lattner
6c31b081e4 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

llvm-svn: 11424
2004-02-14 00:30:23 +00:00
Chris Lattner
bc565b2a6c There is no need to emit a shift if the size is constant, which is common
llvm-svn: 11420
2004-02-13 23:36:47 +00:00
Chris Lattner
3681a0bd3f Moved directory, update makefile
llvm-svn: 11417
2004-02-13 23:31:12 +00:00
Chris Lattner
85667eca81 CBackend is no longer here
llvm-svn: 11416
2004-02-13 23:29:37 +00:00
Chris Lattner
9301df3932 CBackend now lives here
llvm-svn: 11415
2004-02-13 23:29:20 +00:00
Chris Lattner
d076de4bf3 Convert the C backend into a target, for use with LLC. This allows us to use
the lowerallocations pass to eliminate malloc/free warnings and hackish code

llvm-svn: 11409
2004-02-13 23:18:48 +00:00
Chris Lattner
81155b0069 Make the cwriter use the lowerinvoke pass so that it can either use "disabled exceptions" or
"expensive exceptions" controlled by an option.  Also refactor and eliminate a bunch of cruft.
This is a temporary solution and causes millions of warnings to pour out of programs that use
exceptions, but it should fix the problem with sparc and the 'write' declaration (PR190).
Subsequent changes will make this stink much less

llvm-svn: 11405
2004-02-13 23:00:29 +00:00
Chris Lattner
33ed4f9de9 Add support for a bunch more functions
llvm-svn: 11395
2004-02-13 21:21:48 +00:00
Alkis Evlogimenos
6d6ab846af Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Chris Lattner
fbacee0077 Add support for fopen/fclose. Specifically with fopen, we were marking all of the
operands as incomplete, though fopen is known to only read them.  This just adds
fclose for symmetry, though it doesn't gain anything.  This makes the dsgraphs for
181.mcf much more precise.

llvm-svn: 11390
2004-02-13 20:05:32 +00:00
Alkis Evlogimenos
c1ef192d44 Use getNumVirtualRegs().
Whitespace cleanups.

llvm-svn: 11389
2004-02-13 18:20:47 +00:00
Chris Lattner
2265790f9f Fix compilation of 126.gcc: intrinsic functions cannot throw, so they are not
allowed in invoke instructions.  Thus, if we are inlining a call to an intrinsic
function into an invoke site, we don't need to turn the call into an invoke!

llvm-svn: 11384
2004-02-13 16:47:35 +00:00
Chris Lattner
b0fadd694d Intrinsic functions cannot throw
llvm-svn: 11383
2004-02-13 16:46:46 +00:00
Chris Lattner
f1de565975 Expose a pass ID that can be 'required'
llvm-svn: 11376
2004-02-13 16:16:16 +00:00
Chris Lattner
da61b0ab20 Squish warning
llvm-svn: 11375
2004-02-13 16:14:50 +00:00
Chris Lattner
dd8e3f4208 Restructure code to handle memcpy/memmove
llvm-svn: 11374
2004-02-13 16:09:54 +00:00
Brian Gaeke
40b9cf9615 Fix off-by-one in Interpreter::getFirstVarArg(), which was punishing
any attempts by LLI to use varargs (possibly left over from the introduction
of IntrinsicLowering??)

llvm-svn: 11370
2004-02-13 06:18:39 +00:00
Chris Lattner
c16e56ea41 Fine grainify namespacification, prune #includes
llvm-svn: 11369
2004-02-13 06:18:21 +00:00
Brian Gaeke
212ffba663 The Interpreter was failing the AtExit UnitTest. This fixes it.
llvm-svn: 11367
2004-02-13 05:48:00 +00:00
Brian Gaeke
4f4348e113 Refactor MachineFunction::print() into MachineBasicBlock::print().
Add MachineBasicBlock::dump().

llvm-svn: 11364
2004-02-13 04:39:55 +00:00
Brian Gaeke
44cc73b6f2 Add head-of-file comments and Doxygen comments. Tighten up a lot of whitespace.
Rename SetMachineOperandConst's formal parameters to match other methods here.
Mark some methods as being used only by the SPARC back-end.
Fix a missing-paren bug in OutputValue().

llvm-svn: 11363
2004-02-13 04:39:32 +00:00
Chris Lattner
705753bd4f Add support for memcpy and memmove intrinsics. Why isn't the cwriter using
the intrinsiclowering code?? :(

llvm-svn: 11362
2004-02-12 23:13:33 +00:00
Alkis Evlogimenos
3ecdcd18c5 Add parent pointer to MachineInstr that points to owning
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.

llvm-svn: 11357
2004-02-12 18:49:07 +00:00
Chris Lattner
c908f6b738 Add support for the llvm.memmove intrinsic
Patch graciously contributed by Reid Spencer!

llvm-svn: 11355
2004-02-12 18:11:20 +00:00