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
Chris Lattner
d1c4f4c833
Add support for the rep movs[bwd] instructions, and emit them when code
...
generating the llvm.memcpy intrinsic.
llvm-svn: 11351
2004-02-12 17:53:22 +00:00
Chris Lattner
0d988a0d14
Implement the llvm.memcpy intrinsic
...
llvm-svn: 11349
2004-02-12 17:01:09 +00:00
Chris Lattner
ef375052c6
Rename the opCode instance variable to Opcode
...
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner
bda81f88b7
This field is never read
...
llvm-svn: 11346
2004-02-12 16:04:49 +00:00
Alkis Evlogimenos
94cab18bdc
Change interface so that we can add to the end of a basic block
...
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().
llvm-svn: 11345
2004-02-12 08:11:04 +00:00
Brian Gaeke
7d1652ca5c
Remove this MachineOpCodeFlags assertion - its test can never be false.
...
llvm-svn: 11342
2004-02-12 04:01:07 +00:00
Alkis Evlogimenos
b755d35fd2
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke
4d67c9770d
getOpCode() --> getOpcode().
...
llvm-svn: 11339
2004-02-12 01:34:05 +00:00
Brian Gaeke
116a667130
MachineInstr::getOpCode() --> getOpcode() in SPARC back-end.
...
llvm-svn: 11335
2004-02-11 20:47:34 +00:00
Chris Lattner
2a50f8218a
s/getOpCode/getOpcode
...
llvm-svn: 11332
2004-02-11 19:26:28 +00:00
Chris Lattner
ffd9c8a00b
Cosmetic improvements to this option.
...
llvm-svn: 11331
2004-02-11 19:14:04 +00:00
Chris Lattner
66e7209785
Actually load profiling information now! Block layout can use real, live,
...
actual profile info, and works! :)
llvm-svn: 11324
2004-02-11 18:21:05 +00:00
Chris Lattner
16ad30203c
Fix a typeo
...
llvm-svn: 11323
2004-02-11 18:20:41 +00:00
Alkis Evlogimenos
fb5edb0b49
Increase constness.
...
llvm-svn: 11322
2004-02-11 17:55:09 +00:00
Chris Lattner
36f91c80f4
Fix copy-and-pastos
...
llvm-svn: 11319
2004-02-11 06:10:18 +00:00
Chris Lattner
c456d0cbc7
Add skeleton profileinfoloader pass. This will be enhanced to actually LOAD
...
a profile tommorow. :)
llvm-svn: 11318
2004-02-11 06:10:05 +00:00
Alkis Evlogimenos
4b4342e865
Remove assert as the only integer registers on the sparc are physical.
...
llvm-svn: 11317
2004-02-11 06:04:51 +00:00
Alkis Evlogimenos
30c37082ae
Fix previous broken commit. A MachineOperand may have opType ==
...
MO_VirtualRegister but if the register number is one of a physical
register is it considered as a physical register.
llvm-svn: 11315
2004-02-11 05:55:00 +00:00
Chris Lattner
427c8ee657
Factor this code out of llvm-prof
...
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner
5730220037
Remove obsolete comment. Unreachable blocks will automatically be left at the
...
end of the function.
llvm-svn: 11313
2004-02-11 05:20:50 +00:00
Chris Lattner
ca52c22356
Add an _embarassingly simple_ implementation of basic block layout. This is
...
more of a testcase for profiling information than anything that should reasonably
be used, but it's a starting point. When I have more time I will whip this into
better shape.
llvm-svn: 11311
2004-02-11 04:53:20 +00:00
Alkis Evlogimenos
d2edafbc32
Remove assert as it is meaningless. MachineOperands can be tagged as
...
MO_VirtualRegister but actually be representing a physical register.
llvm-svn: 11310
2004-02-11 04:52:30 +00:00
Chris Lattner
c9900e2eb3
Make sure to register the 'no profile' implementation as the default for ProfileInfo
...
llvm-svn: 11309
2004-02-11 04:47:54 +00:00
Chris Lattner
f8077b7801
Simplify implementation, and probably speed things up too.
...
llvm-svn: 11308
2004-02-11 03:57:16 +00:00