Commit Graph

581 Commits

Author SHA1 Message Date
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
Jim Laskey
fde1b3bb2f 1. Remove condition on delete.
2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 23:39:26 +00:00
Jim Laskey
a0f3d17daa Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 22:06:40 +00:00
Jim Laskey
ec0d9fe2b2 Separate target specifc asm properties from asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30127 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:35:33 +00:00
Duraid Madina
2a0013f59f add setJumpBufSize() and setJumpBufAlignment() to target-lowering.
Call these from your backend to enjoy setjmp/longjmp goodness, see
lib/Target/IA64/IA64ISelLowering.cpp for an example


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 06:21:35 +00:00
Chris Lattner
1911fd4f85 Completely rearchitect the interface between targets and the pass manager.
This pass:

1. Splits TargetMachine into TargetMachine (generic targets, can be implemented
any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by
things using libcodegen and other support).
2. Instead of having each target fully populate the passmgr for file or JIT
   output, move all this to common code, and give targets hooks they can
   implement.
3. Commonalize the target population stuff between file emission and JIT
   emission.
4. All (native code) codegen stuff now happens in a FunctionPassManager, which
   paves the way for "fast -O0" stuff in the CFE later, and now LLC could
   lazily stream .bc files from disk to use less memory.
5. There are now many fewer #includes and the targets don't depend on the
   scalar xforms or libanalysis anymore (but codegen does).
6. Changing common code generator pass ordering stuff no longer requires
   touching all targets.
7. The JIT now has the option of "-fast" codegen or normal optimized codegen,
   which is now orthogonal to the fact that JIT'ing is being done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:14:57 +00:00
Chris Lattner
07ac914973 Eliminate target name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 18:44:26 +00:00
Chris Lattner
3bca110dc3 update some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29853 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 00:21:32 +00:00
Chris Lattner
5ea64fd9eb Constify some methods. Patch provided by Anton Vayvod, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 22:00:08 +00:00
Chris Lattner
6c8d90d65f Doxygenify some methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29592 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-10 06:00:40 +00:00
Chris Lattner
1eaf0ac1dc update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29507 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 18:57:28 +00:00
Chris Lattner
fb1fcf08c9 remove some more dead sparcv9 support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 18:55:44 +00:00
Evan Cheng
f141cc46fa Resolve BB references with relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 18:21:10 +00:00
Evan Cheng
55b5053b8e Move synchronizeICache from TargetJITInfo into a static function in JITEmitter.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:33:55 +00:00
Chris Lattner
35d86fef1f Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 21:12:04 +00:00
Evan Cheng
55fc28076f - Refactor the code that resolve basic block references to a TargetJITInfo
method.
- Added synchronizeICache() to TargetJITInfo. It is called after each block
  of code is emitted to flush the icache. This ensures correct execution
  on targets that have separate dcache and icache.
- Added PPC / Mac OS X specific code to do icache flushing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-25 20:40:54 +00:00
Jim Laskey
60f09928a0 Use an enumeration to eliminate data relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 20:57:35 +00:00
Evan Cheng
3b0c0148ed Make sub- and super- register classes const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 05:58:18 +00:00
Evan Cheng
152ed05353 Added option -code-model to set code model (only used in 64-bit) mode. Valid
values include small, kernel, medium, large, and default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 01:53:36 +00:00
Evan Cheng
61496683b3 Clean up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 01:42:20 +00:00
Chris Lattner
c91dc678e9 Simplify the targetdata ctor by not passing in a "targetname" which is always
ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:21:53 +00:00
Chris Lattner
acbc07aa22 Remove ctor with each piece specifyable (which causes overload ambiguities),
add a new init method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28828 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:11:26 +00:00
Evan Cheng
f4432fac14 Avoid undesirable behavior when assert is not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28793 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:27 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Andrew Lenharth
232c910b8a Start on my todo list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 16:07:18 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Evan Cheng
80235d508e -enable-unsafe-fp-math implies -enable-finite-only-fp-math
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 18:18:46 +00:00
Evan Cheng
95942d76f4 Added option -enable-finite-only-fp-math. When on, the codegen can assume that
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 06:39:12 +00:00
Owen Anderson
bcd8a8264e Make TargetData strings less redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28423 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-20 23:28:54 +00:00