Commit Graph

3265 Commits

Author SHA1 Message Date
Jim Laskey f970221c4d Slip up
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey 894ceb1c6f Emit labels as label_n and not as debug_n
llvm-svn: 33757
2007-02-01 17:46:10 +00:00
Jim Laskey c3de9b4b14 Support for non-landing pad exception handling.
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Anton Korobeynikov 1b4e6015b4 Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144

llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner 1003dc72b4 rename DenseMap to IndexedMap.
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner 296a83cefb Fit in 80 columns
llvm-svn: 33745
2007-02-01 04:55:59 +00:00
Chris Lattner e3eeb24a86 Emit a better assertion message for PR1133
llvm-svn: 33736
2007-02-01 01:21:12 +00:00
Evan Cheng 53026f1d5a Allow the target to override the ISD::CondCode that's to be used to test the
result of the comparison libcall against zero.

llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Reid Spencer 5301e7c605 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Chris Lattner d27f95e08d add initial support for handling inline asms with multiple constraints.
This doesn't do the "right thing" but will probably work in most cases.

This implements CodeGen/PowerPC/2007-01-29-lbrx-asm.ll.

llvm-svn: 33643
2007-01-29 23:45:14 +00:00
Jim Laskey ee23de6c36 Out of line function.
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Jim Laskey 3f9f250928 Only gather frame info if debug or eh.
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Nate Begeman eda5997cc8 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.

llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Nate Begeman 2a562ba47b Properly support cstrings
llvm-svn: 33629
2007-01-29 21:20:42 +00:00
Jim Laskey d1154860a4 Flag to control exception handling.
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Jim Laskey 18c3b5267d Disable zero landing pads for now.
llvm-svn: 33625
2007-01-29 20:01:41 +00:00
Jim Laskey b4a2f05d1c Landing pad-less eh for PPC.
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Reid Spencer d7035b654b Use TargetData to obtain the correct size of the "size_t" argument for
functions like memcpy, memmove and memset. Ensure only one prototype is
used for these functions and that it matches the system definition by
using the appropriate type for the size argument.

llvm-svn: 33618
2007-01-29 17:42:06 +00:00
Reid Spencer c7765617d2 For PR1138:
Force memcpy to be the 32-bit variant. Since this is only used with
CBE and lli which both target 32-bit machines, this should be okay.

llvm-svn: 33608
2007-01-28 22:28:00 +00:00
Anton Korobeynikov 06f7d4bec7 Arguments are counting from 1. not from 0. Maybe we should change
numbering somehow? E.g. make return argument the last?

llvm-svn: 33606
2007-01-28 18:01:49 +00:00
Anton Korobeynikov 9fa3839d29 More cleanup
llvm-svn: 33605
2007-01-28 16:04:40 +00:00
Anton Korobeynikov 037c867b54 Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Bill Wendling 3814e72ed1 Use TargetELFWriterInfo class.
llvm-svn: 33573
2007-01-27 02:55:44 +00:00
Nate Begeman f209495e93 Handle multiple functions, properly mangle symbols, and fix support for
scattered relocations.

llvm-svn: 33555
2007-01-26 22:39:48 +00:00
Jim Laskey 5a1df9748b rename files
llvm-svn: 33552
2007-01-26 21:38:26 +00:00
Jim Laskey c56315c2b5 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.

llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Jim Laskey f9e5445ed4 Make LABEL a builtin opcode.
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Jim Laskey f773e14547 Clarify some constants.
llvm-svn: 33536
2007-01-26 14:19:17 +00:00
Evan Cheng ae4ea45eaf Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.

llvm-svn: 33504
2007-01-25 22:12:41 +00:00
Jim Laskey ee132b5fce 1. Remove dwarf-verbose option (now asm-verbose.)
2. Clean up end of lines.

llvm-svn: 33499
2007-01-25 15:45:58 +00:00
Jim Laskey 1c055e8d14 Migrate print routines to asm to be shared by exception handling.
llvm-svn: 33498
2007-01-25 15:12:02 +00:00
Jim Laskey f6c63fec92 Repair debug frames as a prelude to eh_frames. Switched to using MachineMoves
by value so that clean up is less confusing (these vectors tend to be small.)

llvm-svn: 33488
2007-01-24 18:45:13 +00:00
Jim Laskey f6487ec894 Use asm printer to emit alignment
llvm-svn: 33485
2007-01-24 13:12:32 +00:00
Bill Wendling 06a03210af Make ivars private and use getters. Have the MachOWriter return "Mach-O
Writer" for the pass name.

llvm-svn: 33483
2007-01-24 07:13:56 +00:00
Evan Cheng f5c96fabf9 Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
llvm-svn: 33482
2007-01-24 07:03:39 +00:00
Bill Wendling 4905a473e8 Use the TargetMachOWriterInfo class to get this information.
llvm-svn: 33478
2007-01-24 03:38:47 +00:00
Evan Cheng 6730e12ae4 PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
llvm-svn: 33460
2007-01-23 09:38:11 +00:00
Chris Lattner 199818475b Switch this to use SmallSet to avoid mallocs in the common case.
llvm-svn: 33457
2007-01-23 00:59:48 +00:00
Chris Lattner d39e38848b Fix a bunch of inline asm failures
llvm-svn: 33454
2007-01-23 00:36:17 +00:00
Evan Cheng be48a47d9d Remove the DoubleTy special case.
llvm-svn: 33449
2007-01-22 23:13:55 +00:00
Reid Spencer 2eadb5310d For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!

llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Chris Lattner 50ee0e40e5 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Evan Cheng 00a640dbe0 Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
llvm-svn: 33398
2007-01-20 10:10:26 +00:00
Evan Cheng 887f75ac0a Remove an unused variable.
llvm-svn: 33396
2007-01-20 09:21:54 +00:00
Evan Cheng 7ab6fa3a67 We not align the final stack slot but instead let the target do so in emitPrologue(). Each target can make adjustments to the stack frame and re-align the stack as it deem appropriate. Do not align it twice which can end up wasting stack space.
llvm-svn: 33387
2007-01-20 02:07:13 +00:00
Evan Cheng fc74e2de26 GetRegForReload() now keeps track which registers have been considered and rejected during its quest to find a suitable reload register. This avoids an infinite loop in case like this:
t1 := op t2, t3
  t2 <- assigned r0 for use by the reload but ended up reuse r1
  t3 <- assigned r1 for use by the reload but ended up reuse r0
  t1 <- desires r1
        sees r1 is taken by t2, tries t2's reload register r0
        sees r0 is taken by t3, tries t3's reload register r1
        sees r1 is taken by t2, tries t2's reload register r0 ...

llvm-svn: 33382
2007-01-19 22:40:14 +00:00
Reid Spencer a94d394ad2 For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.

llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Evan Cheng 9201100b29 Remove this xform:
(shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)
Replace it with:
(add (shl (add x, c1), c2), ) -> (add (add (shl x, c2), c1<<c2), )

This fixes test/CodeGen/ARM/smul.ll

llvm-svn: 33361
2007-01-19 17:51:44 +00:00
Bill Wendling e750f61ac5 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
llvm-svn: 33316
2007-01-18 01:23:11 +00:00
Chris Lattner 0ee2d46cfe add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
llvm-svn: 33314
2007-01-18 01:12:56 +00:00