Commit Graph

307 Commits

Author SHA1 Message Date
John Criswell
66622be46a Added the MakeFileReadable() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:09:30 +00:00
John Criswell
9adeccc552 Added a description of the algorithm.
Return failure if the chmod() fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:30:16 +00:00
John Criswell
6991a03753 Added the MakeFileExecutable() method. This method takes a filename and
gives it execute access while respecting the user's umask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8324 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:14:57 +00:00
John Criswell
96b4beda5c Added an option to TableGen that allows users to specify a directory in which
to find include files.  TableGen will load include files from this directory if
it cannot find them in the current directory.
This feature was needed for building code inside the object tree (a la autoconf
style).
TODO: Allow for multiple -I options to specify a list of directories to search.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 13:41:57 +00:00
Chris Lattner
aa8a847c62 Mangle ALL letters that we do not allow, not just a few.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8140 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 21:08:38 +00:00
Chris Lattner
c07ae39c3d Ignore more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8081 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 20:35:08 +00:00
Chris Lattner
f7c4acef99 Initial checkin of ValueHolder helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8072 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 19:43:16 +00:00
Chris Lattner
87486b483c Only use :: rules for #included files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8026 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 21:47:12 +00:00
Chris Lattner
a83de0bf77 Fix warning on sparc build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8006 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 15:59:16 +00:00
John Criswell
43bf32e86c Added #include <cassert>. In GCC 3.3, we don't get assert() through the other
language header files like we did under 3.2.1, and we're not grabbing it
through the LLVM header files either.  So just include it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7996 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-20 22:07:45 +00:00
Misha Brukman
86f665b431 X86.td has been moved out of this directory; these are outdated targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7971 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-19 16:11:38 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Brian Gaeke
c48ef2ae36 lib/Support/CommandLine.cpp:
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)

Collapse ParseCStringVector into ParseStringVector.  Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.

include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7905 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 21:05:57 +00:00
Chris Lattner
c7df109b6c Ignore dummy register classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:36:19 +00:00
Chris Lattner
673537e5c0 Add support for nodes with void arguments, like chain nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7869 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:28:04 +00:00
Brian Gaeke
06b06c5f00 Add support for reading command line arguments from an environment variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7851 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 22:00:59 +00:00
Misha Brukman
c3fe45b2f5 Using std::remove' requires cstdio.h'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7843 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 16:05:35 +00:00
Misha Brukman
6ad9076554 Using std::string requires `#include <string>', says gcc-2.95.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7833 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 22:27:15 +00:00
Chris Lattner
a4ca41eca7 This file uses stable_sort
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7831 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 21:32:37 +00:00
Chris Lattner
33fbad7024 Reenable optimized build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 20:46:50 +00:00
Chris Lattner
42f3372742 Fix emission of instructions that directly reference MBBs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 05:19:49 +00:00
Chris Lattner
6b666e8afe Add support for the Any type. Minor fixes and enhancements for BasicBlock operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:56:42 +00:00
Chris Lattner
c12a61463a Rename DNVT_bool to DNVT_i1 to be consistent with type system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:28:21 +00:00
Chris Lattner
723915b13e Add support for a bool argty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7766 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:12:42 +00:00
Chris Lattner
7b56ce409f It is not an error if a rule does not match, it's just a failed match!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7761 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 22:30:51 +00:00
Chris Lattner
abb215e588 Add support for frameidx and literal immediates for instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 21:28:59 +00:00
Chris Lattner
57fb6ab871 Add support for naming the destination of a "set" in a pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:32:02 +00:00
Chris Lattner
88118bf787 Add support for the Arg1 argument type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:25:52 +00:00
Chris Lattner
2b3860faeb Add support to the mangler for targets which require _'s on global symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7741 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:34:29 +00:00
Chris Lattner
3eda2eb23e Don't forget to initializer result field to 0!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7729 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:47:35 +00:00
Misha Brukman
91f2e9aa08 Put printouts of acquired patterns under the DEBUG() guard, fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:16:12 +00:00
Chris Lattner
053a205d63 Add full support for code generating expanders!
This includes support for referencing named arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7715 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 23:51:52 +00:00
Chris Lattner
990db46e9a Implement autopromotion of leaf trees from arguments to nodes of their own,
making it easier to write patterns without lots of extraneous parens


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7714 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 22:38:36 +00:00
Chris Lattner
91290d7e9a Implement correct parsing, representation, and printing of DAG argument names
Implements testcase TableGen/TreeNames.td


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7713 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 22:14:13 +00:00
Chris Lattner
fb9ea58eb1 Recognize $foo as a variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7712 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 22:04:25 +00:00
Chris Lattner
094ec50a28 Implement real code emission, at least for Instruction patterns,
next up: support for expanders


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7710 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 21:54:43 +00:00
Chris Lattner
616700402a First cut at emitting the reducer. This reducer just prints out the patterns
selected, but it seems to work great!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7709 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 20:34:13 +00:00
Chris Lattner
9552b8c159 Finish the matcher!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7707 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 19:50:51 +00:00
Chris Lattner
b72fb7ef75 Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7706 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 19:50:32 +00:00
Chris Lattner
955c1be529 This implements a large amount of the matcher, in fact, all of it except for one bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7702 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-08 22:29:23 +00:00
Chris Lattner
6dafd3921d Emit the first half of the instruction selector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7701 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-08 16:30:10 +00:00
Chris Lattner
ef0ce6a494 Finish implementation of nonterminal instantiation.
Tree patterns are now, finally, ready to use!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7699 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 23:16:20 +00:00
Chris Lattner
d3464c19a8 Add new method to get a value type as a string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7698 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 23:15:21 +00:00
Misha Brukman
da81eca4bb close() requires "unistd.h" .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7695 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:35:41 +00:00
Misha Brukman
f7066c76d2 Doxygen-ify the comments by using '///' instead of '//'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7694 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:34:25 +00:00
Misha Brukman
35d402fbba Remove references to `bugpoint' from the now-generic system utilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:33:33 +00:00
Misha Brukman
3d1b0c7331 Moved removeFile() and getUniqueFilename() into FileUtilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7691 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:28:50 +00:00
Chris Lattner
5709e512b1 Implement type-inference/checking for non-terminal references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:02:56 +00:00
Chris Lattner
ee858d2a83 Rename all of the "Process" methods to be "read" methods, start the Instantiate method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7685 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 20:42:23 +00:00
Chris Lattner
90825b4b4b Add support for "cast" nodes, which are required when there is not enough information
to infer type type of all nodes, e.g. (ret imm)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7684 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 19:59:42 +00:00