summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* always lower to RETFLAG, never leave it as just ret.Chris Lattner2007-02-262-11/+7
| | | | llvm-svn: 34639
* Do not unswitch loop on same value again and again.Devang Patel2007-02-261-0/+7
| | | | llvm-svn: 34638
* fix attributionChris Lattner2007-02-261-1/+1
| | | | llvm-svn: 34637
* Add a description of the X86-64 calling convention and the returnChris Lattner2007-02-262-0/+143
| | | | | | conventions. This doesn't do anything yet, but may in the future. llvm-svn: 34636
* Implement inline methods that make transition of ConstantInt to use APIntReid Spencer2007-02-261-2/+38
| | | | | | easier to comprehend and might be useful elsewhere. llvm-svn: 34635
* Re-enable this. The header was committed.Reid Spencer2007-02-261-4/+0
| | | | llvm-svn: 34634
* switch to smallvectorChris Lattner2007-02-261-3/+1
| | | | llvm-svn: 34633
* another missing header :( :( :(Chris Lattner2007-02-261-0/+4
| | | | llvm-svn: 34632
* initial hack at splitting the x86-64 calling convention info out from theChris Lattner2007-02-261-271/+299
| | | | | | | mechanics that process it. I'm still not happy with this, but it's a step in the right direction. llvm-svn: 34631
* Make isNegative() a const function since it doesn't modify the APInt.Reid Spencer2007-02-261-1/+1
| | | | llvm-svn: 34630
* 1. Remove redundant calls to clearUsedBits().Reid Spencer2007-02-261-44/+79
| | | | | | | | | | 2. Fix countTrailingZeros to use a faster algorithm. 3. Simplify sext() slightly by using isNegative(). 4. Implement ashr using word-at-a-time logic instead of bit-at-a-time 5. Rename locals named isNegative so they don't clash with method name. 6. Fix fromString to compute negated value correctly. llvm-svn: 34629
* the truncate must always be done, it's only the assert that is conditional.Chris Lattner2007-02-261-1/+1
| | | | llvm-svn: 34628
* reapply my previous patch with a bugfix.Chris Lattner2007-02-261-21/+31
| | | | llvm-svn: 34627
* revert my previous change, something strange is happening.Chris Lattner2007-02-261-29/+21
| | | | llvm-svn: 34626
* add an accessor.Chris Lattner2007-02-261-0/+4
| | | | llvm-svn: 34625
* emit an enum value for the # of target registers.Chris Lattner2007-02-261-2/+2
| | | | llvm-svn: 34624
* in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.Chris Lattner2007-02-261-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Capture this so that downstream zext/sext's are optimized out. This compiles: int test(short X) { return (int)X; } to: _test: movl %edi, %eax ret instead of: _test: movswl %di, %eax ret GCC produces this bizarre code: _test: movw %di, -12(%rsp) movswl -12(%rsp),%eax ret llvm-svn: 34623
* new testcaseChris Lattner2007-02-261-0/+16
| | | | llvm-svn: 34622
* Fold (sext (truncate x)) more aggressively, by avoiding creation of aChris Lattner2007-02-261-10/+34
| | | | | | | | | sextinreg if not needed. This is useful in two cases: before legalize, it avoids creating a sextinreg that will be trivially removed. After legalize if the target doesn't support sextinreg, the trunc/sext would not have been removed before. llvm-svn: 34621
* track signedness of formal argument, though we have a fixme here.Chris Lattner2007-02-261-0/+8
| | | | llvm-svn: 34620
* Add an isNegative method to determine if the APInt's value is negative.Reid Spencer2007-02-261-0/+7
| | | | | | This is much less expensive than a test against zero. llvm-svn: 34619
* Rewrite lshr to not do bit by bit copy but to copy and shift whole words.Reid Spencer2007-02-261-15/+42
| | | | | | This makes it much more efficient. llvm-svn: 34618
* Fix sext operation. Shifting by zero would leave an incorrect mask.Reid Spencer2007-02-251-1/+1
| | | | llvm-svn: 34617
* 1. Fix the flip() method to correctly flip all words of the APInt.Reid Spencer2007-02-251-13/+89
| | | | | | | 2. Implement the trunc, sext, and zext operations. 3. Improve fromString to accept negative values as input. llvm-svn: 34616
* Fix an X86-64 abi bug. We now compile:Chris Lattner2007-02-251-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | void foo(short); void bar(unsigned short A) { foo(A); } into: _bar: subq $8, %rsp movswl %di, %edi call _foo addq $8, %rsp ret instead of: _bar: subq $8, %rsp call _foo addq $8, %rsp ret Testcase here: test/CodeGen/X86/x86-64-shortint.ll llvm-svn: 34615
* new testcaseChris Lattner2007-02-251-0/+13
| | | | llvm-svn: 34614
* fix CodeGen/X86/2007-02-25-FastCCStack.ll, a regression from my patch lastChris Lattner2007-02-251-1/+1
| | | | | | night: fastcc returns should only go in XMM0 if we have SSE2 or above. llvm-svn: 34613
* new testcaseChris Lattner2007-02-251-0/+5
| | | | llvm-svn: 34612
* new testcaseChris Lattner2007-02-251-0/+11
| | | | llvm-svn: 34611
* Fix for PR1224.Jim Laskey2007-02-251-35/+50
| | | | llvm-svn: 34610
* Test for PR1224.Jim Laskey2007-02-251-0/+12
| | | | llvm-svn: 34609
* Rework GlobalValue::removeDeadConstantUsers to always remove dead constantChris Lattner2007-02-252-25/+29
| | | | | | | | | | exprs hanging off a global, even if the global is not otherwise dead. This requires some tricky iterator gymnastics. This implements Transforms/GlobalOpt/constantexpr-dangle.ll by deleting a constantexpr that made it appear that the address of the function was taken. llvm-svn: 34608
* new testcase. @foo should be marked fastcc by globaloptChris Lattner2007-02-251-0/+11
| | | | llvm-svn: 34607
* disable some noisy debug outputChris Lattner2007-02-251-12/+12
| | | | llvm-svn: 34606
* no really, this is the right patchChris Lattner2007-02-251-1/+1
| | | | llvm-svn: 34605
* always promote float varargs to double.Chris Lattner2007-02-251-1/+1
| | | | llvm-svn: 34604
* 1. Provide more detail in file comment.Reid Spencer2007-02-251-189/+145
| | | | | | | | | | | | | | 2. Move comments for methods to .h file, delete them in .cpp file. 3. All places that were doing manual clear of high order bits now call the clearUnusedBits() method in order to not depend on undefined behavior of the >> operator when the number of bits shifted equals the word size. 4. Reduced # of loc by using the new result of clearUnusedBits() method. 5. Simplified logic (decreased indentation) in a few places. 6. Added code comments to larger functions that needed them. 7. Added FIXME notes about weak implementations of things (e.g. bit-by-bit shift right is sub-optimal). llvm-svn: 34603
* Fix clearUnusedBits to not depend on "undefined behavior" of >> operatorReid Spencer2007-02-251-9/+40
| | | | | | | | | | | when the bit size is equal to the word size. This happens to work out okay on x86, but might not on other platforms. The change just detects when there are no bits to clear (because BitWidth is a multiple of the word size) and returns early. Also, move some comments from .cpp file into header. llvm-svn: 34602
* one important bugfix: PPC32 didn't have both elf and macho support forChris Lattner2007-02-252-6/+10
| | | | | | | | | external symbols and global addresses. Add the missing ones. one important workaround: PPCISD::CALL is matched by both PPCcall_ELF and PPCcall_Macho, disable the _ELF patterns for now. llvm-svn: 34601
* add -enable-ehChris Lattner2007-02-251-1/+9
| | | | llvm-svn: 34600
* optimize duplicate ValueMap lookupsChris Lattner2007-02-251-9/+6
| | | | llvm-svn: 34599
* cosmetic changes from review of last patch. obviousDale Johannesen2007-02-252-4/+5
| | | | llvm-svn: 34598
* A couple of more places where a register liveness has been extended and its ↵Evan Cheng2007-02-251-5/+57
| | | | | | last kill should be updated accordingly. llvm-svn: 34597
* Add an assertion.Evan Cheng2007-02-251-2/+4
| | | | llvm-svn: 34596
* Fix a couple of bugs related IsDead back propagation during coalescing.Evan Cheng2007-02-251-5/+10
| | | | llvm-svn: 34595
* If the liveinterval of the source instruction has been extended, remove the ↵Evan Cheng2007-02-251-0/+6
| | | | | | IsKill marker. llvm-svn: 34594
* Only add liveinterval to livein set if it isn't assigned a stack slot.Evan Cheng2007-02-251-4/+4
| | | | llvm-svn: 34593
* fastcc functions that return double values now return them in xmm0 on x86-32.Chris Lattner2007-02-251-1/+3
| | | | | | This implements CodeGen/X86/fp-stack-ret.ll:test[23] llvm-svn: 34592
* verify that double is returned in XMM0 if the function is fastcc.Chris Lattner2007-02-251-3/+16
| | | | llvm-svn: 34591
* allow vectors to be passed to stdcall/fastcall functionsChris Lattner2007-02-251-18/+10
| | | | llvm-svn: 34590
OpenPOWER on IntegriCloud