aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/InstSelectSimple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* * Multiplications by 2^X are turned into shifts. This factors code out of theChris Lattner2003-10-191-95/+201
| | | | | | | | | | | | getelementptr code path for use by other code paths (like malloc and alloca). * Optimize comparisons with zero * Generate neg, not, inc, and dec instructions, when possible. This gives some code size wins, which might translate into performance. We'll see tommorow in the nightly tester. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9267 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.llxChris Lattner2003-10-191-9/+21
| | | | | | | This also fixes miscompilation of 176.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9249 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new varargs intrinsicsChris Lattner2003-10-181-26/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9224 91177308-0d34-0410-b5e6-96231b3b80d8
* Decrease usage of use_size()Chris Lattner2003-10-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9135 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling.Misha Brukman2003-10-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke passChris Lattner2003-10-051-31/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8871 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate support for the llvm.unwind intrinisic, using the Unwind ↵Chris Lattner2003-09-081-1/+0
| | | | | | instruction instead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the unwind instructionChris Lattner2003-09-081-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8408 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the llvm.unwind intrinsic, which we codegen to just do an abortChris Lattner2003-08-281-1/+29
| | | | | | | | | | | | | until we implement unwinding. Add support for the invoke instruction, which codegens just like a call with a branch after it. The end effect of this change is that programs using the invoke instruction, but never unwinding, will work fine. Programs that unwind will abort until we get unwind support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8187 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement: Jello/test-constantexpr.llChris Lattner2003-08-241-31/+66
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8127 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the sig(set|long)jmp intrinsicsChris Lattner2003-08-181-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7951 91177308-0d34-0410-b5e6-96231b3b80d8
* Factory methods for FunctionPasses now return type FunctionPass *.Brian Gaeke2003-08-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the real fix for the previous register allocator problem.Chris Lattner2003-08-051-0/+2
| | | | | | | Physical registers should not float around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7587 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llxChris Lattner2003-08-041-21/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7558 91177308-0d34-0410-b5e6-96231b3b80d8
* Use target specific interface instead of forcing it to be target-genericChris Lattner2003-07-301-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7413 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename function to be more consistent with filenameChris Lattner2003-07-261-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7352 91177308-0d34-0410-b5e6-96231b3b80d8
* If the pass changes _anything_ it must return trueChris Lattner2003-07-261-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7344 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code by using ConstantInt::getRawValue instead of checking to seeChris Lattner2003-07-231-23/+6
| | | | | | | whether the constant is signed or unsigned, then casting git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
* Please, save your applause^H^H^H^H^H^H^H^Hflames for the end...Brian Gaeke2003-07-181-3/+6
| | | | | | | | | | | | | | | | | Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic call which causes llc & lli to core-dump. Add a sort-of treatment of cast double to ulong. I am not really sure what a user should expect to see upon casting a negative FP value to unsigned long long. But with what is given here, I was able to write a program that could cast -123.456 to ulong and back and get -123.0, which seems like a step in the right direction. GCC seems to give you 0. I don't know if I'd consider that useful. These cases were coming up in GNU coreutils-5.0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7205 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getClassB for load and store; we don't want to abort when weBrian Gaeke2003-07-171-2/+2
| | | | | | | try to load or store through a bool*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7195 91177308-0d34-0410-b5e6-96231b3b80d8
* Setjmp should always return zero if we don't implement longjmp. This avoidsChris Lattner2003-06-301-0/+2
| | | | | | | leaving trash in the register, fixing anagram git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7013 91177308-0d34-0410-b5e6-96231b3b80d8
* Until there is a setjmp/longjmp transformation pass, codegen setjmp as a noopChris Lattner2003-06-291-0/+4
| | | | | | | and longjmp as an abort! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6977 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use the inefficient, fixed function, CBW, CDQ, ... instructionsChris Lattner2003-06-221-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6844 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor simplification to 64-bit instselChris Lattner2003-06-211-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6831 91177308-0d34-0410-b5e6-96231b3b80d8
* For 16 and 32-bit multiplies, use the IMUL instruction instead of the MUL ↵Chris Lattner2003-06-211-21/+11
| | | | | | | | | instruction. This allows us to not force the use of the EAX/AX registers! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6830 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate code for LONG indexes to getelementptr instructions more efficientlyChris Lattner2003-06-211-1/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6828 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement generation of cmp R, C to not use an extra registerChris Lattner2003-06-051-11/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6627 91177308-0d34-0410-b5e6-96231b3b80d8
* Special case simple binary operator X op CChris Lattner2003-06-051-27/+55
| | | | | | | | | | This avoid generating a register to hold C, which in turn speeds up the register allocator by a lot: ~9% on 164.gzip and ~17% on 256.bzip2. This also speeds up other passes. This also speeds up execution of the program marginally, and makes the asm much easier to read. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6626 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of typedefChris Lattner2003-06-031-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6583 91177308-0d34-0410-b5e6-96231b3b80d8
* * Implement cast (long|ulong) to boolChris Lattner2003-06-011-4/+22
| | | | | | | * Fix cast of (short|ushort|int|uint) to bool to work right git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6510 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for shl and shr for 64 bit integer typesChris Lattner2003-06-011-1/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6499 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up #includesChris Lattner2003-05-131-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6173 91177308-0d34-0410-b5e6-96231b3b80d8
* Make abort more explicitChris Lattner2003-05-121-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6151 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the assertion failure of course... dohChris Lattner2003-05-121-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6150 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement casts from unsigned integers to floating pointChris Lattner2003-05-121-11/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6148 91177308-0d34-0410-b5e6-96231b3b80d8
* Make error messages more useful than jsut an abortChris Lattner2003-05-121-2/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6146 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not insert multiple initializations for the same value in a PHI nodeChris Lattner2003-05-121-9/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6113 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Add, Sub, And, Or, & Xor constant exprsChris Lattner2003-05-081-13/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6049 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for variable argument functions!Chris Lattner2003-05-081-2/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6046 91177308-0d34-0410-b5e6-96231b3b80d8
* IMPLICIT_DEF was not the beautiful elegant solution I thought it was goingChris Lattner2003-05-071-6/+3
| | | | | | | to be. In fact, it made stuff worse. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6013 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit pseudo instructions to indicate that some registers are live on entranceChris Lattner2003-05-061-0/+11
| | | | | | | | and exit of the function. This fixes bug: Jello/2003-05-06-LivenessClobber.llx and the Fhourstones benchmark git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6010 91177308-0d34-0410-b5e6-96231b3b80d8
* The Hyphenation-Adding Committee is now in session.Misha Brukman2003-05-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5986 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bogus assertChris Lattner2003-04-251-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5949 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix iterator invalidation problem with cast instructionsChris Lattner2003-04-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5876 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the constantexpr CAST instruction correctlyChris Lattner2003-04-231-45/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5875 91177308-0d34-0410-b5e6-96231b3b80d8
* It's "necessary" to spell "necessarily" correctly.Misha Brukman2003-04-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5833 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a simple constantexpr: cast of one ptr type to anotherChris Lattner2003-04-211-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5829 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit unneccesary branch instructions!Chris Lattner2003-01-161-15/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5328 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement optimization folding setcc into branch.Chris Lattner2003-01-161-38/+113
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5324 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement code to keep the stack pointer aligned to an 8 byte boundary.Chris Lattner2003-01-161-1/+1
| | | | | | | | | This improves the performance of the power benchmark by a few percent. This will be neccesary for SSE code, which requires 16 byte alignment of the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5320 91177308-0d34-0410-b5e6-96231b3b80d8