summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* The enabling of remat in 2-address conversion breaks this test:Bill Wendling2008-05-261-23/+30
| | | | | | | | | | | | Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |& grep {1 .*folded into instructions} child process exited abnormally Make this conditional for now. llvm-svn: 51563
* A problem that's exposed when machine LICM is enabled. Consider this code:Bill Wendling2008-05-261-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LBB1_3: # bb ... xorl %ebp, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Whe using machine LICM, LLVM converts it into: xorl %esi, %esi LBB1_3: # bb ... movl %esi, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Two address conversion inserts the copy instruction. However, it's cheaper to rematerialize it, and remat helps reduce register pressure. llvm-svn: 51562
* Revert 51440 as it breaks a bunch of PIC tests.Evan Cheng2008-05-231-3/+1
| | | | llvm-svn: 51513
* Add #includes to make some dependencies explicit.Dan Gohman2008-05-231-0/+1
| | | | llvm-svn: 51496
* Rewrite a loop to avoid using iterators pointing toDale Johannesen2008-05-231-4/+6
| | | | | | | elements that have been erased. Based on a patch by Nicolas Capens. llvm-svn: 51485
* Generalize the new code in instcombine's ComputeNumSignBits for handlingDan Gohman2008-05-231-7/+13
| | | | | | | and/or to handle more cases (such as this add-sitofp.ll testcase), and port it to selectiondag's ComputeNumSignBits. llvm-svn: 51469
* Remove warnings about comparison between signed and unsigned expressions.Bill Wendling2008-05-231-2/+2
| | | | llvm-svn: 51465
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-231-2/+2
| | | | | | exclude struct and array types. llvm-svn: 51460
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-231-1/+1
| | | | | | exclude struct and array types. llvm-svn: 51459
* When rewriting defs and uses after spilling, don't set the weight of aDavid Greene2008-05-221-1/+3
| | | | | | | | live interval to infinity if the instruction being rewritten is an original remat def instruction. We were only checking against the clone of the remat def which doesn't actually appear in the IR at all. llvm-svn: 51440
* Don't attempt to update SpillSlotToUsesMap for stack slots that aren'tDavid Greene2008-05-221-2/+14
| | | | | | generated by the spiller. llvm-svn: 51439
* Fix PR2343. An *interesting* coalescer bug.Evan Cheng2008-05-211-1/+27
| | | | | | | | | | | | | | BB1: vr1025 = copy vr1024 .. BB2: vr1024 = op = op vr1025 <loop eventually branch back to BB1> Even though vr1025 is copied from vr1024, it's not safe to coalesced them since live range of vr1025 intersects the def of vr1024. This happens when vr1025 is assigned the value of the previous iteration of vr1024 in the loop. llvm-svn: 51394
* Port the fix for the select operator from instcombine'sDan Gohman2008-05-201-2/+2
| | | | | | ComputeNumSignBits to SelectionDAG's ComputeNumSignBits. llvm-svn: 51348
* Code simplification.Dan Gohman2008-05-201-6/+4
| | | | llvm-svn: 51345
* More local spiller complexity!Evan Cheng2008-05-201-0/+62
| | | | | | If local spiller optimization turns some instruction into an identity copy, it will be removed. If the output register happens to be dead (and source is obviously killed), transfer the kill / dead information to last use / def in the same MBB. llvm-svn: 51306
* Don't spill dead def.Evan Cheng2008-05-201-1/+3
| | | | llvm-svn: 51305
* Handle quoted names when constructing $stub's,Dale Johannesen2008-05-191-0/+7
| | | | | | $non_lazy_ptr's and $lazy_ptr's. llvm-svn: 51277
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-78/+78
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* If the result of a BIT_CONVERT is a v1* vector, it doesn't mean its source ↵Evan Cheng2008-05-161-3/+6
| | | | | | is a v1* vector. llvm-svn: 51192
* Silence the compiler warning differently. TheDuncan Sands2008-05-161-1/+1
| | | | | | original method caused gcc-4.2 to complain. llvm-svn: 51186
* Actually scalarize the operand to BIT_CONVERT instead of asking someone to doNate Begeman2008-05-151-1/+2
| | | | | | something with a v1 type. llvm-svn: 51160
* IR support for extractvalue and insertvalue instructions. Also, beginDan Gohman2008-05-151-0/+13
| | | | | | moving toward making structs and arrays first-class types. llvm-svn: 51157
* Make use of vector load and store operations to implement memcpy, memmove, ↵Evan Cheng2008-05-151-90/+135
| | | | | | and memset. Currently only X86 target is taking advantage of these. llvm-svn: 51140
* Use a better idiom to silence compiler warnings.Evan Cheng2008-05-141-20/+5
| | | | llvm-svn: 51131
* Really silence compiler warnings.Evan Cheng2008-05-141-2/+2
| | | | llvm-svn: 51126
* Really silence compiler warnings.Evan Cheng2008-05-141-5/+20
| | | | llvm-svn: 51123
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-142-3/+6
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* Silence some compiler warnings.Evan Cheng2008-05-143-5/+13
| | | | llvm-svn: 51115
* When bit-twiddling CondCode values for integer comparisons producesDan Gohman2008-05-141-0/+1
| | | | | | SETOEQ, is it does with (SETEQ & SETULE), map it to SETEQ. llvm-svn: 51112
* Whitespace cleanups.Dan Gohman2008-05-141-1/+1
| | | | llvm-svn: 51089
* Instead of a vector load, shuffle and then extract an element. Load the ↵Evan Cheng2008-05-132-33/+88
| | | | | | | | | | | element from address with an offset. pshufd $1, (%rdi), %xmm0 movd %xmm0, %eax => movl 4(%rdi), %eax llvm-svn: 51026
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-136-6/+6
| | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-1322-131/+126
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Teach Legalize how to scalarize VSETCCNate Begeman2008-05-121-0/+10
| | | | | | Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next. llvm-svn: 51009
* Xform bitconvert(build_pair(load a, load b)) to a single load if the load ↵Evan Cheng2008-05-122-1/+50
| | | | | | locations are at the right offset from each other. llvm-svn: 51008
* Be more aggressive about tail-merging small blocksDale Johannesen2008-05-121-1/+12
| | | | | | | if those blocks consist entirely of common instructions; merging will not add an extra branch in this case. llvm-svn: 51006
* Constify isSourceDefinedByImplicitDef function. Otherwise, just formattingBill Wendling2008-05-121-45/+38
| | | | | | changes that don't change functionality. llvm-svn: 51004
* Further rework of tail merge algorithm. Not quiteDale Johannesen2008-05-121-111/+77
| | | | | | | | semantically identical, but little difference in either results or execution speed; but it's much easier to read, at least IMO. llvm-svn: 50999
* Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can ↵Evan Cheng2008-05-121-0/+68
| | | | | | make use of it. llvm-svn: 50991
* Revert the previous commit. Go ahead and hoist rematerializable instructions.Bill Wendling2008-05-121-4/+0
| | | | llvm-svn: 50990
* Add support for vicmp/vfcmp codegen, more legalize support coming.Nate Begeman2008-05-123-0/+98
| | | | | | This is necessary to unbreak the build. llvm-svn: 50988
* One real change - don't hoist something that's trivially rematerializable. It'sBill Wendling2008-05-121-18/+19
| | | | | | | | possible for it to produce worse code than before. The rest of this patch is code cleanup. llvm-svn: 50987
* Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!Dan Gohman2008-05-121-0/+1
| | | | llvm-svn: 50967
* If all sources of a PHI node are defined by an implicit_def, just emit an ↵Evan Cheng2008-05-101-7/+11
| | | | | | implicit_def instead of a copy. llvm-svn: 50927
* Cosmetic changes:Bill Wendling2008-05-101-36/+48
| | | | | | | | | - Comment fixes. - Moar whitespace. - Made ivars "private" by default. No functionality change. llvm-svn: 50926
* Remove an evil vector bool. Cosmetic refactoring,Dale Johannesen2008-05-091-62/+85
| | | | | | no functional change. llvm-svn: 50921
* Rewrite tail merging algorithm to handle theDale Johannesen2008-05-091-87/+115
| | | | | | | | case where there are multiple blocks with a large number of common tail instructions more efficiently (compile time optimization). llvm-svn: 50916
* Get exception handling working again on 64 bitDuncan Sands2008-05-081-1/+2
| | | | | | | | | | | Darwin. This is a hack of course, but it does at least look at the right thing: gotpcrel means that this is already an offset, so an explicit offset is not needed (and wrong). I think this is good enough for the moment: Anton is working on something better. llvm-svn: 50850
* Turn StripPointerCast() into a methodAnton Korobeynikov2008-05-073-5/+5
| | | | llvm-svn: 50836
* Output correct exception handling and frame infoDuncan Sands2008-05-071-51/+49
| | | | | | | | | | | | | | | | | | on x86-64 linux. This causes no regressions on 32 bit linux and 32 bit ppc. More tests pass on 64 bit ppc with no regressions. I didn't turn on eh on 64 bit linux because the intrinsics needed to compile the eh runtime aren't done yet. But if you turn it on and link with the mainline runtime then eh seems to work fine on x86-64 linux with this patch. Thanks to Dale for testing. The main point of the patch is that if you output that some object is encoded using 4 bytes you had better not output 8 bytes for it: the patch makes everything consistent. llvm-svn: 50825
OpenPOWER on IntegriCloud