Commit Graph

445 Commits

Author SHA1 Message Date
Chris Lattner
1566d18fe2 custom lowered nodes are legal too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26561 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:49:19 +00:00
Chris Lattner
65e9f3969b add a hook to insert a noop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26560 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:48:51 +00:00
Evan Cheng
33143dce15 Number of NodeTypes now exceeds 128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:58:59 +00:00
Chris Lattner
00ffed0468 Add interfaces for targets to provide target-specific dag combiner optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:52:55 +00:00
Evan Cheng
bf57e1f456 Missing a cast previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 00:58:54 +00:00
Chris Lattner
5ee3e14127 Add C_Memory operand type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26344 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 01:10:14 +00:00
Evan Cheng
4c1aa86657 - Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 20:19:42 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
1efa40f6a4 split register class handling from explicit physreg handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:56:39 +00:00
Chris Lattner
16d597a20d expose the set of values types holdable in a regclass to clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:51:58 +00:00
Chris Lattner
aba3b13fb3 Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
select different sets of registers depending on the type requested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:10:29 +00:00
Evan Cheng
c9fdea915a Move PICEnabled declaration here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:06:03 +00:00
Nate Begeman
70804d3e14 Fix a nit sabre noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 18:06:19 +00:00
Nate Begeman
368e18d56a Rework the SelectionDAG-based implementations of SimplifyDemandedBits
and ComputeMaskedBits to match the new improved versions in instcombine.
Tested against all of multisource/benchmarks on ppc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:11:51 +00:00
Evan Cheng
a03a5dc7ce Rename maxStoresPerMemSet to maxStoresPerMemset, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26174 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:38:30 +00:00
Chris Lattner
eac707f702 getConstraintType should be virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 20:13:44 +00:00
Chris Lattner
c991cf58aa Add some methods for inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 02:12:09 +00:00
Nate Begeman
de99629e2a Add a framework for eliminating instructions that produces undemanded bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-03 22:24:05 +00:00
Chris Lattner
af9fa2bd0c Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,
a far more logical place.  Other methods should also be moved if anyone
is interested. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25912 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 20:11:55 +00:00
Chris Lattner
679836360a add a new isStoreToStackSlot method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 19:55:29 +00:00
Chris Lattner
cb0b555663 Clear the OpAction field before setting it. This allows a target to set
an instruction operation action to Expand, then set it to Legal later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 06:09:03 +00:00
Chris Lattner
553d8007ad Move MaskedValueIsZero from the DAGCombiner to the TargetLowering interface,
making isMaskedValueZeroForTargetNode simpler, and useable from other parts
of the compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 04:08:18 +00:00
Chris Lattner
030dae5bce Pass the address of the main MaskedValueIsZero function to allow recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 03:48:36 +00:00
Chris Lattner
e3bd778e4d Clean up the interface to ValueTypeActions, allowing Legalize to use a copy
of it more cleanly.  Double the size of OpActions, allowing it to hold actions
for any VT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 08:40:37 +00:00
Chris Lattner
7e871b28a2 remove this method I just added, now is not the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:43:33 +00:00
Chris Lattner
4f16e70faa add a new callback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:37:03 +00:00
Nate Begeman
0aed7840ec Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:14:31 +00:00
Nate Begeman
ee625573b5 Remove TLI.LowerReturnTo, and just let targets custom lower ISD::RET for
the same functionality.  This addresses another piece of bug 680.  Next,
on to fixing Alpha VAARG, which I broke last time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 21:09:22 +00:00
Chris Lattner
4ed88eb822 Add a common INLINEASM opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 23:27:02 +00:00
Jeff Cohen
9471c8a93b Improve compatibility with VC2005, patch by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:41:32 +00:00
Chris Lattner
bc9ae377d9 Add a method for inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 20:27:33 +00:00
Nate Begeman
acc398c195 First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:21:52 +00:00
Evan Cheng
d854b62afa Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 09:09:02 +00:00
Chris Lattner
2790383f73 Add a new InvalidateStructLayoutInfo method and some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 00:06:42 +00:00
Chris Lattner
d90ef9ef2b Provide an interface for Targets to specify their stack pointer register
for llvm.stacksave/restore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 17:47:52 +00:00
Jeff Cohen
9337de8651 Oh oh... Unix is case sensitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:46:59 +00:00
Jeff Cohen
f31a60cd71 Make it compile with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:44:51 +00:00
Evan Cheng
c85b33f264 Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 23:15:41 +00:00
Evan Cheng
7226158d7e Added a hook to print out names of target specific DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24877 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 06:22:03 +00:00
Nate Begeman
6510b22cec Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 04:51:06 +00:00
Nate Begeman
6a648614e8 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 05:45:29 +00:00
Nate Begeman
395cba8d41 Teach the type lowering code about turning packed types into vector types.
Next step: generating vector dag nodes, and legalizing them into scalar
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 21:44:42 +00:00
Chris Lattner
df2e425f2a Add a new option to indicate we want the code generator to emit code quickly,
not spending tons of time microoptimizing it.  This is useful for an -O0
style of build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24235 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:12:47 +00:00
Jeff Cohen
be07f72ca2 <cassert> no longer required to make VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24177 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 02:59:16 +00:00
Duraid Madina
0954038705 change NULL to 0, unbreaks the ppc target when building on ia64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24176 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 01:45:04 +00:00
Jim Laskey
7f39c14f52 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24172 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 22:47:41 +00:00
Jeff Cohen
55d1728ec8 Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24148 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 04:03:16 +00:00
Jim Laskey
6cee630070 Allow itineraries to be passed through the Target Machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24139 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 20:06:59 +00:00
Jim Laskey
15517be4bf Structures used to hold scheduling information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24049 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 18:18:05 +00:00
Jim Laskey
34bd5d5d87 Preparation of supporting scheduling info. Need to find info based on selected
CPU.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23974 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 15:15:28 +00:00
Chris Lattner
3e8d596ded Move static functions to .cpp file, reduce #includes, pass strings by
const&.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23890 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 05:25:19 +00:00
Nate Begeman
405e3ecb56 Invert the TargetLowering flag that controls divide by consant expansion.
Add a new flag to TargetLowering indicating if the target has really cheap
  signed division by powers of two, make ppc use it.  This will probably go
  away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23853 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 00:02:42 +00:00
Nate Begeman
d32d4a93f6 Enable targets to say that integer divide is expensive, which will trigger
an upcoming optimization in the DAG Combiner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23834 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-20 02:14:14 +00:00
Nate Begeman
4a95945fa5 Add the ability to lower return instructions to TargetLowering. This
allows us to lower legal return types to something else, to meet ABI
requirements (such as that i64 be returned in two i32 regs on Darwin/ppc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23802 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18 23:23:37 +00:00
Chris Lattner
a385bf7b6d Fix case of path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23605 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 03:32:39 +00:00
Chris Lattner
9390368970 This member can be const too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23600 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 00:21:25 +00:00
Chris Lattner
4c225baa3e Expose the actual valuetype of each register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23583 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-02 06:23:19 +00:00
Chris Lattner
0f21fd5204 Rename MRegisterDesc -> TargetRegisterDesc for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23564 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 17:49:27 +00:00
Chris Lattner
2f02ed9a1f trim down the target info structs now that we have a preferred spill register class for each callee save register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23560 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 17:35:22 +00:00
Chris Lattner
2f9dbe8ee6 expose a new virtual method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 07:06:37 +00:00
Chris Lattner
294f41d5fc Change these methods to take RC's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23535 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 01:28:14 +00:00
Chris Lattner
5e93fbe68c Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23479 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 22:13:36 +00:00
Chris Lattner
7d3041e060 add a new callback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23373 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-17 01:02:45 +00:00
Jim Laskey
839615a510 Add help support for -mcpu and -mattr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23222 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 19:27:43 +00:00
Chris Lattner
0271077eba Move a bunch of non-deprecated methods above the "deprecated line"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23216 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 18:16:20 +00:00
Jeff Cohen
7cd57f4c45 Fix VC++ build errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 02:51:42 +00:00
Jim Laskey
b1e1180ca0 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23192 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-01 21:38:21 +00:00
Jim Laskey
b3302db18a This new class provides support for platform specific "features". The intent
is to manage processor specific attributes from the command line.  See examples
of use in llc/lli and PowerPCTargetSubtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23191 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-01 21:36:18 +00:00
Reid Spencer
0f9beca707 Change the names of member variables per Chris' instructions, and document
them more clearly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23118 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-27 19:09:02 +00:00
Chris Lattner
050967c4d1 add some forward defs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23100 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 21:06:40 +00:00
Chris Lattner
8fae46675d spell this right!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23097 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:53:44 +00:00
Chris Lattner
a8fbee6f09 Add a hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23096 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:53:09 +00:00
Chris Lattner
09321dcf5a Add a new instruction flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23093 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:31:24 +00:00
Chris Lattner
de6a4bc058 rename hasNativeSupportFor* -> is(Operation|Type)Legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23011 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-24 16:34:59 +00:00
Chris Lattner
ae72f4a642 Add a new field to TargetInstrDescriptor for tracking information about
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22908 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 16:56:26 +00:00
Nate Begeman
73bfa71524 Remove the X86 and PowerPC Simple instruction selectors; their time has
passed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22886 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-18 23:53:15 +00:00
Chris Lattner
5ab8363206 Since getSubtarget() always provides a const Subtarget, dont' require the user
to pass it in.  Also, since it always returns a non-null pointer, make it
return a reference instead for easier use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22686 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-05 21:53:21 +00:00
Jeff Cohen
9eb59ec548 Eliminate tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 05:53:44 +00:00
Andrew Lenharth
6a6b2dbd3a allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22496 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-22 20:46:42 +00:00
Reid Spencer
a0f5bf306c For: memory operations -> stores
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset,
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations.
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-19 04:52:44 +00:00
Nate Begeman
8d2623d49a Clean up and add comments to the newly implemented subtarget code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 03:04:49 +00:00
Nate Begeman
0e219eb9b8 Clean up the TargetSubtarget class a bit, removing an unnecessary argument
to the constructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 02:41:19 +00:00
Nate Begeman
fb5792f416 Implement Subtarget support
Implement the X86 Subtarget.

This consolidates the checks for target triple, and setting options based
on target triple into one place.  This allows us to convert the asm printer
and isel over from being littered with "forDarwin", "forCygwin", etc. into
just having the appropriate flags for each subtarget feature controlling
the code for that feature.

This patch also implements indirect external and weak references in the
X86 pattern isel, for darwin.  Next up is to convert over the asm printers
to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 01:41:54 +00:00
Chris Lattner
e64e72b794 Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-05 19:57:53 +00:00
Chris Lattner
33f80a8723 add some new file types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:31:43 +00:00
Chris Lattner
11f14c8be0 refactor these interfaces a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 02:47:50 +00:00
Andrew Lenharth
f542821385 header file changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22253 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:31:30 +00:00
Tanya Lattner
771c5c1819 Added ModuloSchedSB as a friend class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22237 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 03:59:51 +00:00
Chris Lattner
bc83996b31 Pass the dag into LowerOperation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 05:51:05 +00:00
Chris Lattner
adf6a965a3 Add an isTailCall flag to LowerCallTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21958 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 18:50:42 +00:00
Chris Lattner
b15a8f5f8c LowerCallTo now takes the cc to use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21901 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-12 19:57:08 +00:00
Chris Lattner
39d7f8f338 Add a little hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-12 02:02:21 +00:00
Chris Lattner
34f74a6162 Expose an option allowing unsafe math optimizations. Patch contributed by
Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21630 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-30 04:09:52 +00:00
Reid Spencer
a1aad3b0ed Shut GCC 4.0 up about classes that have virtual functions but a non-virtual
destructor. Just add the do-nothing virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21524 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 02:55:55 +00:00
Misha Brukman
446b5a9dd9 * The aesthetic police is on patrol!!...
* ... but it wasn't so busy as to not smell the roses and doxygenify comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21487 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 22:35:26 +00:00
Chris Lattner
3fa94bffcb Add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21486 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 22:20:22 +00:00
Misha Brukman
00876a2808 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21438 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:46:24 +00:00
Misha Brukman
34695381d6 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:59:05 +00:00
Nate Begeman
f8b02949e3 Make pattern isel default for ppc
Add new ppc beta option related to using condition registers
Make pattern isel control flag (-enable-pattern-isel) global and tristate
  0 == off
  1 == on
  2 == target default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-15 22:12:16 +00:00
Chris Lattner
7b5987d56e Allow targets which produce setcc results in non-MVT::i1 registers to describe
what the contents of the top bits of these registers are, in the common cases
of targets that sign and zero extend the results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21145 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-07 19:41:18 +00:00