aboutsummaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* Create a new class, MemOperand, for describing memory referencesDan Gohman2008-01-311-0/+27
| | | | | | | | | | | | | | | | | in the backend. Introduce a new SDNode type, MemOperandSDNode, for holding a MemOperand in the SelectionDAG IR, and add a MemOperand list to MachineInstr, and code to manage them. Remove the offset field from SrcValueSDNode; uses of SrcValueSDNode that were using it are all all using MemOperandSDNode now. Also, begin updating some getLoad and getStore calls to use the PseudoSourceValue objects. Most of this was written by Florian Brander, some reorganization and updating to TOT by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46585 91177308-0d34-0410-b5e6-96231b3b80d8
* Always put version numbers at the end because they are optional.Devang Patel2008-01-302-12/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46563 91177308-0d34-0410-b5e6-96231b3b80d8
* Update this file for 2.0 syntax.Dan Gohman2008-01-291-9/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46512 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix to bug 1951: tblgen gratuitously renames variables when no temporary wasScott Michel2008-01-291-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | generated. This feature would only show up in fairly complex patterns, such as this one in CellSPU: def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)), (IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>; which generated the following emit code: SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE { SDOperand N0 = N.getOperand(0); SDOperand N00 = N0.getOperand(0); SDOperand N01 = N0.getOperand(1); SDOperand N1 = N.getOperand(1); SDOperand N10 = N1.getOperand(0); SDOperand N11 = N1.getOperand(1); SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0); return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */ } Tested against the test suites without incident. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46487 91177308-0d34-0410-b5e6-96231b3b80d8
* Add interator interface to DAGInit alsoAnton Korobeynikov2008-01-221-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46250 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide iterator access to ListInit contentsAnton Korobeynikov2008-01-211-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46223 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix makefiles to enable Apply style debug build.Evan Cheng2008-01-182-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46180 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable CBEDevang Patel2008-01-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46112 91177308-0d34-0410-b5e6-96231b3b80d8
* Add files to windows project files. Also include <algorithm> explicitly so ↵Chuck Rose III2008-01-151-0/+1
| | | | | | that vstudio build works git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46013 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove ↵Evan Cheng2008-01-151-3/+6
| | | | | | 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
* Revert my last commit. Not needed.Evan Cheng2008-01-151-20/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45994 91177308-0d34-0410-b5e6-96231b3b80d8
* Need a space to separate Make options.Evan Cheng2008-01-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45964 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -disable-lto optimization.Evan Cheng2008-01-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45900 91177308-0d34-0410-b5e6-96231b3b80d8
* ByVal arguments are passed on stack. Make sure to allocate a slot using size ↵Evan Cheng2008-01-121-7/+20
| | | | | | and alignment information on the parameter attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45897 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the side effect stuff a bit more and make licm/sinkingChris Lattner2008-01-101-2/+1
| | | | | | | | | | | | | | | | | 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
* Start inferring side effect information more aggressively, and fix many bugs ↵Chris Lattner2008-01-104-27/+43
| | | | | | | | | | | | | | | 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
* Fix a crash on code like: let x = 1 {xChris Lattner2008-01-101-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45827 91177308-0d34-0410-b5e6-96231b3b80d8
* if an instr lacks a pattern, assume it has side effects (unless never has ↵Chris Lattner2008-01-101-1/+4
| | | | | | s-e is true). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45823 91177308-0d34-0410-b5e6-96231b3b80d8
* start inferring 'no side effects'.Chris Lattner2008-01-104-56/+62
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45822 91177308-0d34-0410-b5e6-96231b3b80d8
* Infer mayloadChris Lattner2008-01-101-3/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45819 91177308-0d34-0410-b5e6-96231b3b80d8
* realize that instructions who match intrinsics that read memory read memory.Chris Lattner2008-01-103-3/+15
| | | | | | | 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
* add a mayLoad property for machine instructions, a correlary to mayStore.Chris Lattner2008-01-083-13/+14
| | | | | | | This is currently not set by anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45748 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-2/+2
| | | | | | | | 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
* Rename all the M_* flags to be namespace qualified enums, and switch Chris Lattner2008-01-071-25/+25
| | | | | | | | | 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
* rename hasVariableOperands() -> isVariadic(). Add some comments.Chris Lattner2008-01-074-7/+7
| | | | | | | | 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
* Move M_* flags down in the file. Move SchedClass up in the Chris Lattner2008-01-071-2/+2
| | | | | | | | 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
* the name field of instructions is never set to a non-empty string, Chris Lattner2008-01-073-17/+3
| | | | | | | 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
* Add predicates methods to TargetOperandInfo, and switch all clients Chris Lattner2008-01-071-3/+3
| | | | | | | | 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
* rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.Chris Lattner2008-01-063-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45667 91177308-0d34-0410-b5e6-96231b3b80d8
* rename isStore -> mayStore to more accurately reflect what it captures.Chris Lattner2008-01-063-18/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45656 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the 'isStore' inferrer to look for 'SDNPMayStore' Chris Lattner2008-01-063-12/+33
| | | | | | | | | | | | 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
* set the 'isstore' flag for instructions whose pattern is an Chris Lattner2008-01-063-14/+35
| | | | | | | intrinsic that writes to memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45650 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some old hacky code that tried to infer whether a store Chris Lattner2008-01-062-20/+50
| | | | | | | | | | | | 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
* rearrange some code to allow inferring instr info from the pattern of the ↵Chris Lattner2008-01-062-34/+56
| | | | | | instr, but don't do so yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45647 91177308-0d34-0410-b5e6-96231b3b80d8
* improve const correctness.Chris Lattner2008-01-063-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45646 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the impl of CodeGenInstruction out to its own .cpp file, add a ↵Chris Lattner2008-01-063-265/+287
| | | | | | getName() accessor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45645 91177308-0d34-0410-b5e6-96231b3b80d8
* final cleanups.Chris Lattner2008-01-062-9/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45644 91177308-0d34-0410-b5e6-96231b3b80d8
* further simplifications and cleanupChris Lattner2008-01-062-39/+65
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45643 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some codeChris Lattner2008-01-062-19/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45642 91177308-0d34-0410-b5e6-96231b3b80d8
* rename CodegenDAGPatterns -> CodeGenDAGPatternsChris Lattner2008-01-064-53/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45641 91177308-0d34-0410-b5e6-96231b3b80d8
* split enum emission out from InstrInfoEmitter into it's own tblgen backend.Chris Lattner2008-01-065-39/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45640 91177308-0d34-0410-b5e6-96231b3b80d8
* fix build on case sensitive file systems.Chris Lattner2008-01-051-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45639 91177308-0d34-0410-b5e6-96231b3b80d8
* now that computing CodegenDAGPatterns doesn't implicitly print stuff Chris Lattner2008-01-052-30/+25
| | | | | | | | | | 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
* move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.Chris Lattner2008-01-054-23/+50
| | | | | | | | 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
* move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.Chris Lattner2008-01-054-36/+69
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45634 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a fixme by improving const correctness.Chris Lattner2008-01-053-26/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45633 91177308-0d34-0410-b5e6-96231b3b80d8
* change getQualifiedName to be a global function.Chris Lattner2008-01-059-2678/+2772
| | | | | | | | | 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
* Change the builtin matcher to emit a decision tree, which should help out Chris Lattner2008-01-041-8/+108
| | | | | | | the VC++ 'nesting depth' issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45567 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't let IntrinsicID be uninitialized if it doesn't match.Chris Lattner2008-01-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45563 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the default else. This was ending in code that looked like this:Bill Wendling2008-01-031-2/+0
| | | | | | | | | | | 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