Commit Graph

1894 Commits

Author SHA1 Message Date
Chris Lattner
cfb0fd2ce8 Add support for the new ConstantAggregateZero class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11473 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:54:27 +00:00
Chris Lattner
0e5b79c174 Implement llvm.(frame|return)address(0) correctly. They are used by the LLVM JIT, among other
applications


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 01:04:03 +00:00
Alkis Evlogimenos
b929bca027 Fix problem in DEBUG code. I could be pointing past the end and
dereferencing it causes an assertion error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11458 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 00:46:41 +00:00
Chris Lattner
96c3d2e2e7 Fix the 'have a framepointer' case, so that the frame pointer always points
to the old saved EBP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11455 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 00:15:37 +00:00
Alkis Evlogimenos
c81efdc59c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 00:03:15 +00:00
Chris Lattner
3193556387 Add support for the 'pop' instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 21:06:02 +00:00
Chris Lattner
e9dd84ea8a There is no reason to align the stack pointer if there are no callees of this
function!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 20:11:07 +00:00
Chris Lattner
bb07ef97cf 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11448 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 19:49:54 +00:00
Chris Lattner
300d0eda6f finegrainify namespacification, fix 80col prob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11445 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 06:00:36 +00:00
Chris Lattner
9f87a6ce6f Urg, right. These need an input value...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11443 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 04:47:23 +00:00
Chris Lattner
2a0f224ce9 Codegen llvm.memset into rep stos[bwd]. Simplify code for llvm.memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11442 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 04:46:05 +00:00
Chris Lattner
b89abef577 add 'rep stos[bwd]' instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 04:45:37 +00:00
Chris Lattner
fe1554a080 Add support for the returnaddress and frameaddress intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 02:55:36 +00:00
Alkis Evlogimenos
f81af21caf Use newly added next() and prior() utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11430 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 01:18:34 +00:00
Chris Lattner
4ef51373c4 Use intrinsic lowering like the rest of the backends. Get rid of crufty hacky
code that worked around problems in the mangler


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11426 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 00:31:10 +00:00
Chris Lattner
0712283e43 There is no need to emit a shift if the size is constant, which is common
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11420 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:36:47 +00:00
Chris Lattner
c01ab8f3e1 Moved directory, update makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11417 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:31:12 +00:00
Chris Lattner
76a92ae84a CBackend now lives here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11415 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:29:20 +00:00
Chris Lattner
f31182a531 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11409 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:18:48 +00:00
Chris Lattner
94f4f8ea10 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11405 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:00:29 +00:00
Alkis Evlogimenos
be766c7246 Remove getAllocatedRegNum(). Use getReg() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11393 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 21:01:20 +00:00
Chris Lattner
b4198a2880 Squish warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11375 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:14:50 +00:00
Chris Lattner
897bf0dea5 Fine grainify namespacification, prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11369 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 06:18:21 +00:00
Chris Lattner
f8cd9148f9 Add support for memcpy and memmove intrinsics. Why isn't the cwriter using
the intrinsiclowering code?? :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11362 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 23:13:33 +00:00
Chris Lattner
915e5e56d7 Add support for the rep movs[bwd] instructions, and emit them when code
generating the llvm.memcpy intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:53:22 +00:00
Alkis Evlogimenos
024126ee23 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().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11345 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 08:11:04 +00:00
Brian Gaeke
17247c64f2 Remove this MachineOpCodeFlags assertion - its test can never be false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11342 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 04:01:07 +00:00
Alkis Evlogimenos
c0b9dc5be7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 02:27:10 +00:00
Brian Gaeke
918cdd420b getOpCode() --> getOpcode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11339 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 01:34:05 +00:00
Brian Gaeke
12c1d2c25a MachineInstr::getOpCode() --> getOpcode() in SPARC back-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11335 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 20:47:34 +00:00
Chris Lattner
b009c0088c s/getOpCode/getOpcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 19:26:28 +00:00
Alkis Evlogimenos
6557262ee7 Increase constness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11322 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 17:55:09 +00:00
Alkis Evlogimenos
f8efea53c2 Remove assert as the only integer registers on the sparc are physical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11317 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 06:04:51 +00:00
Alkis Evlogimenos
af862116df 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11315 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 05:55:00 +00:00
Alkis Evlogimenos
ccd79f2c21 Remove assert as it is meaningless. MachineOperands can be tagged as
MO_VirtualRegister but actually be representing a physical register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11310 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 04:52:30 +00:00
Chris Lattner
6565043120 Expose the "Other" value type to tablegen targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11304 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 03:08:45 +00:00
Chris Lattner
61b08f193a Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11285 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:18:55 +00:00
Chris Lattner
9d58a500fc Stop using this method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11282 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:12:06 +00:00
Chris Lattner
c31ecb9aae Remove uses of MachineOperand::isVirtualRegister
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:55:47 +00:00
Chris Lattner
ebcd7941f0 Remvoe use of MO.isVirtualRegister(), turn an assertion into an assert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11280 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:47:24 +00:00
Chris Lattner
bd0485034c Remove use of isPhysicalRegister
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11277 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:35:42 +00:00
Chris Lattner
6d21518718 Don't use MachineOperator::is(Phys|Virt)Register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11276 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:31:28 +00:00
Chris Lattner
0bbf3052c2 Tighten up checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11274 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:25:13 +00:00
Chris Lattner
21e79cbacd Fix PR228: [sparc] Boolean constants are emitted as true and false
I will observe that the concept of using WriteAsOperand is completely broken,
but then we all knew that, didn't we?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 05:16:44 +00:00
Misha Brukman
2647c3925b Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 23:18:42 +00:00
John Criswell
ccb2a677af Fix PR#226: When emitting padding, always emit it as bytes. Bytes can be
placed into any alignment situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11247 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 22:15:33 +00:00
Brian Gaeke
f738db0818 Move InstrSchedule's iterator begin/end methods inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:42:46 +00:00
Brian Gaeke
0dc5753f2b Make SchedGraph::dump() use SchedGraphNodeCommon's const_iterator
instead of randomly groping about inside its outEdges array.
Make SchedGraph::addDummyEdges() use getNumOutEdges() instead of
outEdges.size().
Get rid of ifdefed-out code in SchedGraph::buildGraph().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11238 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:42:05 +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