summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a really nasty vector miscompilation bill recently introduced.Chris Lattner2007-10-191-2/+2
| | | | llvm-svn: 43181
* rename ExpandOperation to ExpandOperationResult, as suggestedChris Lattner2007-10-192-17/+2
| | | | | | by Duncan llvm-svn: 43177
* Support for expanding ADDE and SUBE.Duncan Sands2007-10-191-0/+22
| | | | llvm-svn: 43175
* If the value types are equal then this routineDuncan Sands2007-10-191-1/+1
| | | | | | | | | asserts in later checks rather than producing the ordinary load it is supposed to. Avoid all such hassles by directly returning an ordinary load in this case. llvm-svn: 43174
* Add support for byval function whose argument is not 32 bit aligned.Rafael Espindola2007-10-193-3/+55
| | | | | | | | | | To do this it is necessary to add a "always inline" argument to the memcpy node. For completeness I have also added this node to memmove and memset. I have also added getMem* functions, because the extra argument makes it cumbersome to use getNode and because I get confused by it :-) llvm-svn: 43172
* Implement a few new operations.Chris Lattner2007-10-191-0/+35
| | | | llvm-svn: 43171
* Implement expansion of SINT_TO_FP and UINT_TO_FP operands.Chris Lattner2007-10-191-0/+89
| | | | llvm-svn: 43170
* implement support for custom expansion of any node type, in one place.Chris Lattner2007-10-191-35/+17
| | | | llvm-svn: 43169
* Make use of TLI.ExpandOperation, remove softfloat stuff.Chris Lattner2007-10-191-49/+15
| | | | llvm-svn: 43167
* add expand support for bit_convert result, even allowing custom expansion.Chris Lattner2007-10-191-1/+34
| | | | llvm-svn: 43166
* add a new target hook.Chris Lattner2007-10-191-0/+8
| | | | llvm-svn: 43165
* Negative indices aren't allowed here.Bill Wendling2007-10-191-1/+1
| | | | llvm-svn: 43161
* More ppcf128 issues (maybe the last)?Dale Johannesen2007-10-191-1/+1
| | | | llvm-svn: 43160
* Pointer arithmetic should be done with the index the same size as the pointer.Bill Wendling2007-10-181-0/+7
| | | | llvm-svn: 43120
* Support for ADDC/SUBC.Duncan Sands2007-10-181-8/+33
| | | | llvm-svn: 43119
* Really fix PR1734. Carefully track which register uses are sub-register uses byEvan Cheng2007-10-181-8/+25
| | | | | | traversing inverse register coalescing map. llvm-svn: 43118
* Add support for ISD::SELECT in SplitVectorOp.Dan Gohman2007-10-171-0/+20
| | | | llvm-svn: 43072
* Return Expand from getOperationAction for all extendedDuncan Sands2007-10-173-45/+58
| | | | | | | | | | | | | | | | | | | types. This is needed for SIGN_EXTEND_INREG at least. It is not clear if this is correct for other operations. On the other hand, for the various load/store actions it seems to correct to return the type action, as is currently done. Also, it seems that SelectionDAG::getValueType can be called for extended value types; introduce a map for holding these, since we don't really want to extend the vector to be 2^32 pointers long! Generalize DAGTypeLegalizer::PromoteResult_TRUNCATE and DAGTypeLegalizer::PromoteResult_INT_EXTEND to handle the various funky possibilities that apints introduce, for example that you can promote to a type that needs to be expanded. llvm-svn: 43071
* Apply Chris' suggestions.Evan Cheng2007-10-172-2/+3
| | | | llvm-svn: 43069
* One more extract_subreg coalescing bug fix.Evan Cheng2007-10-171-1/+1
| | | | llvm-svn: 43065
* Fix MergeValueInAsValue(). It allows overlapping live ranges but should replaceEvan Cheng2007-10-171-7/+57
| | | | | | their value numbers with the specified value number. llvm-svn: 43062
* Clean up code that calculate MBB live-in's.Evan Cheng2007-10-171-17/+19
| | | | llvm-svn: 43061
* Clean up code that calculate MBB live-in's.Evan Cheng2007-10-171-0/+36
| | | | llvm-svn: 43060
* Disable attempts to constant fold PPC f128.Dale Johannesen2007-10-162-48/+57
| | | | | | | Remove the assumption that this will happen from various places. llvm-svn: 43053
* Some clean up.Evan Cheng2007-10-161-19/+10
| | | | llvm-svn: 43043
* Fix PR1734.Evan Cheng2007-10-161-1/+1
| | | | llvm-svn: 43035
* Initial infrastructure for arbitrary precision integerDuncan Sands2007-10-161-26/+32
| | | | | | | | | | codegen support. This should have no effect on codegen for other types. Debatable bits: (1) the use (abuse?) of a set in SDNode::getValueTypeList; (2) the length of getTypeToTransformTo, which maybe should be refactored with a non-inline part for extended value types. llvm-svn: 43030
* Fixes due to lack of type-safety for ValueType: (1) ValueTypeDuncan Sands2007-10-161-3/+3
| | | | | | | being passed instead of an opcode; (2) ValueType being passed for isVolatile (!) in getLoad. llvm-svn: 43028
* Code clean up.Evan Cheng2007-10-161-13/+27
| | | | llvm-svn: 43026
* implement promotion of select and select_cc, allowing MallocBench/gs toChris Lattner2007-10-161-0/+19
| | | | | | work with type promotion on x86. llvm-svn: 43025
* Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.Dan Gohman2007-10-151-0/+45
| | | | llvm-svn: 43020
* Make CalcLatency() non-recursive.Evan Cheng2007-10-151-9/+44
| | | | llvm-svn: 43017
* Fix PR1729: watch out for val# with no def.Evan Cheng2007-10-151-8/+13
| | | | llvm-svn: 42996
* Move CreateStackTemporary out to SelectionDAGChris Lattner2007-10-151-20/+7
| | | | llvm-svn: 42995
* add a new CreateStackTemporary helper method.Chris Lattner2007-10-151-0/+13
| | | | llvm-svn: 42994
* implement promotion of BR_CC operands, fixing bisort on ppc.Chris Lattner2007-10-151-2/+65
| | | | llvm-svn: 42992
* updates from duncanChris Lattner2007-10-151-5/+5
| | | | llvm-svn: 42991
* Fix some typos. Call getTypeToTransformTo rather thanDuncan Sands2007-10-151-14/+14
| | | | | | | | | getTypeToExpandTo. The difference is that getTypeToExpandTo gives the final result of expansion (eg: i128 -> i32 on a 32 bit machine) while getTypeToTransformTo does just one step (i128 -> i64). llvm-svn: 42982
* One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* Chris Lattner2007-10-155-58/+1595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | take a deleted nodes vector, instead of requiring it. One more significant change: Implement the start of a legalizer that just works on types. This legalizer is designed to run before the operation legalizer and ensure just that the input dag is transformed into an output dag whose operand and result types are all legal, even if the operations on those types are not. This design/impl has the following advantages: 1. When finished, this will *significantly* reduce the amount of code in LegalizeDAG.cpp. It will remove all the code related to promotion and expansion as well as splitting and scalarizing vectors. 2. The new code is very simple, idiomatic, and modular: unlike LegalizeDAG.cpp, it has no 3000 line long functions. :) 3. The implementation is completely iterative instead of recursive, good for hacking on large dags without blowing out your stack. 4. The implementation updates nodes in place when possible instead of deallocating and reallocating the entire graph that points to some mutated node. 5. The code nicely separates out handling of operations with invalid results from operations with invalid operands, making some cases simpler and easier to understand. 6. The new -debug-only=legalize-types option is very very handy :), allowing you to easily understand what legalize types is doing. This is not yet done. Until the ifdef added to SelectionDAGISel.cpp is enabled, this does nothing. However, this code is sufficient to legalize all of the code in 186.crafty, olden and freebench on an x86 machine. The biggest issues are: 1. Vectors aren't implemented at all yet 2. SoftFP is a mess, I need to talk to Evan about it. 3. No lowering to libcalls is implemented yet. 4. Various operations are missing etc. 5. There are FIXME's for stuff I hax0r'd out, like softfp. Hey, at least it is a step in the right direction :). If you'd like to help, just enable the #ifdef in SelectionDAGISel.cpp and compile code with it. If this explodes it will tell you what needs to be implemented. Help is certainly appreciated. Once this goes in, we can do three things: 1. Add a new pass of dag combine between the "type legalizer" and "operation legalizer" passes. This will let us catch some long-standing isel issues that we miss because operation legalization often obfuscates the dag with target-specific nodes. 2. We can rip out all of the type legalization code from LegalizeDAG.cpp, making it much smaller and simpler. When that happens we can then reimplement the core functionality left in it in a much more efficient and non-recursive way. 3. Once the whole legalizer is non-recursive, we can implement whole-function selectiondags maybe... llvm-svn: 42981
* One xform performed by LegalizeDAG is transformation of "store of fp" to ↵Chris Lattner2007-10-151-6/+28
| | | | | | | | | | | | | "store of int". Make two changes: 1) only xform "store of f32" if i32 is a legal type for the target. 2) only xform "store of f64" if either i64 or i32 are legal for the target. 3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a later pass of legalize do it. This is ugly, but helps future changes I'm about to commit. llvm-svn: 42980
* Add a (disabled by default) way to view the ID of a node.Chris Lattner2007-10-151-0/+4
| | | | llvm-svn: 42978
* remove misleading comment.Chris Lattner2007-10-141-2/+1
| | | | llvm-svn: 42970
* If a target doesn't have HasMULHU or HasUMUL_LOHI, ExpandOp would returnChris Lattner2007-10-141-1/+0
| | | | | | without lo/hi set. Fall through to making a libcall instead. llvm-svn: 42969
* When coalescing an EXTRACT_SUBREG and the dst register is a physical register,Evan Cheng2007-10-142-26/+28
| | | | | | | | the source register will be coalesced to the super register of the LHS. Properly merge in the live ranges of the resulting coalesced interval that were part of the original source interval to the live interval of the super-register. llvm-svn: 42961
* Revert 42908 for now.Evan Cheng2007-10-141-19/+19
| | | | llvm-svn: 42960
* Disable some compile-time optimizations on PPCDale Johannesen2007-10-141-0/+3
| | | | | | long double. llvm-svn: 42958
* Enhance the truncstore optimization code to handle shiftedChris Lattner2007-10-131-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values and propagate demanded bits through them in simple cases. This allows this code: void foo(char *P) { strcpy(P, "abc"); } to compile to: _foo: ldrb r3, [r1] ldrb r2, [r1, #+1] ldrb r12, [r1, #+2]! ldrb r1, [r1, #+1] strb r1, [r0, #+3] strb r2, [r0, #+1] strb r12, [r0, #+2] strb r3, [r0] bx lr instead of: _foo: ldrb r3, [r1, #+3] ldrb r2, [r1, #+2] orr r3, r2, r3, lsl #8 ldrb r2, [r1, #+1] ldrb r1, [r1] orr r2, r1, r2, lsl #8 orr r3, r2, r3, lsl #16 strb r3, [r0] mov r2, r3, lsr #24 strb r2, [r0, #+3] mov r2, r3, lsr #16 strb r2, [r0, #+2] mov r3, r3, lsr #8 strb r3, [r0, #+1] bx lr testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll This also helps occasionally for X86 and other cases not involving unaligned load/stores. llvm-svn: 42954
* Add a simple optimization to simplify the input toChris Lattner2007-10-132-1/+43
| | | | | | | truncate and truncstore instructions, based on the knowledge that they don't demand the top bits. llvm-svn: 42952
* Local spiller optimization: Evan Cheng2007-10-132-4/+54
| | | | | | | | | | | | | | | | | | | Turn this: movswl %ax, %eax movl %eax, -36(%ebp) xorl %edi, -36(%ebp) into movswl %ax, %eax xorl %edi, %eax movl %eax, -36(%ebp) by unfolding the load / store xorl into an xorl and a store when we know the value in the spill slot is available in a register. This doesn't change the number of instructions but reduce the number of times memory is accessed. Also unfold some load folding instructions and reuse the value when similar situation presents itself. llvm-svn: 42947
* Optionally create a MachineInstr without default implicit operands.Evan Cheng2007-10-131-4/+5
| | | | llvm-svn: 42945
OpenPOWER on IntegriCloud