summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use SmallVector instead.Evan Cheng2006-08-111-1/+1
| | | | llvm-svn: 29619
* - Prevent some functions from being inlined to eliminate the code size bloatEvan Cheng2006-08-111-67/+96
| | | | | | | | | | | | | 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. llvm-svn: 29602
* Revert previous patchChris Lattner2006-08-091-501/+396
| | | | llvm-svn: 29585
* Reverting back to original 1.8 version so I can manually merge in patch.Tanya Lattner2006-08-091-396/+501
| | | | llvm-svn: 29584
* Start eliminating temporary vectors used to create DAG nodes. Instead, passChris Lattner2006-08-081-2/+3
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 29566
* Making TableGen'd instruction selection code non-recursive. This fixes PR805.Evan Cheng2006-08-071-244/+122
| | | | llvm-svn: 29548
* Remove some extraneous newlines.Chris Lattner2006-08-031-2/+2
| | | | llvm-svn: 29492
* Really add support for compilers without noinlineChris Lattner2006-08-031-0/+2
| | | | llvm-svn: 29491
* Pass N by reference to select functions to prevent gcc from allocating more ↵Evan Cheng2006-08-011-3/+3
| | | | | | stack. llvm-svn: 29423
* Remove an unneeded match condition: the type check for root node has beenEvan Cheng2006-07-311-7/+22
| | | | | | moved to outside the actual select routine. llvm-svn: 29415
* Split each select function for a particular opcode into multiple ones. OneEvan Cheng2006-07-281-178/+259
| | | | | | | | | | | | | 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. llvm-svn: 29404
* Clean up.Evan Cheng2006-07-281-3/+2
| | | | llvm-svn: 29378
* Rename IsFoldableBy to CanBeFoldedleByEvan Cheng2006-07-281-1/+1
| | | | llvm-svn: 29376
* Remove InFlightSet hack. No longer needed.Evan Cheng2006-07-281-46/+0
| | | | llvm-svn: 29373
* Remove dead code.Evan Cheng2006-07-271-29/+0
| | | | llvm-svn: 29359
* Let each target specific isel provide routine to check if a chain producing ↵Evan Cheng2006-07-271-8/+2
| | | | | | node is foldable by another. llvm-svn: 29335
* Fix for bug 840. Only use noinline attribute if gcc version >= 3.4Evan Cheng2006-07-261-3/+6
| | | | llvm-svn: 29311
* Removed a hack intended to allow (store (op (load))) folding. Will handle ↵Evan Cheng2006-07-211-52/+7
| | | | | | this with preprocessing. llvm-svn: 29258
* Also checks for noResults field.Evan Cheng2006-07-201-1/+4
| | | | llvm-svn: 29235
* Add code size to target instruction use it as the 3rd isel sorting tie-breaker.Evan Cheng2006-07-191-3/+25
| | | | llvm-svn: 29193
* Use __attribute__((noinline)) only if compiled by gcc.Evan Cheng2006-07-161-1/+1
| | | | llvm-svn: 29161
* Parameterize target node ValueType to allow more sharing of emit functions.Evan Cheng2006-07-161-31/+65
| | | | | | | Also reduce the number of arguments passed to emit functions and removed a hack. llvm-svn: 29160
* Reduce instruction selection code size and stack frame size by factoringEvan Cheng2006-07-151-42/+133
| | | | | | | | | | 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. llvm-svn: 29158
* It was pointed out that DEBUG() is only available with -debug.Jim Laskey2006-07-111-4/+12
| | | | llvm-svn: 29106
* Ensure that dump calls that are associated with asserts are removed fromJim Laskey2006-07-111-4/+4
| | | | | | non-debug build. llvm-svn: 29105
* Ugly hack! Add helper functions InsertInFlightSetEntry andEvan Cheng2006-06-291-4/+8
| | | | | | | RemoveInFlightSetEntry. They are used in place of direct set operators to reduce instruction selection function stack size. llvm-svn: 28987
* Fix an error message regression. Print:Chris Lattner2006-06-201-1/+8
| | | | | | | | LI8: (LI8:i64 (imm:i64):$imm) instead of: LI8: (LI8:MVT::i64 (imm:MVT::i64):$imm) llvm-svn: 28868
* Don't require src/dst patterns to be able to fully resolve their types,Chris Lattner2006-06-201-5/+11
| | | | | | | | | | | | | | | | | 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. llvm-svn: 28865
* Make sure to use the result of the pattern to infer the result type of theChris Lattner2006-06-201-22/+34
| | | | | | | | | | | | | | 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. llvm-svn: 28863
* Improve a comment.Chris Lattner2006-06-161-1/+1
| | | | llvm-svn: 28833
* Allow more use of iPTR in patterns.Evan Cheng2006-06-151-1/+1
| | | | llvm-svn: 28790
* Added support for variable_ops.Evan Cheng2006-06-141-88/+81
| | | | llvm-svn: 28788
* Fix support for optional input flag.Evan Cheng2006-06-141-17/+11
| | | | llvm-svn: 28784
* getOperandNum(): error if specified operand number is out of range.Evan Cheng2006-06-131-0/+7
| | | | llvm-svn: 28775
* Wrap to 80 colsChris Lattner2006-06-091-4/+5
| | | | llvm-svn: 28743
* Can't trust NodeDepth when checking for possibility of load folding creatingEvan Cheng2006-05-251-7/+5
| | | | | | | | 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. llvm-svn: 28476
* Fixed a really ugly bug. The TableGen'd isel is not freeing the "inflight set"Evan Cheng2006-05-251-9/+21
| | | | | | | correctly. That is causing non-deterministic behavior (and possibly preventing some load folding from happening). llvm-svn: 28458
* Now that iPTR is a fully resolved type. We end up losing the type check forEvan Cheng2006-05-191-1/+1
| | | | | | | | | | | 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. llvm-svn: 28389
* Remove PointerType from target definition. Use abstract type MVT::iPTR toEvan Cheng2006-05-171-29/+59
| | | | | | represent pointer type. llvm-svn: 28363
* Allow patterns to refer to physical registers that belong to multipleEvan Cheng2006-05-161-6/+5
| | | | | | register classes. llvm-svn: 28323
* Unused instructionEvan Cheng2006-05-121-1/+0
| | | | llvm-svn: 28240
* Watch out for the following case:Evan Cheng2006-05-101-11/+37
| | | | | | | | 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. llvm-svn: 28209
* Fix a load folding bug. It is exposed by a multi- resulting instructionsEvan Cheng2006-05-101-59/+63
| | | | | | def : Pat<> pattern. llvm-svn: 28208
* Remove the temporary option: -no-isel-fold-inflightEvan Cheng2006-04-281-2/+1
| | | | llvm-svn: 28012
* When isel'ing a node, mark its operands "InFlight" before selecting them. TheseEvan Cheng2006-04-281-2/+34
| | | | | | | | nodes should not be folded into other nodes. This fixes the miscompilation of PR 749. Temporarily under flag control. llvm-svn: 28002
* JumpTable support! What this represents is working asm and jit support forNate Begeman2006-04-221-0/+1
| | | | | | | | 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. llvm-svn: 27947
* Rename AddedCost to AddedComplexity.Evan Cheng2006-04-191-9/+9
| | | | llvm-svn: 27841
* Allow "let AddedCost = n in" to increase pattern complexity.Evan Cheng2006-04-191-5/+16
| | | | llvm-svn: 27834
* Infer element types for shuffle masksChris Lattner2006-04-061-0/+20
| | | | llvm-svn: 27456
* rename a method, to avoid confusion with llvm intrinsics.Chris Lattner2006-04-061-4/+3
| | | | llvm-svn: 27455
OpenPOWER on IntegriCloud