summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAge
* Eliminate TargetRegisterDesc::ImmSubRegs. It's no longer in use.Evan Cheng2008-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52892 91177308-0d34-0410-b5e6-96231b3b80d8
* check in anton's patch to make inlining happen in a determinstic orderChris Lattner2008-06-30
| | | | | | | | and fix the bug that it uncovers: inlining a pattern fragment could bring in other pattern fragments if the inlinee hadn't already been inlined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52888 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes the last x86-64 test failure in compat.exp:Dale Johannesen2008-06-26
| | | | | | | | | | | | | | | <16 x float> is 64-byte aligned (for some reason), which gets us into the stack realignment code. The computation changing FP-relative offsets to SP-relative was broken, assiging a spill temp to a location also used for parameter passing. This fixes it by rounding up the stack frame to a multiple of the largest alignment (I concluded it wasn't fixable without doing this, but I'm not very sure.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52750 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MemOperands to Atomic operations since Atomics touches memory.Mon P Wang2008-06-25
| | | | | | | | | Added abstract class MemSDNode for any Node that have an associated MemOperand Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and atomic.lss => atomic.load.sub git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52706 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for building on solaris, working around namespaceChris Lattner2008-06-24
| | | | | | | polution problems from system headers. Patch by Nathan Keynes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52682 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract the x86_64 part for the executables.Bill Wendling2008-06-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52647 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add "Commutative" property to intrinsics. This allows tblgen to generate ↵Evan Cheng2008-06-16
| | | | | | | | | the commuted variants for dagisel matching code. - Mark lots of X86 intrinsics as "Commutative" to allow load folding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52353 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some debug output from tblgen. This fixes a test.Matthijs Kooijman2008-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52177 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser support for immediate constant aggregate values.Dan Gohman2008-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52149 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-06
| | | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
* Escape "$#".Nick Lewycky2008-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51998 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #includes required by GCC 4.3, thanks for Zhongxing XuChris Lattner2008-06-04
| | | | | | | for reporting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51926 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the polygen grammer for the new insertvalue and extractvalue syntax.Dan Gohman2008-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51879 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the position of MemOperands in nodes that use variadic_opsDan Gohman2008-06-02
| | | | | | | | | | | | | in DAGISelEmitter output. This bug was recently uncovered by the addition of patterns for CALL32m and CALL64m, which are nodes that now have both MemOperands and variadic_ops. This bug was especially visible with PIC in various configurations, because the new patterns are matching the indirect call code used in many PIC configurations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51877 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize members properly during constructionAnton Korobeynikov2008-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51841 91177308-0d34-0410-b5e6-96231b3b80d8
* Callback was not executed on OS X when it was a function.Mikhail Glushenkov2008-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51814 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the DAGISelEmitter to not compute the variable_ops operandDan Gohman2008-05-31
| | | | | | | | | | | | index for the input pattern in terms of the output pattern. Instead keep track of how many fixed operands the input pattern actually has, and have the input matching code pass the output-emitting function that index value. This simplifies the code, disentangles variables_ops from the support for predication operations, and makes variable_ops more robust. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51808 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 51775.Evan Cheng2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51795 91177308-0d34-0410-b5e6-96231b3b80d8
* Patches for building llvm on Solaris x86. Contributed by Nathan Keynes.Evan Cheng2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51775 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a check for side effect-free options (specified only in the OptionList).Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51759 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactoring: remove code duplication introduced in the previous patch.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51757 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactoring: split CollectProperties into two separate function objects.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51756 91177308-0d34-0410-b5e6-96231b3b80d8
* New feature: OptionList.Mikhail Glushenkov2008-05-30
| | | | | | | | | | | | | | | | | | | It can be handy to have all information about options gathered in a single place to provide an overview of all supported options. This patch allows the following: def Options : OptionList<[ (switch_option "E", (help "Help string")), (alias_option "quiet", "q") ... ]>; Tool-specific option properties (like 'append_cmd') have (obviously) no meaning in this context, so the only properties that are allowed are 'help' and 'required'. See usage example in examples/Clang.td. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51754 91177308-0d34-0410-b5e6-96231b3b80d8
* A small optimization: use static char* array instead of StrVector.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51752 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to test if the '-o' option is provided.Mikhail Glushenkov2008-05-30
| | | | | | | | | | | The following is now allowed: (case (not_empty "o"), do_something, ...) This didn't work previously because "-o" is built-in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51751 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix: 'sink' handling was broken.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51750 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for option aliases.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51749 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow nesting of case expressions.Mikhail Glushenkov2008-05-30
| | | | | | | | | | | | The following is now legal: (case (in_language "c"), (case (switch_on "E"), "gcc -x c -E $INFILE", (default), "gcc -x c $INFILE"), (default), "gcc $INFILE $OUTFILE") git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51748 91177308-0d34-0410-b5e6-96231b3b80d8
* Small error message improvement.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51747 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove RequireDefault parameter from EmitCaseConstructHandler.Mikhail Glushenkov2008-05-30
| | | | | | | There are now no situations when 'default' is required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51746 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some headers.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51745 91177308-0d34-0410-b5e6-96231b3b80d8
* New tests for the 'case' expression: not_empty, in_language.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51744 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to have multiple input languages for a single tool.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51742 91177308-0d34-0410-b5e6-96231b3b80d8
* Better error reporting for the 'case' construct.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51738 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not generate empty 'if's for the output_suffix property.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51737 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to use hooks like this: '$CALL(MyHook)/path/to/file'.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51734 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to change the output file suffix based on command-line options.Mikhail Glushenkov2008-05-30
| | | | | | | | | | | For instance, the following command: llvmc2 -E hello.c now generates a file with the correct suffix (hello.i). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for user-provided hooks and environment variable reads to the ↵Mikhail Glushenkov2008-05-30
| | | | | | | | | | | | | | | cmd_line tool property. Used like this: (cmd_line "$CALL(MyHook) --option -o $ENV(VARIABLE) $CALL(AnotherHook)") Also works with case expressions. Hook declarations are auto-generated, the definitions should be provided by the user (just drop a .cpp file in the tools/llvmc2 directory). Hooks should live in the "hooks" namespace and have type std::string hooks::Hook(void). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51732 91177308-0d34-0410-b5e6-96231b3b80d8
* Some small tweaks to make the generated code prettier.Mikhail Glushenkov2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51729 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to use the generalised 'case' construct in the cmd_line ↵Mikhail Glushenkov2008-05-30
| | | | | | property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51728 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a generalised 'case' construct.Mikhail Glushenkov2008-05-30
| | | | | | | Besides assigning edge weights, it will also be used by the cmd_line tool property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51727 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patterns for CALL32m and CALL64m. They aren't matched in mostDan Gohman2008-05-29
| | | | | | | | | | | | | cases due to an isel deficiency already noted in lib/Target/X86/README.txt, but they can be matched in this fold-call.ll testcase, for example. This is interesting mainly because it exposes a tricky tblgen bug; tblgen was incorrectly computing the starting index for variable_ops in the case of a complex pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51706 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a tblgen problem handling variable_ops in tblgen instructionDan Gohman2008-05-29
| | | | | | | | | | | | | definitions. This adds a new construct, "discard", for indicating that a named node in the input matching pattern is to be discarded, instead of corresponding to a node in the output pattern. This allows tblgen to know where the arguments for the varaible_ops are supposed to begin. This fixes "rdar://5791600", whatever that is ;-). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51699 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to indicate that an instruction is as cheap (or cheaper) than a moveBill Wendling2008-05-28
| | | | | | | | | | instruction to execute. This can be used for transformations (like two-address conversion) to remat an instruction instead of generating a "move" instruction. The idea is to decrease the live ranges and register pressure and all that jazz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51660 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the spelling of the va_arg keyword.Dan Gohman2008-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51484 91177308-0d34-0410-b5e6-96231b3b80d8
* Make structs and arrays first-class types, and add assemblyDan Gohman2008-05-23
| | | | | | | | | | and bitcode support for the extractvalue and insertvalue instructions and constant expressions. Note that this does not yet include CodeGen support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a polygen grammar definition for LLVM assembly language.Dan Gohman2008-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51449 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not generate by TableGen the hard-coded standard, target-independent part ofRoman Levenstein2008-05-14
| | | | | | | | | | | | | | | | DAG instruction selectors. Introudce a dedicated header file for this part: include/llvm/CodeGen/DAGISelHeader.h TableGen now only generates the include preprocessor directive to include this new header. This is a preparation for supporting multiple implementations of instruction selectors in the future. Reviewed and approved by Evan and Dan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51102 91177308-0d34-0410-b5e6-96231b3b80d8
* Filter option names to escape symbols not allowed as C++ identifiers.Mikhail Glushenkov2008-05-12
| | | | | | | | Makes it possible to use options with names like "Wa,". Also fixes the -Wall option handling as a side-effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50973 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 50867: A small refactoring (extract method) + some comment fixes.Mikhail Glushenkov2008-05-09
| | | | | | | Fixed the build breakage, sorry for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50895 91177308-0d34-0410-b5e6-96231b3b80d8