summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Incoming (and optional) flag bugs. They may be embedded inside a inner node ofEvan Cheng2006-01-261-30/+56
| | | | | | | a pattern. Also, nodes which take incoming flag should not be folded if it has more than one use. llvm-svn: 25627
* Fix an optional in flag bug.Evan Cheng2006-01-241-19/+64
| | | | llvm-svn: 25590
* Optional InFlag was not being included in node.Evan Cheng2006-01-241-1/+1
| | | | llvm-svn: 25588
* Prevent folding of a node with multiple uses if the node already folds a load!Evan Cheng2006-01-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is an example where the load ended up being done twice: %A = global uint 0 uint %test(uint %B, ubyte %C) { %tmp = load uint *%A; %X = shl uint %tmp, ubyte %C %Cv = sub ubyte 32, %C %Y = shr uint %B, ubyte %Cv %Z = or uint %Y, %X store uint %Z, uint* %A ret uint %Z } ==> subl $4, %esp movl %ebx, (%esp) movl 8(%esp), %edx movl A, %eax movb 12(%esp), %bl movb %bl, %cl shldl %cl, %edx, %eax movb %bl, %cl shldl %cl, %edx, A movl (%esp), %ebx addl $4, %esp ret llvm-svn: 25471
* Bug fix. Flag operand number may be calculated incorrectly.Evan Cheng2006-01-191-8/+13
| | | | llvm-svn: 25465
* Use pattern information to determine whether the use expects thisEvan Cheng2006-01-191-2/+5
| | | | | | | | | instruction to produce a result. e.g MUL8m, the instruction does not produce a explicit result. However it produces an implicit result in AL which would be copied to a temp. The root operator of the matching pattern is a mul so the use would expect it to produce a result. llvm-svn: 25458
* Prevent unnecessary CopyToReg when the same HW register appears in two spotsEvan Cheng2006-01-191-0/+9
| | | | | | in the pattern. llvm-svn: 25437
* Emit a type matching check for ComplexPatterns.Evan Cheng2006-01-171-0/+2
| | | | llvm-svn: 25392
* Type inferencing bugEvan Cheng2006-01-151-0/+2
| | | | llvm-svn: 25337
* Allow transformation from GlobalAddress to TargetGlobalAddress andEvan Cheng2006-01-121-13/+24
| | | | | | ExternalSymbol to TargetExternalSymbol. llvm-svn: 25252
* GlobalAddress -> TargetGlobalAddress; ExternalSymbol -> TargetExternalSymbolEvan Cheng2006-01-121-2/+14
| | | | llvm-svn: 25245
* Some minor fixes.Evan Cheng2006-01-111-26/+19
| | | | llvm-svn: 25227
* Always select target registers to themselvesChris Lattner2006-01-111-0/+1
| | | | llvm-svn: 25218
* Emit an error instead of an assertion if trying to do bogus things in result ↵Chris Lattner2006-01-111-2/+2
| | | | | | patterns. llvm-svn: 25194
* * Remove instruction fields hasInFlag / hasOutFlag and added SNDPInFlag andEvan Cheng2006-01-091-41/+56
| | | | | | | | | SNDPOutFlag to DAG nodes. These properties do not belong to target specific instructions. * Added DAG node property SNDPOptInFlag. It's same as SNDPInFlag except it's optional. Used by ret / call, etc. llvm-svn: 25154
* Pattern complexity calculation fix.Evan Cheng2006-01-061-4/+9
| | | | llvm-svn: 25133
* Tweak pattern complexity calc.Evan Cheng2006-01-061-9/+4
| | | | llvm-svn: 25122
* Bug fix wrt chain operand.Evan Cheng2006-01-061-7/+4
| | | | llvm-svn: 25115
* Replace fix with one less disruptive to the original code.Jeff Cohen2006-01-041-4/+3
| | | | | | Also note that GCC 4.1 also correctly flags the syntax error. llvm-svn: 25076
* Tblgen was generating syntactically illegal C++ code like:Jeff Cohen2006-01-041-3/+4
| | | | | | | | | SDOperand Tmp0,Tmp1,Tmp2,Tmp3,; GCC has a bug (24907) in which is fails to catch this, but VC++ correctly notes its illegality, so tblgen must be taught to only generate legal C++. llvm-svn: 25075
* Remove obsolete comment, make things look a bit nicerChris Lattner2006-01-041-2/+1
| | | | llvm-svn: 25070
* reduce stack usage of the recursive SelectCode function by out-lining eachChris Lattner2006-01-041-44/+61
| | | | | | case of the switch statement into its own method. llvm-svn: 25069
* Remove my previous ugly hack that tries to reduce the stack space usageChris Lattner2006-01-031-68/+25
| | | | | | of SelectCode to make way for a better solution. llvm-svn: 25068
* HP-UX DVDs are crunchy and good to eatDuraid Madina2005-12-301-1/+1
| | | | llvm-svn: 25052
* Add support for generating v4i32 altivec codeNate Begeman2005-12-301-84/+155
| | | | llvm-svn: 25046
* Added field noResults to Instruction.Evan Cheng2005-12-261-4/+1
| | | | | | | | | | | | Currently tblgen cannot tell which operands in the operand list are results so it assumes the first one is a result. This is bad. Ideally we would fix this by separating results from inputs, e.g. (res R32:$dst), (ops R32:$src1, R32:$src2). But that's a more distruptive change. Adding 'let noResults = 1' is the workaround to tell tblgen that the instruction does not produces a result. It works for now since tblgen does not support instructions which produce multiple results. llvm-svn: 25017
* support targetexternalsymAndrew Lenharth2005-12-241-0/+4
| | | | llvm-svn: 25005
* * Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAGEvan Cheng2005-12-231-107/+106
| | | | | | | support which is fragile. * Fixed a number of bugs. llvm-svn: 24996
* silence some bogus gcc warningsChris Lattner2005-12-221-2/+2
| | | | llvm-svn: 24962
* Attempt to fix a crash on WIN32.Evan Cheng2005-12-221-15/+16
| | | | llvm-svn: 24936
* * Added support for FLAG - a special nameless flag register. Can be used asEvan Cheng2005-12-221-54/+66
| | | | | | | either an operand or a result. * Fixed some more flag / chain bugs. llvm-svn: 24933
* Allows instructions which no explicit operands. e.g. X86 RET which has butEvan Cheng2005-12-211-6/+5
| | | | | | an implicit flag operand. llvm-svn: 24916
* Eliminate some GCC warnings from the generated codeChris Lattner2005-12-211-10/+18
| | | | llvm-svn: 24897
* Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;Evan Cheng2005-12-201-1/+1
| | | | llvm-svn: 24883
* This ugly patch works around a GCC bug where it is compiling SelectCode toChris Lattner2005-12-201-22/+56
| | | | | | | | | | | | | use too much stack space, overflowing the stack for large functions. Instead of emitting new SDOperands in each match block, we emit some common ones at the top of SelectCode then reuse them when possible. This reduces the stack size of SelectCode from 28K to 21K. Note that GCC compiles it to 512 bytes :-/ I've filed GCC PR 25505 to track this. llvm-svn: 24882
* Now support instructions with implicit write to non-flag registers.Evan Cheng2005-12-201-51/+91
| | | | llvm-svn: 24878
* Lefted out a fix in the previous check in.Evan Cheng2005-12-201-1/+7
| | | | llvm-svn: 24873
* Fix another bug related to chain / flag.Evan Cheng2005-12-191-8/+20
| | | | llvm-svn: 24868
* Fixes for a number of bugs: save flag results in CodeGenMap, folded chainsEvan Cheng2005-12-191-23/+33
| | | | | | may not all have ResNo == 0. llvm-svn: 24858
* Handle basic block nodesChris Lattner2005-12-181-0/+1
| | | | llvm-svn: 24833
* More fixes for Selection of copyto/fromreg with a flagChris Lattner2005-12-181-11/+10
| | | | llvm-svn: 24829
* Select copytoreg and copyfromreg nodes that have flag operands correctly.Chris Lattner2005-12-181-9/+37
| | | | llvm-svn: 24827
* Support for read / write from explicit registers with FlagVT type.Evan Cheng2005-12-171-40/+89
| | | | llvm-svn: 24753
* Added support to specify predicates.Evan Cheng2005-12-141-37/+72
| | | | llvm-svn: 24715
* Skip over srcvalue nodes when generating ISEL code.Evan Cheng2005-12-141-1/+7
| | | | llvm-svn: 24704
* Bug fix: CodeGenMap[N] = ... -> CodeGenMap[N.getValue(0)] = ...Evan Cheng2005-12-121-1/+1
| | | | llvm-svn: 24680
* At top of generated isel SelectCode() is this:Evan Cheng2005-12-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | if (!N.Val->hasOneUse()) { std::map<SDOperand, SDOperand>::iterator CGMI = CodeGenMap.find(N); if (CGMI != CodeGenMap.end()) return CGMI->second; } Suppose a DAG like this: X ^ ^ / \ USE1 USE2 Suppose USE1 is being selected first and during which X is selected and returned a new node. After this, USE1 is no longer an use of X. During USE2 selection, X will be selected again since it has only one use! The fix is to always query CodeGenMap. llvm-svn: 24679
* Bug fix: finding the correct incoming chain for pattern with nested src ↵Evan Cheng2005-12-121-14/+17
| | | | | | operand. And a minor change to make output code slightly more readible. llvm-svn: 24669
* Add support for TargetConstantPool nodes to the dag isel emitter, and useNate Begeman2005-12-101-0/+2
| | | | | | | them in the PPC backend, to simplify some logic out of Select and SelectAddr. llvm-svn: 24657
* Stop emitting a redudant type check for complex pattern node.Evan Cheng2005-12-101-5/+0
| | | | llvm-svn: 24655
OpenPOWER on IntegriCloud