summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* This patch corrects the handling of byval arguments for tailcallArnold Schwaighofer2008-04-122-29/+148
| | | | | | | | | | | | | | | | | | | | | | optimized x86-64 (and x86) calls so that they work (... at least for my test cases). Should fix the following problems: Problem 1: When i introduced the optimized handling of arguments for tail called functions (using a sequence of copyto/copyfrom virtual registers instead of always lowering to top of the stack) i did not handle byval arguments correctly e.g they did not work at all :). Problem 2: On x86-64 after the arguments of the tail called function are moved to their registers (which include ESI/RSI etc), tail call optimization performs byval lowering which causes xSI,xDI, xCX registers to be overwritten. This is handled in this patch by moving the arguments to virtual registers first and after the byval lowering the arguments are moved from those virtual registers back to RSI/RDI/RCX. llvm-svn: 49584
* Factor some libcall code.Duncan Sands2008-04-121-61/+49
| | | | llvm-svn: 49583
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-1219-711/+553
| | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
* Fix a bug that prevented x86-64 from using rep.movsq forDan Gohman2008-04-121-2/+2
| | | | | | 8-byte-aligned data. llvm-svn: 49571
* 80 col fixNate Begeman2008-04-121-1/+1
| | | | llvm-svn: 49569
* Restore code to disable crash catcher on older OS X systemsNate Begeman2008-04-121-1/+25
| | | | llvm-svn: 49568
* Add debugging code.Evan Cheng2008-04-121-3/+7
| | | | llvm-svn: 49566
* Reenable JIT symbol table.Chris Lattner2008-04-111-1/+1
| | | | llvm-svn: 49548
* Do not add empty live intervals to handled_. They should never be undone for ↵Evan Cheng2008-04-111-2/+1
| | | | | | backtracking. llvm-svn: 49544
* If a PHI node has a single implicit_def source, replace it with an ↵Evan Cheng2008-04-111-5/+19
| | | | | | implicit_def instead of a copy. llvm-svn: 49543
* Use of implicit_def is not part of live interval. Create empty intervals for ↵Evan Cheng2008-04-113-12/+53
| | | | | | the uses when the live interval is being spilled. llvm-svn: 49542
* detabifyGabor Greif2008-04-111-1/+1
| | | | llvm-svn: 49524
* Fix PR2213 by simultaneously making GVN more aggressive with the return valuesOwen Anderson2008-04-111-29/+20
| | | | | | of calls and less aggressive with non-readnone calls. llvm-svn: 49516
* Remove implicit_def instructions that become dead as result of coalescing.Evan Cheng2008-04-101-19/+37
| | | | llvm-svn: 49513
* Allow registers defined by implicit_def to be clobbered.Evan Cheng2008-04-101-6/+15
| | | | llvm-svn: 49512
* Fix a typo in a comment.Dan Gohman2008-04-101-1/+1
| | | | llvm-svn: 49504
* Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in theOwen Anderson2008-04-101-2/+4
| | | | | | wrong order. llvm-svn: 49499
* Make several symbols static.Dan Gohman2008-04-104-40/+40
| | | | llvm-svn: 49496
* Teach InstCombine's ComputeMaskedBits to handle pointer expressionsDan Gohman2008-04-101-140/+299
| | | | | | | | | | | | | | | in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment as a ComputeMaskedBits problem, moving all of its special alignment knowledge to ComputeMaskedBits as low-zero-bits knowledge. Also, teach ComputeMaskedBits a few basic things about Mul and PHI instructions. This improves ComputeMaskedBits-based simplifications in a few cases, but more noticeably it significantly improves instcombine's alignment detection for loads, stores, and memory intrinsics. llvm-svn: 49492
* A copy instruction may use a register multiple times on some targets. Change ↵Evan Cheng2008-04-101-2/+6
| | | | | | them all. llvm-svn: 49491
* Add comment.Evan Cheng2008-04-101-0/+2
| | | | llvm-svn: 49469
* add a note, this is actually not too bad to implement.Chris Lattner2008-04-101-1/+7
| | | | llvm-svn: 49466
* move the x86-32 part of PR2108 here.Chris Lattner2008-04-101-0/+48
| | | | llvm-svn: 49465
* Fix the x86-64 side of PR2108 by adding a v2f64 version ofChris Lattner2008-04-101-0/+10
| | | | | | | | MOVZQI2PQIrr. This would be better handled as a dag combine (with the goal of eliminating the bitconvert) but I don't know how to do that safely. Thoughts welcome. llvm-svn: 49463
* Teach branch folding pass about implicit_def instructions. Unfortunately we ↵Evan Cheng2008-04-101-1/+56
| | | | | | can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away. llvm-svn: 49461
* Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.Chris Lattner2008-04-101-0/+8
| | | | | | This is not safe for all inputs. llvm-svn: 49458
* - More aggressively coalescing away copies whose source is defined by an ↵Evan Cheng2008-04-093-76/+297
| | | | | | | | implicit_def. - Added insert_subreg coalescing support. llvm-svn: 49448
* Make isVectorClearMaskLegal's operand list const.Dan Gohman2008-04-092-4/+5
| | | | llvm-svn: 49446
* Add XMM1 as a second return value register for f32 and f64 on x86-64. ThisDan Gohman2008-04-091-4/+4
| | | | | | | is needed for the x86-64-ABI handling of structs that contain floating-point members that are returned by value. llvm-svn: 49441
* Add DX as a second return value register for i16 on x86.Dan Gohman2008-04-091-1/+1
| | | | llvm-svn: 49440
* Generalize getUnaryFloatFunction to handle any FP unary function, automaticallyChris Lattner2008-04-091-17/+33
| | | | | | figuring out the suffix to use. implement pow(2,x) -> exp2(x). llvm-svn: 49437
* use the new ConstantFP::get method to make this work withChris Lattner2008-04-091-11/+4
| | | | | | long double and simplify the code. llvm-svn: 49435
* Be conservative if getresult operand is neither call nor invoke.Devang Patel2008-04-091-2/+3
| | | | llvm-svn: 49430
* Factor a bunch of functionality related to memcpy and memset transforms out of Owen Anderson2008-04-092-620/+769
| | | | | | GVN and into its own pass. llvm-svn: 49419
* Remove accidentally duplicated code.Owen Anderson2008-04-091-4/+0
| | | | llvm-svn: 49418
* add a simplified accessor for creating an fp constant of a Chris Lattner2008-04-091-13/+25
| | | | | | particular value but variable type. llvm-svn: 49416
* Missed a hasInterval check.Evan Cheng2008-04-091-0/+2
| | | | llvm-svn: 49415
* add a version of ConstantFP::get that doesn't take a redundant Type* value,Chris Lattner2008-04-091-21/+22
| | | | | | start migrating code over to use it. llvm-svn: 49413
* many cleanups to the pow optimizer. Allow it to handle powf,Chris Lattner2008-04-091-34/+50
| | | | | | add support for pow(x, 2.0) -> x*x. llvm-svn: 49411
* Rename -disable-required-unwind-tables to unwind-tables-optional.Dale Johannesen2008-04-081-2/+2
| | | | llvm-svn: 49389
* Convenience method for setting the nounwindDuncan Sands2008-04-081-0/+9
| | | | | | attribute for a function. llvm-svn: 49373
* Fix insert point handling for multiple return values.Devang Patel2008-04-081-4/+12
| | | | llvm-svn: 49367
* Handle the situation in 2008-01-25-EmptyFunction.llDale Johannesen2008-04-081-10/+11
| | | | | | correctly when unwind info is being generated. llvm-svn: 49366
* Implement new llc flag -disable-required-unwind-tables.Dale Johannesen2008-04-084-5/+19
| | | | | | Corresponds to -fno-unwind-tables (usually default in gcc). llvm-svn: 49361
* Make getDirnameSep a static method (not part of Path's interface).Ted Kremenek2008-04-073-3/+7
| | | | llvm-svn: 49354
* Added method Path::getDirname().Ted Kremenek2008-04-073-2/+45
| | | | llvm-svn: 49352
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-075-16/+17
| | | | | | | review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
* Add operator= implementations to SparseBitVector, allowing it to be used in ↵Owen Anderson2008-04-071-16/+8
| | | | | | | | | GVN. This results in both time and memory savings for GVN. For example, one testcase went from 10.5s to 6s with this patch. llvm-svn: 49345
* Fix PR 2169.Daniel Berlin2008-04-071-0/+3
| | | | llvm-svn: 49339
* Use Intrinsic::getDeclaration in more places.Duncan Sands2008-04-072-22/+9
| | | | llvm-svn: 49338
OpenPOWER on IntegriCloud