Commit Graph

1709 Commits

Author SHA1 Message Date
Nate Begeman
817affccd5 Add support for escaping {} in asm strings, based on patch from Nick Burns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-17 07:26:14 +00:00
Christopher Lamb
c929823525 Make insert_subreg a two-address instruction, vastly simplifying LowerSubregs pass. Add a new TII, subreg_to_reg, which is like insert_subreg except that it takes an immediate implicit value to insert into rather than a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48412 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 03:12:01 +00:00
Evan Cheng
20ccded7de Remove isImplicitDef TargetInstrDesc flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48381 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 00:19:36 +00:00
Evan Cheng
da47e6e0d0 Replace all target specific implicit def instructions with a target independent one: TargetInstrInfo::IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48380 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 00:03:38 +00:00
Christopher Lamb
6634e26aa1 Get rid of a pseudo instruction and replace it with subreg based operation on real instructions, ridding the asm printers of the hack used to do this previously. In the process, update LowerSubregs to be careful about eliminating copies that have side affects.
Note: the coalescer will have to be careful about this too, when it starts coalescing insert_subreg nodes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 05:47:01 +00:00
Christopher Lamb
5b4153710e Recommitting changes after more testing. These appear to cause no problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 09:33:47 +00:00
Chris Lattner
ca796402be emit an ID # for each regclass ID. Chris doesn't like to have to count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48200 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11 00:00:23 +00:00
Evan Cheng
4499e495ea Revert 48125, 48126, and 48130 for now to unbreak some x86-64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 19:31:26 +00:00
Tanya Lattner
c161188703 Add nosubmit option to control what is sent back to the results server.
Patch by Joachim Durchholz. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 07:28:08 +00:00
Christopher Lamb
02f693708d Revert accidentally committed local changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 04:16:09 +00:00
Christopher Lamb
620d741250 Add support in TableGen for unknown operands that infer their type from the pattern their used in. This will be used to allow insert/extract subreg patterns in .td files!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 04:13:41 +00:00
Dale Johannesen
b8cafe3427 Increase ISD::ParamFlags to 64 bits. Increase the ByValSize
field to 32 bits, thus enabling correct handling of ByVal
structs bigger than 0x1ffff.  Abstract interface a bit.
Fixes gcc.c-torture/execute/pr23135.c and 
gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing
on ppc32, quietly producing wrong code on x86-32.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 02:17:22 +00:00
Scott Michel
327d0651f8 This patch fixes a problem encountered by the CellSPU backend where variants
were being pruned in patterns where a variable was used more than once, e.g.:

  (or (and R32C:$rA, R32C:$rC), (and R32C:$rB, (not R32C:$rC)))

In this example, $rC is used more than once and is actually significant to
instruction selection pattern matching when commuted variants are produced.
This patch scans the pattern's clauses and collects the variables, creating
a set of variables that are used more than once. TreePatternNode::isIsomorphicTo()
also understands that multiply-used variables are significant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47950 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05 17:49:05 +00:00
Nick Kledzik
02e4e173bf install new lto dylib. pass down LLVM_SUBMIT_VERSION
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 19:32:13 +00:00
Nick Kledzik
ddb84f5c97 fix default RC_ProjectSourceSubversion to be zero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 19:30:23 +00:00
Bill Wendling
e6d088acc9 Rename PrintableName to Name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47629 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 21:47:57 +00:00
Bill Wendling
74ab84c31e Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool
would have been a Godsend here!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 21:11:01 +00:00
Bill Wendling
27926af828 De-tabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47595 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 10:45:29 +00:00
Bill Wendling
181eb737b2 Some platforms use the same name for 32-bit and 64-bit registers (like
%r3 on PPC) in their ASM files. However, it's hard for humans to read
during debugging. Adding a new field to the register data that lets you
specify a different name to be printed than the one that goes into the
ASM file -- %x3 instead of %r3, for instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47534 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-24 00:56:13 +00:00
Anton Korobeynikov
ae9f3a3b7c Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Scott Michel
0123b7dcfa Make tblgen a little smarter about constants smaller than i32. Currently,
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.

tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:

	(XORHIr16 R16C:$rA, 0xffff)

which is somewhat clearer and more informative than incanting:

	(XORHIr16 R16C:$rA, (i16 -1))

even if the two are bitwise equivalent.

Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47188 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15 23:05:48 +00:00
Dale Johannesen
db01c8ba26 Rewrite tblgen handling of subtarget features so
it follows the order of the enum, not alphabetical.
The motivation is to make -mattr=+ssse3,+sse41
select SSE41 as it ought to.  Added "ignored"
enum values of 0 to PPC and SPU to avoid compiler
warnings.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 23:35:16 +00:00
Nate Begeman
e179584f9b Change how FP immediates are handled.
1) ConstantFP is now expand by default
2) ConstantFP is not turned into TargetConstantFP during Legalize
   if it is legal.

This allows ConstantFP to be handled like Constant, allowing for 
targets that can encode FP immediates as MachineOperands.

As a bonus, fix up Itanium FP constants, which now correctly match,
and match more constants!  Hooray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47121 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 08:57:00 +00:00
Devang Patel
2be680481b Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12 18:20:50 +00:00
Dan Gohman
6f0d024a53 Rename MRegisterInfo to TargetRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-10 18:45:23 +00:00
Nate Begeman
b5af3344c1 Tablegen support for insert & extract element matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46901 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09 01:37:05 +00:00
Dan Gohman
69de1932b3 Re-apply the memory operand changes, with a fix for the static
initializer problem, a minor tweak to the way the
DAGISelEmitter finds load/store nodes, and a renaming of the
new PseudoSourceValue objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06 22:27:42 +00:00
Evan Cheng
a58891ff1e Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05 22:50:29 +00:00
Evan Cheng
4e3f5a4e9c Dwarf requires variable entries to be in the source order. Right now, since we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 23:06:48 +00:00
Chris Lattner
f8dc0617ba Change the 'global modification' APIs in SelectionDAG to take a new
DAGUpdateListener object pointer instead of just returning a vector 
of deleted nodes.  This makes the interfaces more efficient (no more
allocating a vector [at least a malloc], filling it in, then walking
it) and more clean.  This also allows the client to be notified of
nodes that are *changed* but not deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-03 06:49:24 +00:00
Evan Cheng
4eecdeb3fa Get rid of the annoying blank lines before labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02 08:39:46 +00:00
Evan Cheng
a844bdeab3 SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02 04:07:54 +00:00
Evan Cheng
334dc1f58d Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 21:00:00 +00:00
Evan Cheng
bb81d97feb Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 09:59:15 +00:00
Christopher Lamb
8535624739 Allow ComplexExpressions in InstrInfo.td files to be slightly more... complex! ComplexExpressions can now have attributes which affect how TableGen interprets
the pattern when generating matchin code. 

The first (and currently, only) attribute causes the immediate parent node of the ComplexPattern operand to be passed into the matching code rather than the node at the root of the entire DAG containing the pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 07:27:46 +00:00
Dan Gohman
c6c391dadd Create a new class, MemOperand, for describing memory references
in the backend. Introduce a new SDNode type, MemOperandSDNode, for
holding a MemOperand in the SelectionDAG IR, and add a MemOperand
list to MachineInstr, and code to manage them. Remove the offset
field from SrcValueSDNode; uses of SrcValueSDNode that were using
it are all all using MemOperandSDNode now.

Also, begin updating some getLoad and getStore calls to use the
PseudoSourceValue objects.

Most of this was written by Florian Brander, some
reorganization and updating to TOT by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 00:25:39 +00:00
Devang Patel
c60141ba43 Always put version numbers at the end because they are optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 18:30:11 +00:00
Dan Gohman
0e9dfb0900 Update this file for 2.0 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:35:50 +00:00
Scott Michel
6be48d49cf Fix to bug 1951: tblgen gratuitously renames variables when no temporary was
generated. This feature would only show up in fairly complex patterns, such
as this one in CellSPU:

  def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
	    (IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;

which generated the following emit code:

SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
  SDOperand N0 = N.getOperand(0);
  SDOperand N00 = N0.getOperand(0);
  SDOperand N01 = N0.getOperand(1);
  SDOperand N1 = N.getOperand(1);
  SDOperand N10 = N1.getOperand(0);
  SDOperand N11 = N1.getOperand(1);
  SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
  return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
}

Tested against the test suites without incident.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:29:31 +00:00
Anton Korobeynikov
7674b9d297 Add interator interface to DAGInit also
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46250 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22 11:00:07 +00:00
Anton Korobeynikov
82137bd061 Provide iterator access to ListInit contents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-21 22:30:26 +00:00
Evan Cheng
b4eae999f6 Fix makefiles to enable Apply style debug build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-18 21:01:00 +00:00
Devang Patel
3de01e10ae Enable CBE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46112 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-17 02:10:08 +00:00
Chuck Rose III
9a79de3d09 Add files to windows project files. Also include <algorithm> explicitly so that vstudio build works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46013 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:43:17 +00:00
Evan Cheng
6bfa8a121d Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove unused parameters of CCStructAssign and add size and alignment requirement info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:34:58 +00:00
Evan Cheng
5daafa9b1b Revert my last commit. Not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:10:35 +00:00
Evan Cheng
3d64f1c018 Need a space to separate Make options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 17:58:03 +00:00
Evan Cheng
e04c90bde5 Add -disable-lto optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45900 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 04:27:18 +00:00
Evan Cheng
01b8fccca0 ByVal arguments are passed on stack. Make sure to allocate a slot using size and alignment information on the parameter attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45897 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 01:07:41 +00:00
Chris Lattner
a22edc82ca Simplify the side effect stuff a bit more and make licm/sinking
both work right according to the new flags.

This removes the TII::isReallySideEffectFree predicate, and adds
TII::isInvariantLoad. 

It removes NeverHasSideEffects+MayHaveSideEffects and adds
UnmodeledSideEffects as machine instr flags.  Now the clients
can decide everything they need.

I think isRematerializable can be implemented in terms of the
flags we have now, though I will let others tackle that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 23:08:24 +00:00
Chris Lattner
ba7e756c22 Start inferring side effect information more aggressively, and fix many bugs in the
x86 backend where instructions were not marked maystore/mayload, and perf issues where
instructions were not marked neverHasSideEffects.  It would be really nice if we could
write patterns for copy instructions.

I have audited all the x86 instructions down to MOVDQAmr.  The flags on others and on
other targets are probably not right in all cases, but no clients currently use this
info that are enabled by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45829 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 07:59:24 +00:00
Chris Lattner
811281e788 Fix a crash on code like: let x = 1 {x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 07:01:53 +00:00
Chris Lattner
214884ba03 if an instr lacks a pattern, assume it has side effects (unless never has s-e is true).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45823 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 05:40:54 +00:00
Chris Lattner
bc0b9f70ae start inferring 'no side effects'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 05:39:30 +00:00
Chris Lattner
8926038785 Infer mayload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45819 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 04:44:48 +00:00
Chris Lattner
710e995889 realize that instructions who match intrinsics that read memory read memory.
Also, instructions with any nodes that are SDNPMayLoad also read memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45817 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10 04:38:57 +00:00
Chris Lattner
dcc8b4f5d3 add a mayLoad property for machine instructions, a correlary to mayStore.
This is currently not set by anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08 18:05:21 +00:00
Chris Lattner
749c6f6b5e rename TargetInstrDescriptor -> TargetInstrDesc.
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 07:27:27 +00:00
Chris Lattner
0ff23966fe Rename all the M_* flags to be namespace qualified enums, and switch
all clients over to using predicates instead of these flags directly.
These are now private values which are only to be used to statically
initialize the tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 06:42:05 +00:00
Chris Lattner
8f707e15fb rename hasVariableOperands() -> isVariadic(). Add some comments.
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 05:19:29 +00:00
Chris Lattner
4764189298 Move M_* flags down in the file. Move SchedClass up in the
TargetInstrDescriptor class and shrink to 16-bits, saving a 
word in TargetInstrDescriptor.  Add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 05:06:49 +00:00
Chris Lattner
af3eb7c758 the name field of instructions is never set to a non-empty string,
just unconditionally use the def name of the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45684 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 04:57:31 +00:00
Chris Lattner
8ca5c67c6e Add predicates methods to TargetOperandInfo, and switch all clients
over to using them, instead of diddling Flags directly.  Change the
various flags from const variables to enums.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 02:39:19 +00:00
Chris Lattner
834f1ce031 rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 23:38:27 +00:00
Chris Lattner
2e48a70b35 rename isStore -> mayStore to more accurately reflect what it captures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45656 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 08:36:04 +00:00
Chris Lattner
c8478d8b12 Change the 'isStore' inferrer to look for 'SDNPMayStore'
instead of "ISD::STORE".  This allows us to mark target-specific dag
nodes as storing (such as ppc byteswap stores).  This allows us to remove
more explicit isStore flags from the .td files.

Finally, add a warning for when a .td file contains an explicit 
isStore and tblgen is able to infer it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45654 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 06:44:58 +00:00
Chris Lattner
e67bde5bb1 set the 'isstore' flag for instructions whose pattern is an
intrinsic that writes to memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45650 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 05:36:50 +00:00
Chris Lattner
2d51a4ce8f remove some old hacky code that tried to infer whether a store
occured in a pattern, but failed miserably.  The new code works for
any instruction that has a store in its pattern, including all the 
x86 mem op mem instructions.

The only target-independent code that uses this is branch folding,
so this won't change anything in practice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 02:16:26 +00:00
Chris Lattner
a529a37fbd rearrange some code to allow inferring instr info from the pattern of the instr, but don't do so yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:53:37 +00:00
Chris Lattner
f1ab4f18aa improve const correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:52:22 +00:00
Chris Lattner
6cc654b27a Split the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:35:39 +00:00
Chris Lattner
5fbe275304 final cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:21:51 +00:00
Chris Lattner
ef8339b11a further simplifications and cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:20:13 +00:00
Chris Lattner
951740afb4 simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:12:44 +00:00
Chris Lattner
fe71893183 rename CodegenDAGPatterns -> CodeGenDAGPatterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 01:10:31 +00:00
Chris Lattner
7b11712ef2 split enum emission out from InstrInfoEmitter into it's own tblgen backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 00:49:05 +00:00
Chris Lattner
93c7e41825 fix build on case sensitive file systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 23:37:52 +00:00
Chris Lattner
200c57e8ea now that computing CodegenDAGPatterns doesn't implicitly print stuff
out, DAGISelEmitter can compute it in its ctor, which simplifies some code.

Now we can use CodegenDAGPatterns in other parts of tblgen that want access
to dag pattern info, woo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 22:58:54 +00:00
Chris Lattner
443e3f9dd6 move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
The only difference in output is that we now print them in alphabetical 
order instead of reverse alphabetical order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 22:54:53 +00:00
Chris Lattner
dc32f9802a move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 22:43:57 +00:00
Chris Lattner
60d8139d1b fix a fixme by improving const correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 22:30:17 +00:00
Chris Lattner
6cefb77a70 change getQualifiedName to be a global function.
Split the pattern parsing code out from the dag isel emitter into it's own file.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 22:25:12 +00:00
Chris Lattner
331bf92fb5 Change the builtin matcher to emit a decision tree, which should help out
the VC++ 'nesting depth' issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04 04:38:35 +00:00
Chris Lattner
81442c0d83 Don't let IntrinsicID be uninitialized if it doesn't match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04 03:32:52 +00:00
Bill Wendling
f840f87baf Remove the default else. This was ending in code that looked like this:
if (!strcmp(Target, "x86")) {
  // ...
}
else
  IntrinsicID = Intrinsic::not_intrinsic;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03 23:02:16 +00:00
Chris Lattner
fa0fba1c54 Fix a build problem with VC++ by not doing the target prefix
comparison for every builtin.  This reduces the depth of
the if/elseif chain dramatically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02 21:24:22 +00:00
Chris Lattner
2c36affc82 tblgen shouldn't include headers from llvm codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45429 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30 00:25:23 +00:00
Chris Lattner
3060910e29 remove attributions from utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45419 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:37:13 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Ted Kremenek
ec9e7163b8 Added special support for stripping CRLF characters that may appear in the
output of nm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45341 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 08:04:39 +00:00
Bill Wendling
83870769c6 Modified to support comments better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45192 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 06:20:05 +00:00
Bill Wendling
18edd20605 Ignore shell scripts when doing "dsymutil" call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45166 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:21:52 +00:00
Christopher Lamb
43ad6b3e0d Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:12:55 +00:00
Bill Wendling
6b1da9c39f Add flags to indicate that there are "never" side effects or that there "may be"
side effects for machine instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14 01:48:59 +00:00
Evan Cheng
3dd298fb62 Oops. Forgot these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44969 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13 00:42:35 +00:00
Bill Wendling
041b3f8356 Reverting 44702. It wasn't correct to rename them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-08 23:58:46 +00:00
Duncan Sands
a3355ffb3d Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 20:06:50 +00:00
Devang Patel
57c4fc2e23 Change LinkTimeOptimizer.h install location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01 00:24:50 +00:00
Devang Patel
0a45fa9348 Change lib lto install location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 23:27:57 +00:00
Ted Kremenek
8330b0e5d4 Updated GenLibDeps.pl to employ "use strict" to help prevent uses of variables
that have not yet been defined.

Removed used of grep and sed when parsing the results of "nm". This was
originally motivated because if the user has specified options to grep using
the environment variable GREP_OPTIONS this could break the script. Piping
through grep/sed/sort/uniq is also (to my understanding) not necessary, and
the equivalent operations can be done much faster in the Perl script.

Using a crude benchmark, these changes resulted in a 3x speedup in the
execution of GenLibDeps.pl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 19:31:11 +00:00
Chuck Rose III
aa91792d6c Add TGParser files to VStudio project files. Removed generated files section from TableGen project file as it is no longer needed. #Include <algorithm> directly from TGParser.cpp so it can see std::reverse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44340 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 23:19:59 +00:00
Chris Lattner
8dcf751310 add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 23:19:05 +00:00
Chris Lattner
5d81486413 resolve the last fixme's in the new tblgen parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44277 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 21:06:59 +00:00
Chris Lattner
3aba4d39fd change the Init print methods to return strings, and implement
print in terms of that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44276 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 21:05:25 +00:00
Chris Lattner
bf8644ca1f eliminate a bunch of print methods that are duplicate with the getAsString() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44275 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 20:51:34 +00:00
Chris Lattner
f460165a4c Rewrite the tblgen parser in a recursive descent style, eliminating the bison parser.
This makes the parser much easier to understand, eliminates a ton of global variables,
and gives tblgen nice caret diagnostics.  It is also faster, but tblgen probably doesn't
care about performance.

There are a couple of FIXMEs which I will take care of next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44274 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 20:49:04 +00:00
Chuck Rose III
8b0ec64400 Switching back to strtoll. Including config.h. On VStudio builds, this overrides strtoll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44264 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-21 19:36:25 +00:00
Chuck Rose III
0ccb93034a This change does a couple of things. First it gets the Visual Studio builds working.
I added the lexing files to the VStudio projects and removed the .l files from the 
VStudio projects.  There was a problem with use of strtoll in TGLexer.cpp and Chris
suggested switching to strtol, so that's included here.

Additionally, this checkin adds minimal x64 builds to the VStudio builds.  Build issues
related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc
are worked around, but not ultimately solved.  Binaries used to be stored in

...\win32\{Debug|Release}

but are now kept in

...\win32\bin\{win32|x64}\{Debug|Release}

intermediate files will continue to be stored in the individual project directories under 
win32.  

Some names will likely change in the future to reflect that the vstudio projects
are no longer 32-bit only, but I wanted to get things up and running today so kept away
from bigger restructuring.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44260 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-21 00:37:56 +00:00
Chris Lattner
99ba1f7b8d Add the ability to convert a tblgen type to a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-20 22:25:16 +00:00
Chris Lattner
56a9fcfd1e Record the start of the current token, for use in error reporting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-19 07:43:52 +00:00
Chris Lattner
c8a9bbcbc7 Add carat diagnostics to tblgen lexer errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-19 07:38:58 +00:00
Chris Lattner
c1819188b6 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:48:46 +00:00
Chris Lattner
6aaca046d2 ensure header is self contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:25:45 +00:00
Chris Lattner
a805874422 reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
one dependency on flex and gets rid of two ".cvs" files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 02:57:27 +00:00
Duncan Sands
87b665d3de Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values.  This seems a neater solution.
It is safe since no legal value type has size 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44107 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 08:29:13 +00:00
Dale Johannesen
b97aec663b Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13 19:13:01 +00:00
Bill Wendling
553d22c29e Move SYSCTL stuff close to where it's used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 23:55:19 +00:00
Devang Patel
5250f1f4b0 Build universal llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44030 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 23:53:43 +00:00
Owen Anderson
20ab29068d Add a flag for indirect branch instructions.
Target maintainers: please check that the instructions for your target are correctly marked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 07:39:39 +00:00
Owen Anderson
e7e113361e Fix on 64-bit machines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 00:56:04 +00:00
Anton Korobeynikov
f191c80cd7 Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 19:50:10 +00:00
Anton Korobeynikov
af1b61debd Add convenient helper to obtain list of ints
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 11:19:37 +00:00
Dale Johannesen
e3ef744d3e Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10 22:07:15 +00:00
Evan Cheng
2ba49a942e Added -test-opts to specify test options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10 01:33:27 +00:00
Bill Wendling
6902e84ba0 Initial commit of files that support building LLVM the "Apple" way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09 06:59:33 +00:00
Dale Johannesen
483ec21d90 Interchange Dwarf numbers of ESP and EBP on x86 Darwin.
Much improvement in exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43794 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07 00:25:05 +00:00
Neil Booth
e3d936ac9c Remove some unnecessary C-style statics.
Restore an assertion that arithmetic can be performed on this format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 15:10:05 +00:00
Chris Lattner
44f1476048 switch some calls to SelectionDAG::getTargetNode to use
the one that takes an operand list instead of explicit
operands.  There is one left though, the more interesting
one :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 06:25:09 +00:00
Anton Korobeynikov
a98c7b3b24 Update this file for 2.0 syntax. Contributed by Jan Rehders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-19 16:54:13 +00:00
Chris Lattner
6c1ba31d6f tblgen uses dynamic_cast heavily, so it needs rtti info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43126 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18 15:54:45 +00:00
Gordon Henriksen
774577c1f9 Reverting unnecessary commit of generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:36:08 +00:00
Gordon Henriksen
4b2b9402c5 Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:28:48 +00:00
Hartmut Kaiser
efd4a5144b Updated VC++ build system.
Silenced some VC warnings.

I'm getting linker errors, though: unresolved externals:

llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

and

llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

Where are these defined?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 14:56:40 +00:00
Chris Lattner
01d029b82c One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
take a deleted nodes vector, instead of requiring it.

One more significant change:  Implement the start of a legalizer that
just works on types.  This legalizer is designed to run before the 
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.

This design/impl has the following advantages:

1. When finished, this will *significantly* reduce the amount of code in
   LegalizeDAG.cpp.  It will remove all the code related to promotion and
   expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike 
   LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
   for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of 
   deallocating and reallocating the entire graph that points to some 
   mutated node.
5. The code nicely separates out handling of operations with invalid 
   results from operations with invalid operands, making some cases
   simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :), 
   allowing you to easily understand what legalize types is doing.

This is not yet done.  Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing.  However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine.  The
biggest issues are:

1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.

Hey, at least it is a step in the right direction :).  If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it.  If
this explodes it will tell you what needs to be implemented.  Help is 
certainly appreciated.

Once this goes in, we can do three things:

1. Add a new pass of dag combine between the "type legalizer" and "operation
   legalizer" passes.  This will let us catch some long-standing isel issues
   that we miss because operation legalization often obfuscates the dag with
   target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
   making it much smaller and simpler.  When that happens we can then 
   reimplement the core functionality left in it in a much more efficient and
   non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
   selectiondags maybe...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-15 06:10:22 +00:00
Evan Cheng
3393f892c7 Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-12 08:39:02 +00:00
Tanya Lattner
9949c2a7ef If the user did not check out LLVM and request it to be built, it should be a build error. This relies on the user having a successful build of LLVM, but the tests will fail if they dont.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42514 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-02 00:19:27 +00:00
Dale Johannesen
317096ab37 Add sqrt and powi intrinsics for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:08:20 +00:00
Evan Cheng
d23aa5a053 Rename keyword "modify" -> "implicit".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 01:48:59 +00:00
Evan Cheng
a3ca3149f2 Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:35:01 +00:00
Evan Cheng
30729b48d4 Bug fix and minor clean up of generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 22:26:41 +00:00
Chris Lattner
10814820f6 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 17:40:48 +00:00
Dan Gohman
cb648f90a2 Remove spurious consts. This fixes warnings with compilers that
are strict about such things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:08:19 +00:00
Evan Cheng
85dbe1a1d2 Initial support for multi-result patterns:
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
 (modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:30:14 +00:00
Evan Cheng
aeb7d4d760 Allow set operators with multiple destinations, i.e. (set x, y, (op a, b)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41861 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 19:52:18 +00:00
Chris Lattner
111e8ce3a2 update this to use llvm-config, patch by Jose M. Moya
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:09:54 +00:00
Evan Cheng
ef61ed3507 TableGen no longer emit CopyFromReg nodes for implicit results in physical
registers. The scheduler is now responsible for emitting them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41781 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 23:59:02 +00:00
Evan Cheng
425e8c7eae Always check the type of node. This prevents situations such as selecting 32-bit rotate target instruction for a 64-bit node when 64-bit pattern is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41710 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:18:28 +00:00
Dan Gohman
0fee3ff93e Add MVT::fAny for overloading intrinsics on floating-point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-16 21:57:19 +00:00
Reid Spencer
f6101ac7bc Make use of the llvm-ld tool's new ability to read input from stdin to extract
the list of link time passes to be run, just as for opt, with the
-debug-pass=Arguments option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-13 06:19:51 +00:00
Reid Spencer
3c5b57c884 Now that llvm-ld can accept - as input from stdin, use this feature to extract
the pass arguments that it supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41019 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-11 16:11:22 +00:00
Rafael Espindola
594d37e21a propagate struct size and alignment of byval arguments to the DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-10 14:44:42 +00:00
Chandler Carruth
a583990ec8 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:57:16 +00:00
Chandler Carruth
6994040a95 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 01:51:18 +00:00
Evan Cheng
b5910820ce Added TargetInstrDescriptor::numDefs - num of results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40709 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 00:20:17 +00:00
Dan Gohman
f452207d20 More explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40589 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 14:51:59 +00:00
Chuck Rose III
936baaa5ae VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.
This commit fixes two things.  One is a pair of VStudio compiler errors stemming from variables
which defined within the for loop statement and also within the body of the for loop.  I fixed these 
by renaming one of the two variables.  Additionally, I've made the Function*->ExFunc map in 
ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown.  In repeated
uses of the interpreter, where the same Function* address may get used for completely differnet functions,
this was causing a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-27 18:26:35 +00:00
Dan Gohman
face9e56a1 Fix a pasto in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 15:11:00 +00:00
Christopher Lamb
1367fd09cb Have register info provide the inverse mapping of register->superregisters. PR1350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 08:01:58 +00:00
Christopher Lamb
08d52071ba Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 07:48:21 +00:00
Christopher Lamb
8245510ae0 Teach TableGen about the new vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 06:41:18 +00:00
Dan Gohman
a6a1ab3d28 A minor simplication in the generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 22:58:00 +00:00
Chandler Carruth
ef3d01635a Fixing some differences between CVS and SVN diff'ing. Reid fixed these already,
but I think it got lost in the conversion mess.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40107 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20 17:21:54 +00:00
Evan Cheng
102dc195b6 No need for noResults anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40075 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20 00:21:23 +00:00
Evan Cheng
64d80e3387 Change instruction description to split OperandList into OutOperandList and
InOperandList. This gives one piece of important information: # of results
produced by an instruction.
An example of the change:
def ADD32rr  : I<0x01, MRMDestReg, (ops GR32:$dst, GR32:$src1, GR32:$src2),
                 "add{l} {$src2, $dst|$dst, $src2}",
                 [(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
=>
def ADD32rr  : I<0x01, MRMDestReg, (outs GR32:$dst), (ins GR32:$src1, GR32:$src2),
                 "add{l} {$src2, $dst|$dst, $src2}",
                 [(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 01:14:50 +00:00
Chris Lattner
ad8c531e20 Work around a bogus gcc 4.2 warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-18 04:51:57 +00:00
Dan Gohman
3bf6e183d5 Eliminate an unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39828 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:16:50 +00:00
Evan Cheng
88cc092ca5 Try committing again. Add OptionalDefOperand. Remove clobbersPred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:05:01 +00:00
Reid Spencer
4b51fb98e5 Remove the cvsupdate script. Its no longer useful in the face of
tools such as svn info and svn status.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38446 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 08:31:14 +00:00
Reid Spencer
0793b36fd6 Subversionify the script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38440 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 07:41:11 +00:00
Evan Cheng
c419bd3396 ImmutablePredicateOperand is no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 23:23:38 +00:00
Rafael Espindola
1aa7efbd2c Add the byval attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 10:57:03 +00:00
Evan Cheng
a955939ca2 Refactor code to add initial support for OptionalDefOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 01:05:26 +00:00
Evan Cheng
7774be4a74 Teach DAGISelEmitter about zero_reg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 07:19:45 +00:00
Evan Cheng
8012b077dd Instructions with ImmutablePredicateOperand aren't really predicable since their predicates are fixed at isel time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 07:19:29 +00:00
Reid Spencer
75f75b9137 Ignore the .svn directories so countloc.sh and llvmgrep won't traverse them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 01:35:32 +00:00
Anton Korobeynikov
fbaca4226d Test modified svn mailer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 21:57:50 +00:00
Reid Spencer
ece1f685a8 Remove the last vestiges of -usesvn.
Implement -usecvs just in case we need to go back to cvs for some reason.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-02 06:19:57 +00:00
Reid Spencer
ceb9d784e0 We want the Subversion checkout to succeed even if we don't specify
the -verbose option! Doh!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37836 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-02 06:16:32 +00:00
John Criswell
eecd71151c Applied Reid's patch. Long live Subversion!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37812 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 19:12:50 +00:00
John Criswell
e644ef7b09 Convert .cvsignore files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 16:35:07 +00:00
Reid Spencer
1c01cf9baa Fix problems with the checkout and cd directories for SVN checkout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 03:12:42 +00:00
Evan Cheng
5e4f292e53 One additional field in TargetRegisterDesc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37760 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 17:09:34 +00:00
Evan Cheng
c4f2fe0694 Add immediate sub-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 20:59:16 +00:00
Reid Spencer
c9a15d5091 Update for Subversion conversion:
1. Fix comments for -usesvn and -svnurl options.
2. Fix default URL for SVN access.
3. Fix paths to accommodate "trunk" when checking out from SVN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37736 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 17:08:16 +00:00
Dan Gohman
d45eddd214 Revert the earlier change that removed the M_REMATERIALIZABLE machine
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:48:07 +00:00
Dan Gohman
9a0930dbd9 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:43:18 +00:00
Chris Lattner
20c2b35c2f silence warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37654 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 06:40:46 +00:00
Dan Gohman
82a87a0172 Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:48:05 +00:00
Evan Cheng
eaa91b0a1f Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:26:51 +00:00
Christopher Lamb
a321125e8b Add support to tablegen for specifying subregister classes on a per register class basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-13 22:20:15 +00:00
Evan Cheng
b5c1c9c8e3 Add clobbersPred - instruction that clobbers condition code / register which are used to predicate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 10:14:55 +00:00
Bill Wendling
851879c4cf Patches by Chuck Rose to unbreak V Studio builds.
Thanks Chuck!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37428 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 23:52:59 +00:00
Dan Gohman
b9daee9ece Remove the operator<< for MVT::ValueType in preparation for MVT::ValueType
being changed from an enum to an integer type, which can't have a custom
operator<< overload.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 16:11:03 +00:00
Reid Spencer
84c614d1ac The Intrinsic::getDeclaration function's Tys parameter only contains the
types of the iAny types involved in the overloaded intrinsic. Thus, we
can't use the argument number as the index but have to count them separately
in order to index Tys correctly. This patch rectifies this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-22 19:30:31 +00:00
Evan Cheng
5127ce09a4 Rename M_PREDICATED to M_PREDICABLE; opcode can be specified isPredicable without having a PredicateOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37116 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:45:24 +00:00
Chris Lattner
4ef9b11100 Fix CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll, the other recent
patches are also needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37070 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:36:44 +00:00
Evan Cheng
30d15757e3 Added \!con(a,b) syntax to concatnate two dag fragments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37063 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:23:24 +00:00
Evan Cheng
3ab6dcfc54 Mark all (not just the first) predicate operand M_PREDICATE_OPERAND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37061 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:20:36 +00:00
Evan Cheng
39376d0843 PredicateOperand related bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37060 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:19:51 +00:00
Evan Cheng
7055fd02e3 Remove duplicated line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 18:03:45 +00:00
Evan Cheng
59039632e1 If a PredicateOperand has an empty ExecuteAlways field, treat it as if a normal operand for isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36946 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 21:04:07 +00:00
Bill Wendling
4222d806fa Add an "implies" field to features. This indicates that, if the current
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:38:40 +00:00
Lauro Ramos Venancio
4604023412 Make my proxy happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36665 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 14:05:07 +00:00
Nate Begeman
6f7c8ffd9a A bit of feedback from Chris that I missed; error rather than asserting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36619 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 06:08:36 +00:00
Nate Begeman
7bf1c272ab llvm bug #1350, parts 1, 2, and 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36618 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 05:57:02 +00:00
Dan Gohman
01929c0482 Update a comment to reflect recent changes in the type system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36486 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 19:43:14 +00:00
Lauro Ramos Venancio
195c6c298a bugfix: remember that ResNode was declared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 17:03:22 +00:00
Christopher Lamb
8dadf6b13a Fix generation of certain scheduler itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36338 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 09:04:24 +00:00
Evan Cheng
4fc4fab856 Bug fix; add super-registers sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 00:55:29 +00:00
Lauro Ramos Venancio
b3a0417cad Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 21:38:10 +00:00
Evan Cheng
3cafbf7e5f Add sub-registers sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36278 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 21:13:46 +00:00
Reid Spencer
2db15e2b42 For PR1328:
Don't assert everytime an intrinsic name isn't recognized. Instead, make
the assert optional when callin getIntrinsicID(). This allows the assembler
to handle invalid intrinsic names gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 06:54:34 +00:00
Tanya Lattner
849c9a28e1 Adding target triplet to be passed to database.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35958 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 04:36:48 +00:00
Jeff Cohen
7545422f08 Correctly report version of GCC used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-10 19:13:43 +00:00
Reid Spencer
8e27acf489 Update for PathWithStatus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 19:49:35 +00:00
Reid Spencer
b5fda75704 Terminate some lines that need to be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35725 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 05:20:07 +00:00
Reid Spencer
99e865a9ce Reinstate the SVN capability without requiring Date::Parse. As before the
SVN Repository is only used if requested with -usesvn option otherwise it
uses CVS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35721 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 04:41:16 +00:00
Reid Spencer
776964ac32 Revert this until the Date::Parse module can be installed on the nightly
testers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 06:59:36 +00:00
Reid Spencer
d0b0879949 Prepare for Subversion migration by implementing a -usesvn to tell the
script to to check out llvm and llvm-test from Subversion instead of CVS.
Without this option the script will continue to check out from CVS. To
specify the Subversion URL, set the SVNURL environment variable or pass
-svnurl followed by the URL. For now, -svnurl will default to Reid's
temporary (read-only, daily snapshot) SVN server. Try it out if you like!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35621 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-03 08:28:44 +00:00
Reid Spencer
c4de3dec62 For PR1297:
Implement code generation for overloaded intrinsic functions. The basic
difference is that "actual" argument types must be provided when
constructing intrinsic names and types. Also, for recognition, only the
prefix is examined. If it matches, the suffix is assumed to match. The
suffix is checked by the Verifier, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-01 07:20:02 +00:00
Bill Wendling
d4eeb80043 Add better support for keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35386 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-27 20:23:56 +00:00
Bill Wendling
eebc8a1bc5 Add support for the v1i64 type. This makes better code for this:
#include <mmintrin.h>

extern __m64 C;

void baz(__v2si *A, __v2si *B)
{
  *A = C;
  _mm_empty();
}

We get this:

_baz:
        call "L1$pb"
"L1$pb":
        popl %eax
        movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax
        movq (%eax), %mm0
        movl 4(%esp), %eax
        movq %mm0, (%eax)
        emms
        ret

GCC gives us this:

_baz:
        pushl   %ebx
        call    L3
"L00000000001$pb":
L3:
        popl    %ebx
        subl    $8, %esp
        movl    L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax
        movl    (%eax), %edx
        movl    4(%eax), %ecx
        movl    16(%esp), %eax
        movl    %edx, (%eax)
        movl    %ecx, 4(%eax)
        emms
        addl    $8, %esp
        popl    %ebx
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35351 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 07:53:08 +00:00
Duncan Sands
28ecc1a6fa The -funcresolve and -raise options no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 21:06:50 +00:00
Evan Cheng
04677a3b49 Recognize target instruction flag 'isReMaterializable'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 06:20:37 +00:00
Anton Korobeynikov
d0b82b301d Refactoring of formal parameter flags. Enable properly use of
zext/sext/aext stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 16:25:09 +00:00
Anton Korobeynikov
1d9baccc9b Use new SDIselParamAttr enumeration. This removes "magick" constants
from formal attributes' flags processing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 08:12:33 +00:00
Chris Lattner
e3bab80e33 rename some CCActions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34724 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:29:06 +00:00
Chris Lattner
2092c8ac9c implement CCPromoteToType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34720 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 04:43:48 +00:00
Chris Lattner
50d456539d reapply
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 22:08:27 +00:00
Chris Lattner
88ee2a18a7 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34696 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 22:05:51 +00:00
Evan Cheng
53c9b3f68c Backing out
CodeGenTarget.cpp updated: 1.82 -> 1.83
Record.cpp updated: 1.55 -> 1.56
Record.h updated: 1.59 -> 1.60
TableGen.cpp updated: 1.47 -> 1.48
It's missing CallingConvEmitter.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34693 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 21:44:08 +00:00
Chris Lattner
798dc7adb4 initial support for calling convention generation, still unfinished.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34682 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 20:43:37 +00:00
Chris Lattner
114e5dd464 emit an enum value for the # of target registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34624 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 03:34:38 +00:00
Chris Lattner
d263114d7a the lengths of the strings are known, just use memcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34321 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 19:26:16 +00:00
Chris Lattner
3b515802f6 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34318 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 19:17:16 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
e5ff00870a remove obsolete path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34273 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 07:39:35 +00:00
Jim Laskey
95af592a63 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 20:38:26 +00:00
Reid Spencer
c9c1787907 Set the new NO_INSTALL flag for build-only tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:51:28 +00:00
Jim Laskey
95d97b90e8 Error check and eliminate unnecessary value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:30:58 +00:00
Jim Laskey
01ba6adc8f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:20:07 +00:00
Jim Laskey
81a21eae3e Deemed too cute to live.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33964 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:19:44 +00:00
Jim Laskey
251e3c6f6f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:03:31 +00:00
Jim Laskey
ba4cc09f51 Support var arg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:02:54 +00:00
Reid Spencer
90a2eb02e5 Use opt to generate the list of passes to run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33903 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 06:10:19 +00:00
Jim Laskey
844b892246 Make the constant honest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33557 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 23:00:54 +00:00
Jim Laskey
a683f9ba13 Files missing from LABEL check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 17:29:20 +00:00
Chris Lattner
d8a1728b5a Make tblgen error more useful. Patch by B. Scott Michel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33295 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 07:45:12 +00:00
Reid Spencer
2c13f6657a Fix this tool for use on Darwin which requires the file to come after the
commands. Linux is more forgiving.

Patch by Gordon Henriksen. Thanks, Gordon!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33285 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:38:22 +00:00