Commit Graph

1517 Commits

Author SHA1 Message Date
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