Commit Graph

1968 Commits

Author SHA1 Message Date
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
Reid Spencer
ea92a109ff Join two lines that caused awk to squak on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33274 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 22:41:12 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Reid Spencer
40beb40f4b Put in some needed \ at the end of lines!!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33070 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 06:51:56 +00:00
Reid Spencer
db8d2bed6a For PR950:
Convert signed integer types to signless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:50:28 +00:00
Reid Spencer
b1788a341c Remove some clutter and make it keep going instead of stopping at the
first difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 00:37:37 +00:00
Jim Laskey
dbe4006cf3 Ignore entries with blank names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32491 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 20:55:58 +00:00
Jim Laskey
9a7dfa3fd4 Rollback changes to take a different tack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32488 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 19:26:50 +00:00
Jim Laskey
55a7ec33d7 Honor the command line specification for machine type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32483 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 16:07:33 +00:00
Reid Spencer
33c9683865 Provide a script that can track down which optimization pass causes
different code to be produced between two llvm builds that differe slightly.
This is useful in tracking down mis-optimization bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32435 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 17:42:12 +00:00
Reid Spencer
2232a80ef1 Allow the input of the test program to be specified.
Don't generate the reference output for each comparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 04:42:33 +00:00
Reid Spencer
f8463a38bf Add the -ldl library option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:58:38 +00:00
Bill Wendling
f5da13367f What should be the last unnecessary <iostream>s in the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:21:48 +00:00
Evan Cheng
0555122412 Match TargetInstrInfo changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:57:41 +00:00
Reid Spencer
ba07a69222 Only show the first few lines of difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31901 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-25 04:07:06 +00:00
Reid Spencer
2bae1f58ed Add an option to enable lli (interpreter mode) testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31899 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-24 20:34:16 +00:00
Reid Spencer
6d0fbd4185 Stop early if there is no mis-optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31893 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-22 03:46:45 +00:00
Chris Lattner
f7560ed6b1 Fix PR1001, patch by Nikhil Patil!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31880 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-20 18:54:33 +00:00
Reid Spencer
161a2fb9d8 Make the awk filter print out which files its eliminating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-18 18:30:18 +00:00
Reid Spencer
35d958cf76 This is a utility for preparing patches against LLVM. It runs cvs diff with
the correct options, places the patch content in order that makes sense for
review, and filters cruft out of the patch (like diffs in *.cvs files). It
produces both a NAME.patch.raw (unfiltered) and NAME.patch (filtered) file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-18 18:02:30 +00:00
Reid Spencer
5b31cf0f9f Provide a list of gccld optimization switches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31849 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-18 17:14:09 +00:00
Evan Cheng
fb1aab0673 Add opcode to TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31804 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 01:46:27 +00:00
Reid Spencer
a8c3ff456a Use a release version of bugpoint, if found. Include gccld passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-16 18:32:47 +00:00
Chris Lattner
f64f9a4b75 Remove the isTwoAddress property from the CodeGenInstruction class. It should
not be used for anything other than backwards compat constraint handling.

Add support for a new DisableEncoding property which contains a list of
registers that should not be encoded by the generated code emitter.  Convert
the codeemitter generator to use this, fixing some PPC JIT regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 23:23:02 +00:00
Chris Lattner
0bb75004ff ADd support for adding constraints to suboperands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 02:38:17 +00:00
Chris Lattner
33a400477b restore some 'magic' code that I removed: it is needed. Add comments explaining
why.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 22:17:10 +00:00
Chris Lattner
717a611f79 minimal hack to get patterns whose result type is iPTR to be selected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 21:50:27 +00:00
Chris Lattner
0d1bb1322c remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 21:41:35 +00:00
Chris Lattner
ab51ddd7c0 Add support for nodes that return iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31739 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 21:32:01 +00:00
Chris Lattner
646085dde9 changes to get ptr_rc to be accepted in patterns. This is needed for ppc preinc
stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 21:18:40 +00:00
Chris Lattner
7c3a96b81a Fix a bug handling nodes with variable arguments. The code was fixed to assume
that there were two input operands before the variable operand portion.  This
*happened* to be true for all call instructions, which took a chain and a
destination, but was not true for the PPC BCTRL instruction, whose destination
is implicit.

Making this code more general allows elimination of the custom selection logic
for BCTRL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 18:41:38 +00:00
Reid Spencer
0244099956 Add some output so the user is informed while they wait.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 16:08:51 +00:00
Reid Spencer
2fe47fccb9 Add -lstdc++ to the link line for C++ programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 10:22:48 +00:00
Chris Lattner
f196839562 allow ptr_rc to explicitly appear in an instructions operand list, it doesn't
have to be a subpart of a complex operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 02:01:40 +00:00
Evan Cheng
a1fd6504aa Remove M_2_ADDR_FLAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31583 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 02:22:54 +00:00
Reid Spencer
dd2b95534f Don't run bugpoint if we can't find a misoptimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31582 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 01:47:04 +00:00
Reid Spencer
e4d8f33b0f Print a usage message if too few arguments to program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 00:50:32 +00:00
Reid Spencer
28b7c7feab Add a utility script to find a mis-optimization problem. This sometimes
helps when bugpoint can't find the problem directly because it needs the
set of optimizations that cause the program to fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31580 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 00:26:17 +00:00
Evan Cheng
892aaf8d74 Divide select methods into groups by SelectionDAG node opcodes (ISD::ADD,
X86ISD::CMP, etc.) instead of SDNode names (add, x86cmp, etc). We now allow
multiple SDNodes to map to the same SelectionDAG node (e.g. store, indexed
store).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 23:01:03 +00:00
Evan Cheng
811731e340 Always pass the root node to ComplexPattern isel matching function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 20:31:10 +00:00
Chris Lattner
29434364dd emit TIED_TO correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31484 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 01:27:55 +00:00
Chris Lattner
d9a7f4db5f Mark predicate operands as such in operand info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31483 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-06 23:53:31 +00:00
Chris Lattner
a0cca4ae26 simplify the way operand flags and constraints are handled, making it easier
to extend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31481 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-06 23:49:51 +00:00
Chris Lattner
a818e92f8b recognize ppc's blr instruction as predicated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31480 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-06 21:44:54 +00:00
Chris Lattner
5fa39df5ba regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31472 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 23:28:58 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Evan Cheng
c51737f46f Clean up some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31451 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-04 09:40:23 +00:00
Chris Lattner
efe9f4a3b6 Parse PredicateOperand's. When an instruction takes one, have the generated
isel fill in the instruction operands with the 'execute always' value
automatically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-04 05:12:02 +00:00
Chris Lattner
dfdaeb276e First steps to getting PredicateOperand's to work. This handles instruction
and pat pattern definitions.  Codegen is not right for them yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-04 01:35:50 +00:00
Chris Lattner
d438b53e76 eliminate need for the NumMIOperands field in Operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 23:45:17 +00:00
Reid Spencer
fa3e3b9427 Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31403 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:48:30 +00:00
Chris Lattner
64a8dddb73 silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:45:13 +00:00
Reid Spencer
8b9ea8099e Don't write out variables that are never used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31396 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:28:12 +00:00
Chris Lattner
9c5d4de837 silence warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31392 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:11:05 +00:00
Reid Spencer
63fd6ad77b Revert last patch which causes tblgen to segfault (why, I'm not sure).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 21:07:40 +00:00
Reid Spencer
9ec4849ff6 For PR786:
Remove unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:46:16 +00:00
Reid Spencer
3ed469ccd7 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Evan Cheng
4c2b7a3808 Tied-to constraint must be op_with_larger_idx = op_with_smaller_idx or else throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 23:03:11 +00:00
Evan Cheng
0db427bb2d Not meant to be checked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 00:27:59 +00:00
Evan Cheng
e2ba897588 Add operand constraints to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 00:27:05 +00:00
Reid Spencer
93c456c4bd 80 cols fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 15:24:04 +00:00
Evan Cheng
13e9e9c235 Passing isel root and use operands to ComplexPattern functions, these should do the usual load folding checks as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 06:33:44 +00:00
Evan Cheng
ce1381afd9 When checking if a load can be folded, we check if there is any non-direct
way to reach the load via any nodes that would be folded. Start from the
root of the matched sub-tree.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30956 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-14 08:30:15 +00:00
Evan Cheng
4f77616c28 Really remove dead nodes from isel queue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 23:18:52 +00:00
Evan Cheng
1fae00f1ad Use RemoveDeadNode to kill dead node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:35:19 +00:00
Evan Cheng
4326ef582b Prior load folding check on chain operand was too strict. It requires the
chain operand to point to the load being folded. Now we relax this, traversing
up the chain, if it doesn't reach the load, then it's ok. We will create a
TokenFactor (of all the chain operands and the load's chain) to capture all
the control flow dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30897 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 02:08:53 +00:00
Evan Cheng
94b3040fef Added properties such as SDNPHasChain to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30890 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 21:02:01 +00:00
Chris Lattner
bcc3f0a61d regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30888 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:13:09 +00:00
Chris Lattner
1ceb6c830f Add support for let expressions around an mdef. This implements a new part
of Regression/TableGen/MultiClass.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30887 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 18:12:44 +00:00
Chris Lattner
39e73f7c83 Special case tblgen generated code for patterns like (and X, 255) or (or X, 42).
The dag/inst combiners often 'simplify' the masked value based on whether
or not the bits are live or known zero/one.  This is good and dandy, but
often causes special case patterns to fail, such as alpha's CMPBGE pattern,
which looks like "(set GPRC:$RC, (setuge (and GPRC:$RA, 255), (and GPRC:$RB, 255)))".
Here the pattern for (and X, 255) should match actual dags like (and X, 254) if
the dag combiner proved that the missing bits are already zero (one for 'or').

For CodeGen/Alpha/cmpbge.ll:test2 for example, this results in:

        sll $16,1,$0
        cmpbge $0,$17,$0
        ret $31,($26),1

instead of:

        sll $16,1,$0
        and $0,254,$0
        and $17,255,$1
        cmpule $1,$0,$0
        ret $31,($26),1

... and requires no target-specific code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30871 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:05:55 +00:00
Chris Lattner
be8e72120d Split some code out into a new method. The generated code is exactly
identical, this is just a refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30868 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 03:35:34 +00:00
Evan Cheng
d3eea90a9b Predicate function on the node should be matched before its childrean' matching
code. This is especially important now matching ISD::LOAD also requires a
Predicate_Load call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30845 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 21:02:17 +00:00
Chris Lattner
dc52f17a30 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 07:15:19 +00:00
Chris Lattner
85899b8b10 Bugfix: this allows multiclasses to have default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 07:14:48 +00:00
Chris Lattner
90aa839c88 Fix more static dtor issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 21:52:35 +00:00
Jim Laskey
7a8efced36 Wrong directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 17:31:45 +00:00
Jim Laskey
ba9f0431f0 Fix search file for -release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30647 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 18:45:11 +00:00
Jim Laskey
27b8ba088b Add support for -release-asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 17:49:20 +00:00
Chris Lattner
259bda48e2 This:
AggregateString += "\0\0";

Doesn't add two nuls to the AggregateString (for obvious reasons), which
broke the asmprinter when the first character of an asm string was not
literal text.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30625 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 16:44:09 +00:00
Chris Lattner
16f046a6ce Actually, name the method PrintSpecial to match other stuff in AsmPrinter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 23:47:10 +00:00
Chris Lattner
1bf6361dfd Add support for ${:foo} syntax, where "foo" is passed into "printSpecial" and
has no associated operand.  This is useful for portably encoding stuff like
the comment character into an asm string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 23:45:08 +00:00
Chris Lattner
ce6e84ca6c don't allow 'imm' or specific imms, like '1' on the LHS of a binop.
This shrinks X86GenDAGISel by ~330 lines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30574 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 20:46:13 +00:00
Chris Lattner
649069728f Fit to 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30572 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 18:28:27 +00:00
Jim Laskey
01d7bcf03d Trim the home directory from the dejagnu test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-20 09:20:22 +00:00
Evan Cheng
d46bd604ed Allow PatFrag to be a leaf node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30498 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 19:08:04 +00:00
Evan Cheng
cf6d791e08 Add result of a Xform to isel queue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30497 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 18:40:15 +00:00
Chris Lattner
bc7fa5277f If multiple predicates are listed, they must all pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 00:41:36 +00:00
Chris Lattner
47a7e2681e There!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30473 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 22:41:07 +00:00
Chris Lattner
a4503de431 Fix Regression/TableGen/2006-09-18-LargeInt.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30472 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 22:28:27 +00:00
Jim Laskey
6d8a1b7c55 Switching to NewNightlyTest.php
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 17:03:36 +00:00
Chris Lattner
7905c55b12 Relax this check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 23:54:24 +00:00
Jim Laskey
996f7050db No longer used, and confuses maintainers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30248 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 16:02:58 +00:00
Evan Cheng
966fd37ba5 1) With X86 lowering change, the following can no longer happen since
the branch's chain is also produced by cmp.
          [ch, r : ld]
             ^ ^
             | |
      [XX]--/   \- [flag : cmp]
       ^             ^
       |             |
       \---[br flag]-

Remove an isel check which prevents loads from being folded into cmp / test
instructions.

2) Whenever possible, delete a selected node to allow more load folding
opportunities. Note not all nodes can be deleted after it has been
selected. Some may have simply morphed; some have not changed at all (e.g.
EntryToken).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30242 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 02:24:43 +00:00
Evan Cheng
6cec34e094 Generated isel should favors explicit constant operand (+2) over an operand with a predicate (+1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30180 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 07:26:39 +00:00
Chris Lattner
8aa01f4b43 Fix JIT encoding of two-addr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 03:01:52 +00:00
Chris Lattner
2926869b4a Fix a long-standing wart in the code generator: two-address instruction lowering
actually *removes* one of the operands, instead of just assigning both operands
the same register.  This make reasoning about instructions unnecessarily complex,
because you need to know if you are before or after register allocation to match
up operand #'s with the target description file.

Changing this also gets rid of a bunch of hacky code in various places.

This patch also includes changes to fold loads into cmp/test instructions in
the X86 backend, along with a significant simplification to the X86 spill
folding code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 02:12:02 +00:00
Chris Lattner
cce56af911 Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't
parse right.  This fixes TableGen/MultiClass.td


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:07:27 +00:00
Chris Lattner
7717d0930a fix an assertion with multidefs. Def inside of multiclasses don't need to
be complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:59:03 +00:00
Chris Lattner
2762738d96 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30029 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:14:42 +00:00
Chris Lattner
12069866c8 Add often-requested support for defining "multiclasses" which can be instantiated.
This allows you to define multiple definitions with one line, encouraging
more .td file factoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:13:49 +00:00
Evan Cheng
718996654b Issue cvs co with -P option to prune empty directories. Remove the unnecessary
update stage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 18:01:18 +00:00
Reid Spencer
f100dcc42e Add virtual methods to all subclasses so they are not overloaded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29930 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 00:12:25 +00:00
Chris Lattner
8dc728e440 Use compiler.h instead of hand rolling our own macro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29913 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 13:16:24 +00:00
Evan Cheng
f037ca6245 Do not emit getTargetNode() and SelectNodeTo() which takes more than 3
SDOperand arguments. Use the variants which take an array and number instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29906 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 08:11:28 +00:00
Evan Cheng
95514bae73 SelectNodeTo now returns a SDNode*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29901 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 08:00:10 +00:00
Evan Cheng
7a33db0b20 Minor getCopyToReg() call change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29900 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 07:39:28 +00:00
Evan Cheng
9ade218533 Select() no longer require Result operand by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 05:34:46 +00:00
Evan Cheng
2a318cfad5 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29897 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 01:34:15 +00:00
Evan Cheng
f549319b4a A bit more clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29893 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 01:02:19 +00:00
Evan Cheng
676d731c61 - Clean up tablegen dag isel generator code.
- Clean up the code generated by tablegen:
  * AddToISelQueue now takes one argument.
  * ComplexPattern matching condition can now be shared.
  * Eliminate passing unnecessary arguments to emit routines.
  * Eliminate some unneeded SDOperand declarations in select routines.
  * Other minor clean ups.
- This reduces foot print slightly: X86ISelDAGToDAG.o is reduced from 971k
  to 823k.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29892 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 00:59:04 +00:00
Patrick Jenkins
ad6f758f89 Corrected an error that was introduced yesterday that caused the GCC
version to be left blank if the build failed.

Also corrected a problem where if the build failed the nightly tester
would still try to read the results of the Dejagnutests log even
though it didnt exist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 18:11:19 +00:00
Patrick Jenkins
0313775225 The new nightly tester should stop outputing a message stating the
testresults directory is not present unless the script is run as verbose.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 20:45:57 +00:00
Patrick Jenkins
b9c65eb600 These changes reflect the changes in the database for how tests are stored
and bring the handing of dejagnu tests into compliance with this new scheme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 18:00:21 +00:00
Patrick Jenkins
4b7f7aade1 Changing the format dejagnu tests are submitted. We used to only submit multisource information for pass fail. Now we submit all pass/fail test information. This should fix the issue where some results were not being reported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 22:11:03 +00:00
Patrick Jenkins
d3f341a201 My last commit added some experimental features I have been working on. This commit rolls those back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:32:20 +00:00
Patrick Jenkins
b993b0a3ef Changed the call to countloc.sh so that the correct topdirectory of the llvm build is set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:18:41 +00:00
Evan Cheng
23329f5e03 SelectNodeTo() may return a SDOperand that is different from the input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 07:30:09 +00:00
Chris Lattner
dfb8607397 The generated runloop shouldn't require Select to update 'Result'. In fact
we'd like to remove result entirely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29713 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 23:42:26 +00:00
Chris Lattner
5298de51b8 allow Select to return the node being selected if RAU isn't needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 23:27:50 +00:00
Reid Spencer
920baeee80 Simplify this a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29695 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 03:50:10 +00:00
Reid Spencer
6ae928fc69 This script takes arguments so remove the check for number of arguments,
just check the first arg to see if its -topdir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 03:48:22 +00:00
Reid Spencer
ca7592a1ba Make all tools that use llvmdo have a -topdir option that allows the top
source dir for LLVM to be specified explicitly. This removes the dependency
on the llvm-config script. If the option is not given, then the scripts use
llvm-config which should be both built and in the PATH. This arrangement
provides a useful default for most developers but also allows the nightly
tester to execute countloc.sh before llvm-config is built and without
altering the PATH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 18:49:05 +00:00
Patrick Jenkins
9e384abc1a Added some comments to clarify code around sub TestDirectory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29658 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 16:07:14 +00:00
Reid Spencer
321956392f 1. fix bug by ensuring we start at the llvm source root.
2. make use of the -code-only option on llvmdo
3. Add some debug print statements to find #1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-13 19:03:06 +00:00
Reid Spencer
99aa27161b Count the documentation. Otherwise we take a 30,000 hit in the LOC on the
nightly test graph. And, documentation is important.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-13 18:59:40 +00:00
Reid Spencer
c7e289f7ca Use the new -code-only option to llvmdo so that we only count things that
are considered to be code. This will give a drop in the LOC count on the
nightly testers, but it is more accurate than previous estimates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-13 18:29:21 +00:00
Reid Spencer
956dae87ae Add a -code-only option which restricts llvmdo to visiting just those
files that are considered to be code. Documentation is excluded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-13 18:28:27 +00:00
Reid Spencer
fa34d7b3a7 Changes for LLVM coding standard compliance:
1. Remove tabs
  2. Wrap to 80 columns
  3. Put spaces between "if" or "elsif" and expression
  4. Put { on same line as if statement.
  5. Make indentation be 2 spaces.
Functionality change:
  Run utils/countloc.sh after the build is done. This is necessary because
  that script now uses llvm-config to find the top src directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-13 09:53:02 +00:00
Reid Spencer
4477185a6e Lexer.cpp is a generated file both in lib/AsmParser and projects/Stacker
so we remove it from being counted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:58:58 +00:00
Reid Spencer
2914a696fb Weed out some cruft and add in some missing extensions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:51:05 +00:00
Reid Spencer
c0d5ed33e5 Weed out cruft that should not be counted and add in extensions we
previously missed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29637 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:50:27 +00:00
Patrick Jenkins
0e9402fad4 Added two flags (-submit-server and -submit-script) which allow the user to specify where the test results are submitted too. If these are not specified they default to the LLVM.org server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:02:09 +00:00
Reid Spencer
8312657fc3 Make this script not care where it is run from by getting the llvm src
root from the llvm-config script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:55:31 +00:00
Reid Spencer
1e75b7b015 Make llvmdo and llvmgrep invulnerable to where they are run from by getting
the llvm source root from the llvm-config command. The dependency now is
that the correct llvm-config command is in the path. For most developers
this is the case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:53:27 +00:00
Reid Spencer
ae2e622e74 Clean up the HTML output. Add a -filedetails option to report the number of
lines contributed by each user to each file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 20:44:17 +00:00
Reid Spencer
bf49f33103 Remove blank line at end of file, removing test user "foo" from CVS history.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 19:42:11 +00:00
Reid Spencer
bb6f6eb667 Drop the -details option, it was broken. If you want to know about a
particular directory, just pass that directory to the script. Also, clean
up the HTML output, put list of skipped dirs at the end, and make a few
other minor improvements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 18:36:55 +00:00
Evan Cheng
1e060f0242 Use SmallVector instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 18:33:41 +00:00
Evan Cheng
06d6470c65 - Prevent some functions from being inlined to eliminate the code size bloat
introduced by previous commit.
- SelectCode now returns a SDNode*. If it is not null, the selected node
  produces the same number of results as the input node. The seletion loop
  is responsible for calling ReplaceAllUsesWith() to replace the input node
  with the output target node. For other cases, e.g. when load is folded,
  the selection code is responsible for calling ReplaceAllUsesOfValueWith()
  and SelectCode returns NULL.
- Other clean ups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29602 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 08:59:35 +00:00
Reid Spencer
a7465cafeb Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29590 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-09 19:40:13 +00:00
Chris Lattner
706d2d3608 Revert previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29585 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-09 16:44:44 +00:00
Tanya Lattner
8d4ccf0ad4 Reverting back to original 1.8 version so I can manually merge in patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29584 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-09 16:41:21 +00:00
Evan Cheng
dcffb0cf81 Merge some NightlyTest.pl changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29579 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-09 05:45:12 +00:00
Chris Lattner
bd564bfc63 Start eliminating temporary vectors used to create DAG nodes. Instead, pass
in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29566 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 02:23:42 +00:00
Patrick Jenkins
4257ccb1a7 Removed unneccesary output from nightly tester
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29565 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 02:03:53 +00:00
Evan Cheng
9bdca0302a Making TableGen'd instruction selection code non-recursive. This fixes PR805.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29548 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 22:17:58 +00:00
Patrick Jenkins
e8501eb1bb Reinstated the sending of a list of all dejagnutests run. Also fixed a rather embarresing error introduced during version 1.41 where i commented out the actual sending of the data to the results server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29538 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 01:54:37 +00:00
Patrick Jenkins
1c3bf94a42 no longer sending the list of all dejagnu tests because it is too big at the present time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29537 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-06 21:47:43 +00:00
Patrick Jenkins
cf65fb6503 Changed a = to a .= so we now append tests we have performed to the master list of all tests instead of assigning it as the master list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29531 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 21:42:58 +00:00
Patrick Jenkins
e631c4a5b2 Made some more changes to the print statements in the nightly tester. The last commit was a preemptive strike.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 17:55:01 +00:00
Patrick Jenkins
ea103a86fa Encapsulated all of the print statements in "if( $VERBOSE) { }". The testing script will be absoutely silent now except for errors, which will still be printed to the annoyance of the user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 17:53:27 +00:00
Patrick Jenkins
7e5c373d07 We should now send the correct list of dejagnu tests instead of the csv file of test results when we submit results back to the nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29523 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 17:40:54 +00:00
Reid Spencer
d0fa46aa62 Print an error message if the lib directory (first argument) is not a
directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29508 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 19:10:03 +00:00
Patrick Jenkins
69d3a95b17 One of the directories we were searching in for .o and .a files was wrong. We now search /lib instead of /libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29496 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:28:58 +00:00
Chris Lattner
58d63567ea Remove some extraneous newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29492 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 00:42:26 +00:00
Chris Lattner
32501a0e33 Really add support for compilers without noinline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29491 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 00:26:13 +00:00
Patrick Jenkins
59a2798a32 We now only search the following directories for .o and .a files:
utils/
libs/
tools/
Release/ & Debug/
as per Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29488 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 23:48:07 +00:00
Patrick Jenkins
d7210f9dba Removed some dead code and hopefully fixed the issue where the total list of tests was not being sent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 18:37:40 +00:00
Reid Spencer
9bf2e7f53d Fix a problem with use of undefined variables. Print an error message if
the first argument is omitted. Attempt to use a standard/default font.
Make the generation of the DOT file readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29429 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 08:09:03 +00:00
Evan Cheng
d3f8429f01 Pass N by reference to select functions to prevent gcc from allocating more stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29423 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 01:07:48 +00:00
Evan Cheng
6966c48767 Remove an unneeded match condition: the type check for root node has been
moved to outside the actual select routine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29415 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-31 19:01:58 +00:00
Andrew Lenharth
e36de54797 fix externals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29409 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-29 04:27:34 +00:00
Evan Cheng
b6ee7f73e5 Split each select function for a particular opcode into multiple ones. One
per possible ValueType of the node. e.g. Select_add is split into Select_add_i8,
Select_add_i16, etc.

For opcodes which do not produce a non-chain result, it is split on the
ValueType of its first non-chain operand. e.g. Select_store.

On X86 / Mac OS X, Select_store used to be the largest function. It had a stack
frame size of 8.5k. Now the largest one is Store_i32 with a frame size of 3.1k.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:51:01 +00:00
Evan Cheng
dc7a66a081 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29378 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:19:22 +00:00
Patrick Jenkins
0dd7fb2766 Removed some unneccesary printing from the nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:06:18 +00:00
Evan Cheng
f2dfafcbc1 Rename IsFoldableBy to CanBeFoldedleBy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:03:48 +00:00
Evan Cheng
2641cad180 Remove InFlightSet hack. No longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 00:47:19 +00:00
Reid Spencer
1bc686433b Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to
have a compile-host version of "nm", not build-host. In order to effect this
we must use autoconf to determine the correct "nm" to use and propagate that
through the makefiles, through llvm-config and finally to GenLibDeps.pl as
an optional argument.
Patch contributed by Anton Korobeynikov. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 23:00:30 +00:00
Patrick Jenkins
d4623e974c Removed some unneccesary print statemnts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29362 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 21:01:39 +00:00
Patrick Jenkins
96970e9a5c ChangeDir now returns the correct value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 20:21:26 +00:00
Evan Cheng
3aac4d58e4 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29359 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 19:59:34 +00:00
Patrick Jenkins
278a6b5045 Fixed a stupid error where changedir returned false upon success.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29357 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 19:22:06 +00:00
Patrick Jenkins
c281b0d9a4 Added more descriptive output to singlesource,multisource tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29353 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 19:00:01 +00:00
Patrick Jenkins
59d1a66b82 Removed some clutter that was left over from development.
Changed how changedir worked. Hopefully now when it fails it will tell us why.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29352 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 18:28:50 +00:00
Evan Cheng
b2c121ac14 Let each target specific isel provide routine to check if a chain producing node is foldable by another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29335 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:36:49 +00:00
Patrick Jenkins
cc8414ffdb I made a stupid mistake when adding support for -use-gmake. ~PJ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:24:35 +00:00
Patrick Jenkins
1cd469124c added support for the -use-gmake option. This will come in handy when running the test on SunOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:17:17 +00:00
Patrick Jenkins
f58473f416 This change will allow support for SunOS to the testing script. It adds a check to see if we're running on SunOS and if so, then uses gmake instead of make.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:03:46 +00:00
Evan Cheng
233baf1c4b Fix for bug 840. Only use noinline attribute if gcc version >= 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 23:06:27 +00:00
Reid Spencer
c152efda47 Add a feature for debugging library dependency cycles, -why option. This
implies -flat and will produce a list of all the symbols for each library
that another library depends on. Run the output through c++filt for
better readability. Also, don't generate a temporary file for storing the
dependent library names. Perl can handle it in a %hash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-25 19:12:06 +00:00
Patrick Jenkins
26ba6095df Fixing a syntax error and adding buildtype to the .a and .o file size information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-23 22:57:28 +00:00
Patrick Jenkins
169357e3dd When the ability to gather .a and .o file sizes was added, it changed the directory the perl script was in so when we tried to run dejagnu tests, everything failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-23 21:38:07 +00:00
Patrick Jenkins
fcf207b3f7 added status message during nightly test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-22 00:00:08 +00:00
Evan Cheng
e6389935a9 Removed a hack intended to allow (store (op (load))) folding. Will handle this with preprocessing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29258 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 22:19:51 +00:00
Patrick Jenkins
25c2a2f570 Added a check to skip dejagnu test results gathering if we did not run dejagnu tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29252 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 21:58:06 +00:00
Patrick Jenkins
b67e118545 Fixed an issue of variable scope that prevented file size from being submitted to the server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29251 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 21:43:09 +00:00
Jim Laskey
cd4317efcf Eliminate data relocations by using NULL instead of global empty list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 21:15:20 +00:00
Jim Laskey
60f09928a0 Use an enumeration to eliminate data relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 20:57:35 +00:00
Patrick Jenkins
6412f72b09 Added code to get .a and .o file sizes and submit them to the server in the nightly report.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29248 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 19:51:40 +00:00
Patrick Jenkins
49717a4ee5 Fixed issue where nightly test always tells you you need to use -nickname
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29241 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 01:39:42 +00:00
Patrick Jenkins
1f556c29e3 The nightly tester will no longer report numbers instead of tests performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 01:34:01 +00:00
Evan Cheng
eb1f40d3af Also checks for noResults field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29235 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 23:36:20 +00:00
Patrick Jenkins
514e258994 We now fail and print an error message if a nightly tester does not specify a nickname on the command line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29230 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 22:28:43 +00:00
Patrick Jenkins
ba20471c75 Fixed a problem that caused the script to abort right before it sent out the information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29218 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 16:54:43 +00:00
Patrick Jenkins
65c7ea035c Removed the portion that determines which tests are newly passing/failing because we no longer keep the previos days list on the testing machines.
Added functionality to send lists of all tests, all passing tests, all failing tests all unexpected failing tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29209 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 17:52:51 +00:00
Evan Cheng
3b0c0148ed Make sub- and super- register classes const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 05:58:18 +00:00
Chris Lattner
a6dc9fb745 Fix a bug handling instructions, like blr, which just consist of a text
string.  The return value of printInstruction should be true for these.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 01:39:06 +00:00
Evan Cheng
e6f32034db Add code size to target instruction use it as the 3rd isel sorting tie-breaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 00:24:41 +00:00
Evan Cheng
6f6602ce42 Make sub- super- reg-class tables static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29190 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 22:18:31 +00:00
Patrick Jenkins
1b629444e7 yet another change to get the correct gcc version for the nightly test results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 21:21:53 +00:00
Chris Lattner
195bb4a7b0 Fix case where identical cases were not detected across case #0, because
instructions not handled would have a case value of #0, throwing things off.
This marginally shrinks the X86 asmprinter, but shrinks the sparc asmwriter
by 25 lines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29187 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 19:27:30 +00:00
Chris Lattner
0a01212857 Fix an accidentally duplicated line that caused tblgen to crash on itanium.
Add an assert that catches the real problem earlier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 19:06:01 +00:00
Chris Lattner
96c1ade5c3 Maximally group commands. When all instructions within a command set have a
series of identical commands, handle them all with one switch.  In the case
of the x86 at&t asm printer, only 3 switches are needed for all instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29184 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 18:28:27 +00:00
Chris Lattner
b84628679a Change generator to remove operands as it processes them. No change in
generated file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29183 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:56:07 +00:00
Chris Lattner
191dd1f186 Handle the last operand more intelligently. When emitting the \n, also
return from the asmprinter to make the generated asmprinter both more
efficient and smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29182 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:50:22 +00:00
Chris Lattner
e7a589df09 Emit switches with 1/2 cases as unconditional code or an if/then/else for
tidyness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:43:54 +00:00
Chris Lattner
b51ecd4dd9 Steal bits from the asm string index to use for operand information. On both
x86 and ppc, this gets us 4 more bits to play with, since the string indices
both only use 12 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29180 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:38:46 +00:00
Chris Lattner
5561640043 Merge operand info and asmstr idx into a single 32-bit field. No other change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29179 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:32:27 +00:00
Patrick Jenkins
f263704321 Minor output changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:21:30 +00:00
Chris Lattner
bdff5f95b9 Completely change the structure of the generated asmprinter to be more table
based and less switch-statements-with-hundreds-of-cases based.  This shrinks
the x86 asmprinters to about 1/3 their previous size.

Other improvements coming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29177 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 17:18:03 +00:00
Patrick Jenkins
adea55e3a5 If a gccpath is specified when invoking the nightly test script we will hopefully now use that gcc for the gcc version. Also fixed some 80 char column stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-17 16:41:19 +00:00
Evan Cheng
fb878a37ba Use __attribute__((noinline)) only if compiled by gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29161 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-16 06:14:37 +00:00
Evan Cheng
f872940dfc Parameterize target node ValueType to allow more sharing of emit functions.
Also reduce the number of arguments passed to emit functions and removed a
hack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-16 06:12:52 +00:00
Evan Cheng
fceb57a917 Reduce instruction selection code size and stack frame size by factoring
code that emit target specific nodes into emit functions that are uniquified
and shared among selection routines.
e.g. This reduces X86ISelDAGToDAG.o (release) from ~2M to ~1.5M. Stack frame
size of Select_store from ~13k down to ~8k.
This is the first step. Further work to enable more sharing will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29158 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-15 08:45:20 +00:00
Chris Lattner
fb5115e84c The generated index array should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29155 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 23:14:02 +00:00
Chris Lattner
6af022f255 Emit the string information for the asm writer as a single large string
and index into it, instead of emitting it like this:

  static const char * const OpStrs[] = {
    "PHINODE\n",        // PHI
    0,  // INLINEASM
    "adc ",     // ADC32mi
    "adc ",     // ADC32mi8
   ...

The old way required thousands of relocations that slows down link time and
dynamic load times.

This also cuts about 10K off each of the X86 asmprinters, and should shrink
the others as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:59:11 +00:00
Patrick Jenkins
79fbf7fe27 Fixed an issue where the user specified gcc was not the gcc we report to the nightly test server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 20:44:09 +00:00
Jim Laskey
cb12903147 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 22:17:08 +00:00
Jim Laskey
f1b05bf755 1. Simplfy bit operations.
2. Coalesce instruction cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29135 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 21:02:53 +00:00
Patrick Jenkins
0b7ae54da7 Syntax error. I will run perl -c before commiting perl scripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29133 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 16:58:42 +00:00
Patrick Jenkins
4bde3bc5ea Fixed some small bugs exposed when trying to get a sparc machine to run the script. Specifically some misnamed variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 16:56:48 +00:00
Jim Laskey
ed393433d2 Move base value of instruction to lookup table to prepare for case reduction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-12 19:15:43 +00:00
Jim Laskey
16d42c6ac6 It was pointed out that DEBUG() is only available with -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 18:25:13 +00:00
Jim Laskey
e37fe9b3a1 Ensure that dump calls that are associated with asserts are removed from
non-debug build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 17:58:07 +00:00
Jim Laskey
1406bdab85 Reduce bloat in target libraries by removing per machine instruction assertion
from code emitter generation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29097 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 01:25:59 +00:00
Patrick Jenkins
7267bd6c1a Fixed some output issues where newlines were not being printed after error messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29082 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-10 18:35:41 +00:00
Patrick Jenkins
7b4bb60e9a Fixed an issue that tried to cat externalprogramstable.txt from the testresults directory when it doesnt exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-10 16:36:19 +00:00
Patrick Jenkins
00fbdf1471 Syntax error in NewNightlyTest.pl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:47:24 +00:00
Patrick Jenkins
4c4e356037 Fixed a variable naming issue for the External Program Results table. Also fixed an issue with printing the sent data to a sentdata.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:40:34 +00:00
Patrick Jenkins
215b48f9a8 Updated comments at top of file to reflect relevant command line options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29065 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 18:50:51 +00:00
Patrick Jenkins
a5c04d6806 Added the -noremoveresults option which will not remove the $WebDir from the nightly test runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:31:38 +00:00
Patrick Jenkins
b26d39eae5 Fixed variable naming issue that prevented $Prefix-senddata.txt from having any information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:08:02 +00:00
Chris Lattner
a539c03271 tblgen uses EH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:21:17 +00:00
Patrick Jenkins
c6d945f91f Fixed a bug that looked for -Warnings.txt and -Tests.txt in ridiculous places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 22:32:15 +00:00
Patrick Jenkins
fe030d7869 The first commit of NewNightlyTest.pl which instead of generating a webpage submits the results of the test to a central server for storage and display.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 21:19:32 +00:00
Evan Cheng
322812e603 Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 23:57:05 +00:00
Evan Cheng
2a0f984771 Added -disable-cbe to disable C backend testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28981 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:54:37 +00:00
Evan Cheng
14c299ebca Fix -extraflags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28937 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:30:28 +00:00
Evan Cheng
6d11ddbd8d Rename EXTRA_FLAGS to EXTRA_OPTIONS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28872 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 18:49:13 +00:00
Chris Lattner
02cdb377ec Fix an error message regression. Print:
LI8:    (LI8:i64 (imm:i64):$imm)
instead of:
  LI8:    (LI8:MVT::i64 (imm:MVT::i64):$imm)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28868 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:56:37 +00:00
Chris Lattner
186fb7d131 Don't require src/dst patterns to be able to fully resolve their types,
because information about one can help refine the other.  This allows us to
write:

def : Pat<(i32 (extload xaddr:$src, i8)),
          (LBZX xaddr:$src)>;

as:

def : Pat<(extload xaddr:$src, i8),
          (LBZX xaddr:$src)>;

because tblgen knows LBZX returns i32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28865 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:31:27 +00:00
Chris Lattner
a354849c27 Make sure to use the result of the pattern to infer the result type of the
instruction, and the result type of the instruction to refine the pattern.
This allows us to write things like this:

def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (v2i64 VR128:$src)>;

as:
def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (VR128:$src)>

and fixes a ppc64 issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28863 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:18:02 +00:00
Chris Lattner
8f60d54fb1 Improve a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28833 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:25:06 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Evan Cheng
d7c2c86239 Allow more use of iPTR in patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 00:16:37 +00:00
Evan Cheng
e945f4d3d4 Added support for variable_ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 22:22:20 +00:00
Evan Cheng
bc6b86a89e Fix support for optional input flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 19:27:50 +00:00
Evan Cheng
50c997e26a getOperandNum(): error if specified operand number is out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 21:47:27 +00:00
Chris Lattner
f6dc20fcc0 Add a new -compileflags options, remove old externals location specifiers.
People should just use -with-externals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 19:03:17 +00:00
Chris Lattner
11bcd28dff Wrap to 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 23:59:44 +00:00
Evan Cheng
19fd7ef730 Add -extraflags FLAGS to pass extra compilation options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 05:28:07 +00:00
Reid Spencer
d386e55e33 Don't build tblgen with -pedantic or -Wno-long-long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 18:20:23 +00:00
Evan Cheng
553ef1be94 Can't trust NodeDepth when checking for possibility of load folding creating
a cycle. This increase the search space and will increase compile time (in
practice it appears to be small, e.g. 176.gcc goes from 62 sec to 65 sec)
that will be addressed later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 20:16:55 +00:00
Evan Cheng
b0793f9741 Fixed a really ugly bug. The TableGen'd isel is not freeing the "inflight set"
correctly. That is causing non-deterministic behavior (and possibly preventing
some load folding from happening).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28458 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 00:21:44 +00:00
Chris Lattner
243be2c80d Don't make zero-sized static arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:31:02 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Evan Cheng
d15531b430 Now that iPTR is a fully resolved type. We end up losing the type check for
patterns that look like this:

def : Pat<(i32 (X86Wrapper tconstpool  :$dst)), (MOV32ri tconstpool  :$dst)>;

InsertOneTypeCheck should copy the type from the resolved pattern to the
unresolved one as long as there types are different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 07:24:32 +00:00
Evan Cheng
21d03f2de0 lib/Target/Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 20:42:07 +00:00
Evan Cheng
764811f145 Don't generate getCalleeSaveReg and getCalleeSaveRegClasses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 00:08:46 +00:00
Evan Cheng
6b12516f1a Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:55:51 +00:00
Evan Cheng
2618d07765 Remove PointerType from target definition. Use abstract type MVT::iPTR to
represent pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28363 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:37:59 +00:00
Evan Cheng
44a65fa552 Allow patterns to refer to physical registers that belong to multiple
register classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 07:05:30 +00:00
Reid Spencer
dd73e7fa09 Don't try to reference uninitialized data. Make sure we can find "nm".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-13 02:48:45 +00:00
Evan Cheng
9812f1ca97 Noop instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28241 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 07:47:00 +00:00
Evan Cheng
d9d4518a86 Unused instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 07:42:01 +00:00
Evan Cheng
2ca0efd71a Also add super- register classes info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28221 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-11 07:30:26 +00:00
Evan Cheng
3eff89bf89 Watch out for the following case:
1. Use expects a chain output.
2. Node is expanded into multiple target ops.
3. One of the inner node produces a chain, the outer most one doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28209 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-10 02:47:57 +00:00
Evan Cheng
045953c37a Fix a load folding bug. It is exposed by a multi- resulting instructions
def : Pat<> pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28208 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-10 00:05:46 +00:00
Evan Cheng
8d58e6a9be Add sub-register class information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 06:34:26 +00:00
Reid Spencer
829bcb172a Attempt to get this script working on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 18:16:01 +00:00
Evan Cheng
108714c14f Set isStore of instructions with ISD::TRUNCSTORE root node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 02:08:34 +00:00
Chris Lattner
eff5c36238 Put instruction names into the first non TargetInstrInfo namespace found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 23:46:16 +00:00
Chris Lattner
a1e8a80b96 instructions can be in different namespaces. Make sure to use the right
one for each instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28038 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 17:01:17 +00:00
Evan Cheng
afba446d99 Formating
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:30:17 +00:00
Evan Cheng
6f6360d9ab Mark instructions whose pattern is (store ...) isStore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:04:20 +00:00
Evan Cheng
55d0fa1bfa Remove the temporary option: -no-isel-fold-inflight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 18:54:11 +00:00
Evan Cheng
61a0209a8a When isel'ing a node, mark its operands "InFlight" before selecting them. These
nodes should not be folded into other nodes.
This fixes the miscompilation of PR 749.
Temporarily under flag control.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28002 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 02:08:10 +00:00
Nate Begeman
37efe67645 JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-22 18:53:45 +00:00
Reid Spencer
444b2cf4c3 Remove the extraneous --defined-only option to nm. This is the default and
some versions of nm don't recognize it (its a gnu option).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-21 05:29:25 +00:00
Reid Spencer
44fa691873 Don't require the "dot" program if -flat option is given, and don't produce
any of the fancy graphs or other output. Just produce the flat, makefile
style output on stdout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 23:09:57 +00:00
Reid Spencer
ca40bb95b1 Remove the llvm-config directory. Its now in tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:16:32 +00:00
Reid Spencer
ca432acc52 llvm-config doesn't live here anymore ==> tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:15:41 +00:00
Reid Spencer
d075dfb0cf Update the library dependencies for 1.8 with SparcV9 now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 19:50:53 +00:00
Reid Spencer
118af5f6d6 Remove Burg as a directory to be considered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27906 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:47:13 +00:00
Chris Lattner
ab38f5be3a remove some stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27903 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:43:59 +00:00
Reid Spencer
63ed92e882 Burg not needed any more now that SparcV9 is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27901 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:39:19 +00:00
Chris Lattner
719c2fc97f Don't fill in fields that no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:32:22 +00:00
Evan Cheng
c81d2a041d Rename AddedCost to AddedComplexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 20:36:09 +00:00
Evan Cheng
5941320c0d Allow "let AddedCost = n in" to increase pattern complexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 18:07:24 +00:00
Chris Lattner
309db81c10 Fix a build failure on Vladimir's tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 00:21:25 +00:00
Chris Lattner
8c3e847159 Encode a cost of zero as a cost of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 05:25:16 +00:00
Chris Lattner
195d8adac9 Really, I can count!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 05:05:52 +00:00
Chris Lattner
cf1f6440d9 assign stable opcodes to the various altivec ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:47:18 +00:00
Chris Lattner
2f97623bda PPCPerfectShuffle.h is autogenerated, don't include it in the LOC counts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:46:09 +00:00
Chris Lattner
4ad53bdd19 Rename BuildShuffleTable -> PerfectShuffle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:35:34 +00:00
Chris Lattner
3033d4d375 rename the table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:33:35 +00:00
Chris Lattner
27e98aa07c Initial checking of a perfect shuffle generation program for 4-element
Altivec vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:30:41 +00:00
Reid Spencer
43fdfdcfd1 Allow an option, -with-externals, to be specified that provides the location
of the external tests. This turns into --with-externals option to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 13:53:56 +00:00
Reid Spencer
28421d0a80 Add missing things to the distribution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 06:27:20 +00:00
Chris Lattner
7f71e21972 one too many l's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 04:21:31 +00:00
Reid Spencer
42aa3a59c9 Fix a typo in the name of a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 23:15:10 +00:00
Reid Spencer
db4f336165 Additional files to distribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27627 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 20:54:01 +00:00
Reid Spencer
d853fd6b6d Add the llvm-config directory to the EXTRA_DIST line so it gets distributed
even though its not being built currently. This prevents dist-check from
failing because configure can't find llvm-config.in.in


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 19:06:14 +00:00
Andrew Lenharth
65c1e46ebd make recovering running_Olden data easier when the nightly tester eats the graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27615 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 17:41:19 +00:00
Chris Lattner
4b2362e247 Fix a typo: Instr* -> Intr*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27568 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-10 22:02:59 +00:00
Chris Lattner
91ded08224 Infer element types for shuffle masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-06 20:36:51 +00:00
Chris Lattner
52793e2c41 rename a method, to avoid confusion with llvm intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-06 20:19:52 +00:00
Chris Lattner
5348e393df Adjust the Intrinsics.gen interface a little bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-02 03:35:30 +00:00
Chris Lattner
b83169195c regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 21:54:11 +00:00
Chris Lattner
711e5d96aa Generalize the previous binary operator support and add a string concatenation
operation.  This implements Regression/TableGen/strconcat.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 21:53:49 +00:00
Chris Lattner
ffa4fdcd17 Allow bits init values to be used in patterns, turn them into ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 05:25:56 +00:00
Chris Lattner
f124b46b4f Final bugfix for PR724. GCC won't inline varargs functions, so use one to
validate the prototype of intrinsic functions.  This prevents GCC from going
crazy and inlining too much stuff, eventually running out of memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 04:48:26 +00:00
Chris Lattner
c4d9b240b1 When emitting code for the verifier, instead of emitting each case statement
independently, batch up checks so that identically typed intrinsics share
verifier code.  This dramatically reduces the size of the verifier function,
which should help avoid GCC running out of memory compiling Verifier.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 04:24:58 +00:00
Chris Lattner
8177969be0 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-30 22:51:12 +00:00
Chris Lattner
8c06318821 Implement Regression/TableGen/DagDefSubst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-30 22:50:40 +00:00
Evan Cheng
f065a6f711 Don't sort the names before outputing the intrinsic name table. It causes a
mismatch against the enum table.
This is a part of Sabre's master plan to drive me nuts with subtle bugs that
happens to only affect x86 be. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27237 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 22:25:56 +00:00
Chris Lattner
b026e70462 Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value. Split them into separate enums.
Also, don't emit dynamic checks when we can compute them statically


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27202 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:41:33 +00:00
Chris Lattner
6a160fba22 Only compute intrinsic valuetypes when in a target .td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:15:00 +00:00
Chris Lattner
76f8c7c4cc revert this, it breaks things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:03:08 +00:00
Chris Lattner
8850a1bcef Add support for decoding iPTR to the right pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 22:48:18 +00:00
Chris Lattner
2c4e65d460 Print error messages like this:
tblgen: In STVEBX: Intrinsic 'llvm.ppc.altivec.stvebx' expects 3 operands, not 2 operands!

instead of like this:
tblgen: In STVEBX: Intrinsic 'intrinsic_void expects 3 operands, not 2 operands!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 22:21:18 +00:00
Chris Lattner
5c4c774c75 Add a missing check which cause an invalid .td file to crash tblgen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 22:12:44 +00:00
Chris Lattner
9bf2d3e6d6 When failing selection for an intrinsic, print this:
Cannot yet select: intrinsic %llvm.ppc.altivec.lvx

instead of this:

Cannot yet select: 0x9b047e0: v4i32,ch = INTRINSIC 0x9b04540:1, 0x9b04710, 0x9b04790, 0x9b04540


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 06:47:53 +00:00
Chris Lattner
5a1df389a6 Change approach so that we get codegen for free for intrinsics. With this,
intrinsics that don't take pointer arguments now work.  For example, we can
compile this:

int test3( __m128d *A) {
  return _mm_movemask_pd(*A);
}
int test4( __m128 *A) {
  return _mm_movemask_ps(*A);
}

to this:

_test3:
        movl 4(%esp), %eax
        movapd (%eax), %xmm0
        movmskpd %xmm0, %eax
        ret
_test4:
        movl 4(%esp), %eax
        movaps (%eax), %xmm0
        movmskps %xmm0, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 23:10:39 +00:00
Chris Lattner
947604b0e2 fix 80 column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:52:20 +00:00
Chris Lattner
550525e3cf Parse intrinsics correctly and perform type propagation. This doesn't currently
emit the code to select intrinsics, but that is next :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27082 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:48:51 +00:00
Jim Laskey
47622e3721 Add dwarf register numbering to register data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:15:58 +00:00
Chris Lattner
2ca956f8de Make sure to initialize the TheDef field!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27078 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 20:25:01 +00:00
Chris Lattner
43fbbc36dc Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest of
the CodeGen* implementations.

Parse the MVT::ValueType for each operand of the intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 19:49:31 +00:00
Chris Lattner
7056de375d extract some more information from the intrinsic table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:13:55 +00:00
Reid Spencer
1c070fc10b Remove the interpreter component as its not working at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:10:39 +00:00
Reid Spencer
96bfd4a40e Add a .cvsignore file to get rid of notices about gram.tab.[ch]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:46:47 +00:00
Reid Spencer
4d9f05cdcb Add new generated files to be ignored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:45:32 +00:00
Reid Spencer
f39fcc787b Ignore temporary files generated by building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:44:24 +00:00
Reid Spencer
b195d9d365 Update to llvm-config tool, by Erik Kidd:
1. Check for Perl and only build llvm-config if its available.
2. Add some virtual components
3. Don't depend on "standard" location for Perl, but configured location
4. Document the tool with a POD file.

This version is now ready for testing by users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27005 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:21:29 +00:00
Reid Spencer
2fee235bf3 A little script to find LLVM symbols. Ideally this would use c++filt for
both input and output to render everything in C++, but that will be the
next patch. For now, it just runs nm and greps each .o or .a file for
the desired symbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27003 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:04:50 +00:00
Reid Spencer
025213e9f2 Don't print out ugly command line when building LibDeps.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 22:42:50 +00:00
Reid Spencer
ff9b038b20 Updated for library changes:
1. LLVMCBackend.o now depends on LLVMCodeGen.o (why we're not sure)
2. LLVMExecutionEngine.o no longer depends on LLVMInterpreter.o nor LLVMJIT.o
Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 06:15:27 +00:00
Evan Cheng
83e1a6ab95 Allow result node to be a simple leaf node. This enable bitconvert patterns
like this:
def : Pat<(v4i32 (bitconvert (v4f32 VR128:$src))), (v4i32 VR128:$src)>;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 02:35:32 +00:00
Reid Spencer
f2722ca339 These changes are necessary to support the new llvm-config tool. llvm-config
is a handy tool for users of LLVM who want to be able to quickly get
information about LLVM's configuration. It is intended to be used in the
command line of other tools. Documentation will be forthcoming in a
subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26952 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-22 15:59:55 +00:00
Evan Cheng
3a7a14b0ae Don't forget to promote xform function to an explicit node for def : Pat<>
patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-21 20:44:17 +00:00
Chris Lattner
4e2f54d99e minor code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-21 06:42:58 +00:00