Commit Graph

609 Commits

Author SHA1 Message Date
Anton Korobeynikov
b25fe82671 Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 08:39:52 +00:00
Chris Lattner
94c002a190 rename DenseMap to IndexedMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 05:32:05 +00:00
Evan Cheng
d385fd62cb Allow the target to override the ISD::CondCode that's to be used to test the
result of the comparison libcall against zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33701 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 09:29:11 +00:00
Nate Begeman
bcc5f36765 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 22:58:52 +00:00
Jim Laskey
1b340dc8e2 Flag to control exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33628 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 20:48:32 +00:00
Jim Laskey
072200c36d Landing pad-less eh for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33622 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 18:51:14 +00:00
Anton Korobeynikov
b10308e440 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Bill Wendling
98b5795f62 Accessor for the TargetELFWriterInfo class object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 02:55:04 +00:00
Bill Wendling
4f45222baa The TargetELFWriterInfo class holds target-specific information for the ELF writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33570 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 02:53:50 +00:00
Jim Laskey
1ee2925742 Make LABEL a builtin opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 14:34:52 +00:00
Evan Cheng
02a2029141 Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 22:12:41 +00:00
Jim Laskey
5e73d5bd2e 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.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:45:13 +00:00
Bill Wendling
2b7218218f Make ivars private and use getters. Have the MachOWriter return "Mach-O
Writer" for the pass name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:13:56 +00:00
Evan Cheng
de268f7dcf Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:03:39 +00:00
Bill Wendling
8f5159e6b2 A virtual method to return the TargetMachOWriterInfo object. This returns
a real value in derived classes, of course.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:38:14 +00:00
Bill Wendling
841056a2ad New "TargetMachOWriterInfo" class. It holds target-specific information
that the MachOWriter needs in order to do its writing stuff 'n things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:36:05 +00:00
Evan Cheng
dc77540d95 hasFP() is now a virtual method of MRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 00:57:47 +00:00
Evan Cheng
9b631a58ef Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33450 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:14:52 +00:00
Reid Spencer
7c29243670 Implement a getTypeSizeInBits method. This helps in transforms that want
to ensure the bit size of a type is identical before proceeding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33413 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 23:32:04 +00:00
Owen Anderson
1027a533d4 TargetData assumes (and some regression tests depend on it) that the size of
an unspecified datatype in the datalayout is capped by the size of a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 23:07:13 +00:00
Chris Lattner
58092e35a3 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 22:35:55 +00:00
Chris Lattner
393a8eea3c add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:12:56 +00:00
Chris Lattner
c099e49f57 document that BSSSection can be null.
Add new ZeroFillDirective directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 17:42:30 +00:00
Anton Korobeynikov
292a007c94 Document flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 10:40:54 +00:00
Anton Korobeynikov
5032e5a613 * Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 10:33:08 +00:00
Bill Wendling
e911615c47 Revert patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 09:06:13 +00:00
Chris Lattner
c49e1eb8cc make doxygen comment much better. Patch by B. Scott Michel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33294 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 07:28:48 +00:00
Bill Wendling
3007f7a30e The TargetObjInfo object goes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:48:29 +00:00
Bill Wendling
34f03fff2d New "TargetObjInfo" class. This holds information that the object writers will
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:46:30 +00:00
Bill Wendling
eb9a42c90b Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 03:42:04 +00:00
Chris Lattner
9784bc73c3 add a new HiddenDirective member for handling visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:27:21 +00:00
Reid Spencer
c254b1d666 Don't #include DerivedTypes.h in this header. Make adjustments to
compensate. Move a function out of line to TargetLowering.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:21:42 +00:00
Evan Cheng
495600120e - Move RTLIB::Libcall enum to a separate file.
- Code clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:49:32 +00:00
Evan Cheng
9f7f49caa4 Silence a bogus compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33145 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:30:07 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Evan Cheng
56966225d1 Store default libgcc routine names and allow them to be redefined by target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 02:11:51 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Evan Cheng
257464a072 - Remove isSetCCExpensive() etc. These are no longer used.
- Add isSelectExpensive() etc. It's used to tell codegen that select is expensive for a given target, avoid using it if possible. Currently it's only
used to expand FCOPYSIGN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 23:31:08 +00:00
Evan Cheng
0098b3e2b6 Fix naming inconsistency: calleesave -> calleesaved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32821 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:30:17 +00:00
Evan Cheng
ebdf389e2f Add virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
to MRegisterInfo. These allow the target to issue instructions to spill and
restore callee saved registers in case where individual stores / loads aren't
the correct / profitable choice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32820 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 20:55:17 +00:00
Reid Spencer
2ba767f44a For PR950:
Change integer type names for signless integer types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:23:18 +00:00
Jim Laskey
7f44f6a8d9 Grandchildren are covered by protect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 21:24:35 +00:00
Jim Laskey
bf1118285c Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 20:26:09 +00:00
Bill Wendling
5c7e326585 Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 05:15:13 +00:00
Evan Cheng
f2f6a1baf7 Silly assertion. Forgot variable_ops instructions can have arbitrary number of
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32592 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 06:37:08 +00:00
Evan Cheng
975651ab98 Add getTypeToExpandTo() which recursively walks TransformToType to determine
the intrinsic type to expand to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32558 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 20:52:00 +00:00
Evan Cheng
6586adfc1a Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32532 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 06:12:35 +00:00
Evan Cheng
b9d89c9ffb Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32531 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 06:09:03 +00:00
Jim Laskey
3b1cf89edc Remove unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32489 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 19:36:53 +00:00
Jim Laskey
9a7dfa3fd4 Rollback changes to take a different tack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32488 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 19:26:50 +00:00
Jim Laskey
55a7ec33d7 Honor the command line specification for machine type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32483 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 16:07:33 +00:00
Anton Korobeynikov
d27a258d2d Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32415 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:12:42 +00:00
Evan Cheng
c9ab2f39ce Added option -soft-float to generate SW fp library calls instead of fp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32393 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 02:41:30 +00:00
Evan Cheng
cc22a7a2ad Move findTiedToSrcOperand to TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:45:48 +00:00
Evan Cheng
3cc3816cd4 Use MI's TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32352 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 07:57:56 +00:00
Evan Cheng
bd7b67fd37 Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:50:17 +00:00
Evan Cheng
6c14147d93 - Add getOperandConstraint() to TargetInstrDescriptor.
- convertToThreeAddress() change to allow single two-address MI to be converted
  into one or more 3-address MIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32094 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:46:55 +00:00
Evan Cheng
8752ce61e1 Add weak reference directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 20:47:11 +00:00
Chris Lattner
3f7927c84c add a hook to allow targets to hack on inline asms to lower them to llvm
when they want to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31997 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:12:32 +00:00
Andrew Lenharth
3655de6873 Add per-target support for asm translation in the cbe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:52:20 +00:00
Evan Cheng
33247d537d Add opcode to TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 01:36:01 +00:00
Evan Cheng
5ff839fbab Add a mechanism to specify whether a target supports a particular indexed load / store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 18:56:43 +00:00
Evan Cheng
144d8f09e1 Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31595 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 17:55:04 +00:00
Evan Cheng
d258efaf6e getPostIndexedAddressParts change: passes in load/store instead of its loaded / stored VT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31584 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 04:29:46 +00:00
Evan Cheng
a1fd6504aa Remove M_2_ADDR_FLAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31583 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 02:22:54 +00:00
Evan Cheng
a7bb6498fe Added target hook for post-indexed memory ops transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31499 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 09:04:16 +00:00
Chris Lattner
f6e8e6bace Add a new operand flag to mark which operand is the first predicate operand
of an M_PREDICATED instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31482 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-06 23:53:08 +00:00
Chris Lattner
1b1b737d7d add a flag so that predicated instructions can be recognized by branch
folding


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-06 21:44:17 +00:00
Evan Cheng
1a854be352 Rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31413 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 07:21:16 +00:00
Evan Cheng
24d9cf025d Added a target specific hook to check whether / how a node can be transformed
into a pair of base / offset nodes for pre-indexed load / store ops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31407 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 03:04:06 +00:00
Chris Lattner
a74b4a3ddc generalize this api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:39:10 +00:00
Evan Cheng
e6ae14e1f4 Rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 23:18:32 +00:00
Evan Cheng
981b5bd708 Added getTiedToSrcOperand() to check for two-address'ness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31360 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 23:00:31 +00:00
Evan Cheng
e2ba897588 Add operand constraints to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 00:27:05 +00:00
Chris Lattner
dba1aeedd8 Change the prototype for TargetLowering::isOperandValidForConstraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 19:40:43 +00:00
Reid Spencer
6ac310d5e9 Don't mislead readers by claiming a variable is defaulted to false when
the default is actually true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:46:49 +00:00
Reid Spencer
02b8511364 Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:32:30 +00:00
Chris Lattner
c24ff8ed12 add another target hook for branch folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:29:57 +00:00
Evan Cheng
8d8c5976ab Added CStringSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31202 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 19:16:20 +00:00
Devang Patel
5f90cbc56a TargetData is not subclassed. So no need to have virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31173 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 20:48:29 +00:00
Devang Patel
f9c197e022 Move getPreferredAlignmentLog from AsmPrinter to TargetData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31171 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 20:32:14 +00:00
Chris Lattner
33644ba8d2 update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31165 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 17:41:22 +00:00
Rafael Espindola
24321d7e23 fix assert comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31154 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 14:47:28 +00:00
Chris Lattner
ae1dc40327 expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 22:41:45 +00:00
Chris Lattner
72dc585268 update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 22:12:15 +00:00
Evan Cheng
8b2794aeff Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 21:14:26 +00:00
Chris Lattner
d51c87f22f it is easier to implement these when they are virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30944 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 21:02:27 +00:00
Chris Lattner
5f1e4dbdf7 allow branch reversal to fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30943 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:59:31 +00:00
Chris Lattner
b2cd261279 replace the existing branch inspection/modification APIs with something more
useful and general.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30940 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:44:01 +00:00
Chris Lattner
4c7b07a66f Expose method and ivars for measuring inline asm length properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:50:07 +00:00
Evan Cheng
24446e253a Merging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
Chain and address ptr remains as operands. SrcValue, extending mode, extending
VT (or rather loaded VT before extension) are now instance variables of
LoadSDNode.

Introduce load / store addressing modes to represent pre- and post-indexed
load and store. Also added an additional operand offset that is only used in
post-indexed mode (i.e. base ptr += offset after load/store).

Added alignment info (not yet used) and isVolatile fields.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:55:20 +00:00
Chris Lattner
428e75eaef Add support for targets to declare that they use a GOT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:46:34 +00:00
Chris Lattner
671d77bc8e remove JumpTableTextSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30746 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:14:23 +00:00
Chris Lattner
1279b7c2a9 move getSectionForFunction to AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:41:43 +00:00
Chris Lattner
f5b10ec509 Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:35:16 +00:00
Evan Cheng
c548428c5d Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 00:56:09 +00:00
Evan Cheng
02569d7355 - Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
before it determines which callee-save registers are to be spilled. This allows
the target to make changes such as forcing certain physical registers to be
spilled.
- Modified comments. It's important to note the order of registers in the array
returns by getCalleeSaveRegs() determines the order of callee save spill code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:07:19 +00:00
Chris Lattner
cb05af852f Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:38:18 +00:00
Chris Lattner
384299ef45 order this properly to avoid warnings in TargetAsmInfo.cpp. Add a comment
in a format that matches every other ivars in this class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 22:38:36 +00:00
Andrew Lenharth
beec30eaf3 Add support for other relocation bases to jump tables, as well as custom asm directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 19:45:58 +00:00