aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* * Add the lost fix to define the second reg of a 2-reg representation of longsMisha Brukman2004-07-212-2/+8
| | | | | | | * Fix opcode RLWNM -> RLWINM since it uses an immediate const shift value git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15087 91177308-0d34-0410-b5e6-96231b3b80d8
* * Speed up canUseAsImmediateForOpcode() by comparing Operand beforeMisha Brukman2004-07-212-38/+38
| | | | | | | | dyn_cast<>ing and checking Constant's value * Convert tabs to spaces git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15086 91177308-0d34-0410-b5e6-96231b3b80d8
* * Further cleanup.Chris Lattner2004-07-211-9/+27
| | | | | | | | | | | | * Test for whether bits are shifted out during the optzn. If so, the fold is illegal, though it can be handled explicitly for setne/seteq This fixes the miscompilation of 254.gap last night, which was a latent bug exposed by other optimizer improvements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15085 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix printing of signed immediate values (Nate Begeman)Misha Brukman2004-07-213-21/+87
| | | | | | | | * Fix printing of `zeroinitializer' * Fix printing of `linkonce' globals, complete with stubs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15084 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix printing of signed immediate valuesMisha Brukman2004-07-212-1006/+854
| | | | | | | | | | | | | * Generation of opcodes that take 16 bit immediates * Rewrote multiply to be correct for 64 bit values * Rewrote all the long handling to be correct for PowerPC * Fix visitSelectInst() to define the upper register of the pair of regs representing a long value Patch contributed by Nate Begeman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15083 91177308-0d34-0410-b5e6-96231b3b80d8
* Make cast-cast code a bit more defensiveChris Lattner2004-07-211-32/+42
| | | | | | | "simplify" a bit of code for comparison/and folding git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15082 91177308-0d34-0410-b5e6-96231b3b80d8
* Use addSImm() instead of addImm() for stack offsets, which may be negative.Misha Brukman2004-07-211-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15081 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix analysis name.Alkis Evlogimenos2004-07-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15078 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SUBI instructionMisha Brukman2004-07-211-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15077 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear spilled list at once. Remove unused vector.Alkis Evlogimenos2004-07-211-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15073 91177308-0d34-0410-b5e6-96231b3b80d8
* Change std::list into a std::vector for IntervalSets. This reducesAlkis Evlogimenos2004-07-211-4/+5
| | | | | | | compile time for 176.gcc from 5.6 secs to 4.7 secs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15072 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve file comment.Alkis Evlogimenos2004-07-211-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15069 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Iterative scan register allocator.Alkis Evlogimenos2004-07-212-4/+479
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15068 91177308-0d34-0410-b5e6-96231b3b80d8
* Linearscan is no longer experimental.Alkis Evlogimenos2004-07-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15067 91177308-0d34-0410-b5e6-96231b3b80d8
* Add capability to remove aliasing aliassets from an ASTChris Lattner2004-07-211-0/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15066 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the AST interface a bit richer by returning whether an insertion causedChris Lattner2004-07-211-19/+32
| | | | | | | an insertion or not (because the pointer set already existed). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15064 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove special casing of pointers and treat them generically as integers ofChris Lattner2004-07-211-8/+5
| | | | | | | the appopriate size. This gives us the ability to eliminate int -> ptr -> int git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15063 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not ignore casts unless they are pointer-pointer casts. This caused usChris Lattner2004-07-211-4/+8
| | | | | | | to miscompile the SingleSource/Regression/C++/pointer_member.cpp program. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15062 91177308-0d34-0410-b5e6-96231b3b80d8
* Solaris hack for isinf()Brian Gaeke2004-07-211-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15058 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit NaNs and INFs bit-identically to the bytecode file, if the system hasBrian Gaeke2004-07-212-4/+128
| | | | | | | | printf("%a") support. Patch contributed by Bill Wendling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15056 91177308-0d34-0410-b5e6-96231b3b80d8
* Add platform-independent wrapper function for isinf().Brian Gaeke2004-07-211-0/+31
| | | | | | | Patch contributed by Bill Wendling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15050 91177308-0d34-0410-b5e6-96231b3b80d8
* Shorts are aligned to 2 bytes, bools to 1 byte (in structs).Misha Brukman2004-07-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15048 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat external variables similarly to those with weak linkage: load indirect.Misha Brukman2004-07-202-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15047 91177308-0d34-0410-b5e6-96231b3b80d8
* Differentiate between global and weak symbol loadsMisha Brukman2004-07-201-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15037 91177308-0d34-0410-b5e6-96231b3b80d8
* * Differentiate between global and weak symbol loadsMisha Brukman2004-07-202-128/+90
| | | | | | | | | | | | | * Fix functions that take more than 32 bytes of args * Alignment of doubles in structs is 4 bytes, not 8 * Fix passing long args: rN = hi, rN+1 = lo * Rewrite signed divide * Rewrite Intrinsic::returnaddress Patch courtesy of Nate Begeman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15036 91177308-0d34-0410-b5e6-96231b3b80d8
* Differentiate between global and weak symbol loadsMisha Brukman2004-07-203-18/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15035 91177308-0d34-0410-b5e6-96231b3b80d8
* Double alignment in structs is 4 bytes, not 8. Patch by Nate Begeman.Misha Brukman2004-07-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15034 91177308-0d34-0410-b5e6-96231b3b80d8
* Add function to clear all virtual->physical mappings but not assignedAlkis Evlogimenos2004-07-201-0/+5
| | | | | | | stack slots. This is in preparation for the iterative linear scan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15032 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded functor. LiveInterval has a < operator.Alkis Evlogimenos2004-07-201-11/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a serious code pessimization problem. If an inlined function has a singleChris Lattner2004-07-201-5/+6
| | | | | | | | return, clone the 'ret' BB code into the block AFTER the inlined call, not the other way around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15030 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement Transforms/InstCombine/IntPtrCast.llChris Lattner2004-07-201-11/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15029 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore instructions that are in trivially dead functions. This allows usChris Lattner2004-07-201-4/+17
| | | | | | | to constify 14 globals instead of 4 in a trivial C++ testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15027 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stack frame layout in prologue/epilogue. Patch courtesy of Nate Begeman.Misha Brukman2004-07-201-18/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15026 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/GEPIdxCanon.llChris Lattner2004-07-201-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15024 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement SimplifyCFG/BrUnwind.llChris Lattner2004-07-201-2/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15022 91177308-0d34-0410-b5e6-96231b3b80d8
* Move handing of GlobalValues from getReg() to copyConstantToRegister(), thisMisha Brukman2004-07-202-38/+22
| | | | | | | will avoid extra register-to-register copies. Thanks to Chris for the idea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15019 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite cast->cast elimination code completely based on the information weChris Lattner2004-07-201-43/+53
| | | | | | | | | actually care about. Someday when the cast instruction is gone, we can do better here, but this will do for now. This implements instcombine/cast.ll:test17/18 as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15018 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fn args passed in registers are now recorded as used by the call instructionMisha Brukman2004-07-203-18/+54
| | | | | | | | | `-> asm printer updated to not print out those registers with the call instr All of Shootout tests now work. Great thanks to Nate Begeman for the patch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15015 91177308-0d34-0410-b5e6-96231b3b80d8
* * cFP class split into cFP32 and cFP64Misha Brukman2004-07-202-436/+458
| | | | | | | | | | | | | | | | * Fn args passed in registers are now recorded as used by the call instruction `-> asm printer updated to not print out those registers with the call instr * Stack frame layout in prolog/epilog fixed, spills and vararg fns now work * float/double to signed int codegen now correct * various single precision float codegen bugs fixed * const integer multiply codegen fixed * select and setcc blocks inserted into the correct place in machine CFG * load of integer constant code optimized All of Shootout tests now work. Great thanks to Nate Begeman for the patch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15014 91177308-0d34-0410-b5e6-96231b3b80d8
* While I'm at it, don't break codegen of mul by 3,5,9.Chris Lattner2004-07-192-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15013 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate better code for multiplies by negative constants like -4, -1, -9, etc.Chris Lattner2004-07-192-8/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15012 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Alkis Evlogimenos2004-07-191-17/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15011 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that occurs when the last instruction in a range is deadChris Lattner2004-07-191-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15005 91177308-0d34-0410-b5e6-96231b3b80d8
* When joining intervals, join intervals in deeply nested loops first. ThisChris Lattner2004-07-191-4/+34
| | | | | | | | is a simple change, but seems to improve code a little. For example, on 256.bzip2, we went from 75.0s -> 73.33s (2% speedup). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15004 91177308-0d34-0410-b5e6-96231b3b80d8
* Split joinIntervals into two methodsChris Lattner2004-07-192-84/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15003 91177308-0d34-0410-b5e6-96231b3b80d8
* bug 122:Reid Spencer2004-07-191-2/+1
| | | | | | | | Simplify a conditional operator for a constant result from GV->isNullValue() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15001 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline 4 methodsChris Lattner2004-07-193-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15000 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need to store the MBB along with the MI any more, we can nowChris Lattner2004-07-193-16/+16
| | | | | | | ask instructions for their parent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14998 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)Chris Lattner2004-07-194-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()Chris Lattner2004-07-191-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14996 91177308-0d34-0410-b5e6-96231b3b80d8