Commit Graph

10315 Commits

Author SHA1 Message Date
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
Chris Lattner
6f3ff3e34d New testcase. The CFE should not generate illegal LLVM intrinsics, even if
the input program is horribly broken (like 126.gcc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11401 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 22:04:41 +00:00
John Criswell
0021c31b60 Added check for target machine endian-ness and put the result into
Makefile.config (ENDIAN variable is set to big or little).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 21:57:29 +00:00
Chris Lattner
339d8df4c0 Add support for a bunch more functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 21:21:48 +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
Alkis Evlogimenos
903b22cd51 Mark MachineBasicBlock::operator[] deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11392 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 20:05:56 +00:00
Alkis Evlogimenos
bccab5ed5e Define DEPRECATED so that it can be used in function and variable
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 20:05:44 +00:00
Chris Lattner
68300db685 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11390 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 20:05:32 +00:00
Alkis Evlogimenos
4de473bc59 Use getNumVirtualRegs().
Whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 18:20:47 +00:00
Alkis Evlogimenos
87af94b291 Add getNumVirtualRegs().
Whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11388 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 18:07:06 +00:00
Chris Lattner
4b2b684b9f Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11385 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 17:03:01 +00:00
Chris Lattner
494b6920b0 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11384 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:47:35 +00:00
Chris Lattner
0db085baec Intrinsic functions cannot throw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:46:46 +00:00
John Criswell
3ff6dddc05 Updated to list all code/directories that have additional or alternate
licensing information.

Also added note to indicate that warrany disclaimer and the no-endorsement
clause applies to everything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11382 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:46:05 +00:00
Chris Lattner
bd8c456274 Bug fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11381 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:40:24 +00:00
Chris Lattner
f5761a5e68 exit(1) instead of abort()'ing on error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11380 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:37:43 +00:00
Chris Lattner
83fe91797a Fix buggy error message problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11379 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:33:56 +00:00
Misha Brukman
a92666decd Fix spelling of `tendency'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11378 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:23:14 +00:00
Chris Lattner
fdd13f6afe Expose a pass ID for lower-invoke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:16:35 +00:00
Chris Lattner
cefc18e7d9 Expose a pass ID that can be 'required'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:16:16 +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
a07b72ff3d Restructure code to handle memcpy/memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11374 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:09:54 +00:00
Chris Lattner
c201a7a911 Right, memcpy READS memory too :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11373 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:09:37 +00:00
Chris Lattner
7f007250e1 New testcase for support for memcpy/memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11372 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:04:51 +00:00
Brian Gaeke
e62589058c 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??)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11370 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 06:18:39 +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
Brian Gaeke
d8400d86dd The Interpreter was failing the AtExit UnitTest. This fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11367 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 05:48:00 +00:00
Brian Gaeke
a0031cc08c Update the example here in the header file.
I don't know about you guys, but I rarely read the .html manuals :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:49:04 +00:00
Brian Gaeke
f13a3f4dd1 Include <iosfwd>.
Add prototypes for MachineBasicBlock's dump() and print() methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11365 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:40:15 +00:00
Brian Gaeke
90421cd8f9 Refactor MachineFunction::print() into MachineBasicBlock::print().
Add MachineBasicBlock::dump().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11364 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:39:55 +00:00
Brian Gaeke
21326fc2ad 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().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11363 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:39:32 +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
3bc657934f New features
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11361 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 21:21:17 +00:00
Chris Lattner
3301ced603 Be a bit more specific about what the alignment value means and the restrictions on it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 21:18:15 +00:00
Chris Lattner
7266f41e56 New testcase for PR233: [llvmgcc] Structure copies result in a LOT of code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 21:06:52 +00:00
Alkis Evlogimenos
94dc07728f Move ilist_trairs<MachineInstr> in MachineBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11358 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos
ab8672c8bb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11357 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:49:07 +00:00
John Criswell
aa55c8cc38 Fixed minor typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:11:53 +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
0eb51b440c Add support for the llvm.memmove intrinsic.
Patch graciously contributed by Reid Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:10:10 +00:00
Chris Lattner
5ab827ff4a Urg, check in header I forgot. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:57:11 +00:00
Chris Lattner
cb7cb71bc8 Test that we get rep movs when calling memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:53:43 +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
Chris Lattner
33aec9efa9 Document the llvm.memcpy intrinsic. Clean up some of the formatting of other
sections


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11350 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:01:32 +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
2a90ba6017 Rename the opCode instance variable to Opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11348 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 16:09:53 +00:00
Chris Lattner
9fc77d1358 Remove a dead field from MachineInstr!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 16:05:03 +00:00
Chris Lattner
3081db8d01 This field is never read
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11346 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 16:04:49 +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
0eda78a372 Add one more doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 04:26:49 +00:00