Commit Graph

718 Commits

Author SHA1 Message Date
Chris Lattner 09ffafcf54 allow the GCCBuiltinName field to be optional
llvm-svn: 26784
2006-03-15 19:15:26 +00:00
Jeff Cohen c4e2468251 Fix VC++ build error.
llvm-svn: 26773
2006-03-15 02:51:05 +00:00
Chris Lattner 1c32e04b5f remove typo
llvm-svn: 26772
2006-03-15 02:05:38 +00:00
Chris Lattner da1a4cc6a4 Autogenerate a table of intrinsic names, so we can map from intrinsic ID to
LLVM intrinsic function name.

llvm-svn: 26771
2006-03-15 01:55:21 +00:00
Chris Lattner 402a573764 Autogenerate code to map from GCC builtin to LLVM intrinsic.
llvm-svn: 26770
2006-03-15 01:33:26 +00:00
Reid Spencer 3e2d463a87 Allow a sequence of digits at the end of the directory name when trying to
determine the top directory. This allows the tool to find the correct top
directory when you have something like:

   /x/llvm
   /x/llvm2
   /x/llvm3

Previously the scripts would always find /x/llvm even if you were in the
llvm2 or llvm3 directory because the pattern didn't allow the digits at
the end of the path.

llvm-svn: 26751
2006-03-14 06:08:05 +00:00
Reid Spencer 552aa01d12 Change llvm.cs.uiuc.edu -> llvm.org
llvm-svn: 26750
2006-03-14 06:05:05 +00:00
Reid Spencer 3eb12e9a2a Add a newline at the end to avoid gcc warnings.
llvm-svn: 26749
2006-03-14 05:59:52 +00:00
Reid Spencer c67a060a51 Convert llvm.cs.uiuc.edu -> llvm.org
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Chris Lattner fea17a9901 emit a mapping from LLVM intrinsic -> GCC builtins.
llvm-svn: 26736
2006-03-13 23:08:44 +00:00
Chris Lattner 5b6ec4a5ea Verify that packed type operands have the right size and base type.
llvm-svn: 26735
2006-03-13 22:38:57 +00:00
Chris Lattner 69035f00e3 fix pasto in generate assertion msg
llvm-svn: 26706
2006-03-11 00:20:47 +00:00
Chris Lattner e3c2db3955 generate side-effect info
llvm-svn: 26672
2006-03-09 22:37:52 +00:00
Chris Lattner 06c7300bf1 Parse mod/ref properties, autogen mod/ref information
llvm-svn: 26669
2006-03-09 22:30:49 +00:00
Chris Lattner 6efe863a70 parse intrinsic types
autogenerate an intrinsic verifier

llvm-svn: 26666
2006-03-09 22:05:04 +00:00
Chris Lattner 6d8104efd2 autogenerate the function name recognizer
llvm-svn: 26663
2006-03-09 20:34:19 +00:00
Evan Cheng c47620b5d8 Temporary hack to enable more (store (op (load ...))) folding. This makes
it possible when a TokenFactor is between the load and store. But is still
missing some cases due to ordering issue.

llvm-svn: 26638
2006-03-09 08:19:11 +00:00
Evan Cheng 0fab08eae3 Don't generate silly matching code like this:
if (N1.getOpcode() == ISD::ADD &&
     ...)
   if (... &&
       (N1.getNumOperands() == 1 || !isNonImmUse(N1.Val, N10.Val))) &&
       ...)

TableGen knows N1 must have more than one operand.

llvm-svn: 26592
2006-03-07 08:31:27 +00:00
Chris Lattner ae0f1512c9 Silence a warning.
llvm-svn: 26508
2006-03-03 19:34:28 +00:00
Chris Lattner f6e846eee8 Fix pasteo
llvm-svn: 26499
2006-03-03 06:13:41 +00:00
Chris Lattner 94f300d15c remove a bunch of long-dead testing code
llvm-svn: 26497
2006-03-03 02:34:28 +00:00
Chris Lattner c313d0b712 initial implementation of intrinsic parsing
llvm-svn: 26495
2006-03-03 02:32:46 +00:00
Chris Lattner 73fbe145fd remove out of date comment
llvm-svn: 26492
2006-03-03 02:04:07 +00:00
Chris Lattner 1edf15e48e Add support for "-Ifoo" in addition to "-I foo"
llvm-svn: 26487
2006-03-03 01:53:40 +00:00
Chris Lattner d7f6b55afa Regenerate
llvm-svn: 26486
2006-03-03 01:47:37 +00:00
Chris Lattner e7b74c5da1 add support for multiple include directories
llvm-svn: 26485
2006-03-03 01:47:14 +00:00
Evan Cheng 53a2d60bca New vector type v2f32.
llvm-svn: 26437
2006-03-01 01:10:52 +00:00
Chris Lattner dc445eadc0 Select inline asm memory operands.
llvm-svn: 26349
2006-02-24 02:13:31 +00:00
Evan Cheng 43070b7541 Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).

llvm-svn: 26294
2006-02-20 22:34:53 +00:00
Jeff Cohen 0add83e969 Fix bugs identified by VC++.
llvm-svn: 26287
2006-02-18 03:20:33 +00:00
Evan Cheng 33f4156663 Bump up pattern cost if the resulting instruction is marked
usesCustomDAGSchedInserter.

llvm-svn: 26282
2006-02-18 02:33:09 +00:00
Chris Lattner 3e15eac81b Check the new form for bison output into CVS
llvm-svn: 26208
2006-02-15 07:24:01 +00:00
Chris Lattner ecd162d5cd Adjust to new form of handling lexer dependencies, this way shouldn't have
the problems the old way did.

llvm-svn: 26161
2006-02-14 05:13:13 +00:00
Evan Cheng 5940bc210e Call InsertISelMapEntry rather than map insertion operator to prevent overly
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.

llvm-svn: 26095
2006-02-09 22:12:27 +00:00
Evan Cheng 9ce762d51f Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
llvm-svn: 26084
2006-02-09 07:16:09 +00:00
Evan Cheng 6dc90ca172 Change Select() from
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);

llvm-svn: 26067
2006-02-09 00:37:58 +00:00
Evan Cheng df5ef770b6 Added options -cflag, -cxxflags, and -ldflags to override the default C
compilation, C++ compilation, and linker options.
e.g. This is the options I use for testing on my x86 iMac:
nice ./NightlyTest.pl -release -cflags "-Os -DNDEBUG -fomit-frame-pointer" -cxxflags "-Os -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer"

llvm-svn: 26057
2006-02-08 09:08:06 +00:00
Evan Cheng 0ba2808775 Remove -pedantic. It no longer works.
llvm-svn: 26055
2006-02-08 07:28:22 +00:00
Evan Cheng 1630c2848f Hoist all SDOperand declarations within a Select_{opcode}() to the top level
to reduce stack memory usage. This is intended to work around the gcc bug.

llvm-svn: 26026
2006-02-07 00:37:41 +00:00
Chris Lattner 5c76b499aa Add support for modifier strings in machine instr descriptions. This allows
us to avoid creating lots of "Operand" types with different printers, instead
we can fold several together and use modifiers.  For example, we can now use:

${target:call} to say that the operand should be printed like a 'call' operand.

llvm-svn: 26024
2006-02-06 23:40:48 +00:00
Chris Lattner 033e32e5d9 Simplify the variant handling code, no functionality change.
llvm-svn: 26023
2006-02-06 22:43:28 +00:00
Evan Cheng ebf05bea1b At the end of isel, select a replacement node for each handle that does not
have one. This can happen if a load's real uses are dead (i.e. they do not
have uses themselves).

llvm-svn: 26014
2006-02-06 08:12:55 +00:00
Evan Cheng 308d0090e6 Name change.
llvm-svn: 26013
2006-02-06 06:03:35 +00:00
Evan Cheng aa26555b25 Handle HANDLENODE: just return itself.
llvm-svn: 26011
2006-02-05 08:46:14 +00:00
Evan Cheng 368f20e53d Allow more loads to be folded which were previously prevented from happening
due to ordering issue. i.e. they were selected for chain use first.
Now at load select time, check if it is being selected for a chain use and if
it has only a single real use. If so, return a HANDLENODE (with the load as
its operand) in its place and record it.
When it is folded or the load is selected for a real use, the isel records it
as the replacement for the HANDLENODE. The replacement is done when all nodes
are selected.
This scheme exposed a couple of problems where cycles can happen. (See comments
in EmitMatchCode() for descriptions of the problems and their workaround /
solutions.) These problems have been resolved with a small compile time
penality.

llvm-svn: 25995
2006-02-05 06:43:12 +00:00
Evan Cheng 7ab4579c68 Re-committing the last bit of change. It shouldn't break PPC this time.
llvm-svn: 25982
2006-02-05 05:22:18 +00:00
Chris Lattner 586b06281c Temporarily revert the last change, which breaks PPC and other targets that
DO select things.

llvm-svn: 25970
2006-02-04 09:23:06 +00:00
Evan Cheng ce87cac555 Complex pattern's custom matcher should not call Select() on any operands.
Select them afterwards if it returns true.

llvm-svn: 25968
2006-02-04 08:50:49 +00:00
Chris Lattner 2bcfc52af6 node predicates add to the complexity of a pattern. This ensures that the
X86 backend attempts to match small-immediate versions of instructions before
the full size immediate versions.

llvm-svn: 25937
2006-02-03 18:06:02 +00:00
Evan Cheng 717db484a5 (store (op (load ...))) folding problem. In the generated matching code,
Chain is initially set to the chain operand of store node, when it reaches
load, if it matches the load then Chain is set to the chain operand of the
load.

However, if the matching code that follows this fails, isel moves on to the
next pattern but it does not restore Chain to the chain operand of the store.
So when it tries to match the next store / op / load pattern it would fail on
the Chain == load.getOperand(0) test.

The solution is for each chain operand to get a unique name. e.g. Chain10.

llvm-svn: 25931
2006-02-03 06:22:41 +00:00