aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-20246-2/+1722
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* "Function"[0] == 'F', not 'M'Chris Lattner2003-10-202-16/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9297 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor leftover fixups from replaceMachineCodeForFunction () change.Brian Gaeke2003-10-202-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9295 91177308-0d34-0410-b5e6-96231b3b80d8
* fix file headerChris Lattner2003-10-201-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9294 91177308-0d34-0410-b5e6-96231b3b80d8
* Added copyright header to all C++ source files.John Criswell2003-10-201-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
* Make replaceMachineCodeForFunction() return void.Brian Gaeke2003-10-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9289 91177308-0d34-0410-b5e6-96231b3b80d8
* Make replaceMachineCodeForFunction return void.Brian Gaeke2003-10-202-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9288 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently the dependencies are wrong for this file, so it didn't rebuild itChris Lattner2003-10-201-1/+1
| | | | | | | when changing Instruction.def. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9286 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder for minor efficiency gainChris Lattner2003-10-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9285 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit x86 instructions for: A = B op C, where A and B are 16-bit registers,Chris Lattner2003-10-203-0/+94
| | | | | | | | | | | | | | | | | | | | | | | C is a constant which can be sign-extended from 8 bits without value loss, and op is one of: add, sub, imul, and, or, xor. This allows the JIT to emit the one byte version of the constant instead of the two or 4 byte version. Because these instructions are very common, this can save a LOT of code space. For example, I sampled two benchmarks, 176.gcc and 254.gap. BM Old New Reduction 176.gcc 2673621 2548962 4.89% 254.gap 498261 475104 4.87% Note that while the percentage is not spectacular, this did eliminate 124.6 _KILOBYTES_ of codespace from gcc. Not bad. Note that this doesn't effect the llc version at all, because the assembler already does this optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9284 91177308-0d34-0410-b5e6-96231b3b80d8
* Hrm, a relic from the past. How cute :)Chris Lattner2003-10-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9283 91177308-0d34-0410-b5e6-96231b3b80d8
* Further cleanups and simplificationsChris Lattner2003-10-202-64/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9282 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate code for pointer size and endianness emulation.Chris Lattner2003-10-203-314/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9281 91177308-0d34-0410-b5e6-96231b3b80d8
* The Grammar Police was here.Misha Brukman2003-10-202-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9280 91177308-0d34-0410-b5e6-96231b3b80d8
* * Rename X86::IMULr16 -> X86::IMULrr16Chris Lattner2003-10-206-19/+69
| | | | | | | | * Implement R1 = R2 * C where R1 and R2 are 32 or 16 bits. This avoids an extra copy into a register, reducing register pressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9278 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unused classChris Lattner2003-10-191-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9270 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the Opcode enum for PHI nodes from "Instruction::PHINode" to ↵Chris Lattner2003-10-1913-19/+19
| | | | | | "Instruction::PHI" to be more consistent with the other instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9269 91177308-0d34-0410-b5e6-96231b3b80d8
* * Multiplications by 2^X are turned into shifts. This factors code out of theChris Lattner2003-10-192-190/+402
| | | | | | | | | | | | 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
* Add some new instructions. WheeeChris Lattner2003-10-191-1/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9266 91177308-0d34-0410-b5e6-96231b3b80d8
* .string adds an implicit zero at the end. This is not what we wanted.Chris Lattner2003-10-192-2/+2
| | | | | | | This fixes PR#44. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9252 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debugtype, make output marginally more niceChris Lattner2003-10-191-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9251 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR #47Chris Lattner2003-10-191-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9250 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.llxChris Lattner2003-10-192-18/+42
| | | | | | | This also fixes miscompilation of 176.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9249 91177308-0d34-0410-b5e6-96231b3b80d8
* Without this option, the -run-llc mode does not work with shared objects atChris Lattner2003-10-181-0/+1
| | | | | | | | all, making it pointless for use with the code generator debugger. With it, it works like a charm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9245 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warningChris Lattner2003-10-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9236 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for new linkage typesChris Lattner2003-10-182-8/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9228 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR#50Chris Lattner2003-10-181-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9227 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new varargs intrinsics and instructionsChris Lattner2003-10-185-34/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9226 91177308-0d34-0410-b5e6-96231b3b80d8
* ADd support for the new varargs instructionsChris Lattner2003-10-181-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new varargs intrinsicsChris Lattner2003-10-182-52/+72
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9224 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the sparc backend to at least compile correctly with the new varargs ↵Chris Lattner2003-10-182-4/+16
| | | | | | stuff even if it's not all implemented yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9223 91177308-0d34-0410-b5e6-96231b3b80d8
* Interpret the new varargs intrinsics correctlyChris Lattner2003-10-183-28/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9222 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated to emit the final 1.0 bytecode format. This supports weak linkage,Chris Lattner2003-10-182-22/+40
| | | | | | | more efficient encoding of varargs calls, and the new varargs intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9221 91177308-0d34-0410-b5e6-96231b3b80d8
* * New revised variable argument handling supportChris Lattner2003-10-185-149/+290
| | | | | | | | * More dense bytecode encoding for varargs calls (like printf) * Eliminated the extremely old bytecode format. rev #0 is now 1.0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9220 91177308-0d34-0410-b5e6-96231b3b80d8
* New revised variable argument handling supportChris Lattner2003-10-182-5/+108
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9219 91177308-0d34-0410-b5e6-96231b3b80d8
* Chris says it's better to assert that TheModule is valid than silently return 0.Misha Brukman2003-10-171-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9212 91177308-0d34-0410-b5e6-96231b3b80d8
* You can't just blat the address into memory, you have to blat itsBrian Gaeke2003-10-171-4/+7
| | | | | | | displacement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9210 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't release the Module, as that invalidates the Module* within theMisha Brukman2003-10-171-2/+2
| | | | | | | | ModuleProvider, which has bad consequences in lli::callAsMain() which tries to access that same Module*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9205 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement replaceMachineCodeForFunction() for x86.Brian Gaeke2003-10-171-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9204 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor jump insertion code from CompilationCallback() into insertJumpAtAddr().Brian Gaeke2003-10-171-27/+33
| | | | | | | | | Make insertFarJumpAtAddr() return void, because nothing uses its return value. Remove some commented-out code. Implement replaceMachineCodeForFunction() for SPARC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9203 91177308-0d34-0410-b5e6-96231b3b80d8
* Add prototype for replaceMachineCodeForFunction().Brian Gaeke2003-10-172-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9202 91177308-0d34-0410-b5e6-96231b3b80d8
* Return the Module that we just materialized.Misha Brukman2003-10-171-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9201 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up doxygen comment for getPointerToFunction().Brian Gaeke2003-10-172-0/+20
| | | | | | | Add prototypes for recompileAndRelinkFunction() and runJITOnFunction(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9200 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor running the JIT passes on a single function into the new method,Brian Gaeke2003-10-171-7/+35
| | | | | | | | | | runJITOnFunction(). Add new method for recompiling and patching in new versions of functions, recompileAndRelinkFunction(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9199 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra blank line.Brian Gaeke2003-10-171-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9196 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not crash on empty structuresChris Lattner2003-10-171-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9195 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up handling of checks for shift instructionsChris Lattner2003-10-171-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9191 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate some extraneous code in SlotCalculator::insertVal().Alkis Evlogimenos2003-10-178-106/+103
| | | | | | | | | | Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(), SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(), SlotCalculator::insertVal() to SlotCalculator::insertValue(), and SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9190 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Brian Gaeke2003-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9187 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment, and zap a blank line.Brian Gaeke2003-10-161-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9184 91177308-0d34-0410-b5e6-96231b3b80d8