Chris Lattner
5b2282a2e4
Update the 'used' flag correctly
...
llvm-svn: 9366
2003-10-22 04:43:18 +00:00
Chris Lattner
a322b9b4f3
Loop over the module, not the symbol table. This makes the code handle
...
unused external functions again
llvm-svn: 9365
2003-10-22 04:42:20 +00:00
Chris Lattner
8d7712e9c5
Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll
...
llvm-svn: 9363
2003-10-22 03:35:34 +00:00
Misha Brukman
c40b8306f6
* Fix order of #includes to follow style guide
...
* It's no longer a BasicBlock pass: update comment on run() method
* Fix placement of braces to be consistent
* Delete extraneous whitespace
llvm-svn: 9361
2003-10-22 03:27:45 +00:00
Misha Brukman
f8d45938f8
Converted tabs to spaces.
...
llvm-svn: 9360
2003-10-22 03:10:26 +00:00
Chris Lattner
2ae188d8e3
Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll
...
llvm-svn: 9359
2003-10-21 23:17:56 +00:00
Chris Lattner
1519122fa7
Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
...
llvm-svn: 9357
2003-10-21 22:46:38 +00:00
Chris Lattner
4f65be9ac3
Fix message to make more sense and confuse Chris less
...
llvm-svn: 9354
2003-10-21 21:52:20 +00:00
Chris Lattner
5f4ed13cb9
Make sure to add a type for va_next operands, which may not other wise
...
occur in the module
llvm-svn: 9336
2003-10-21 17:40:54 +00:00
Chris Lattner
53d92d23b0
Fix problem which effected linking apache
...
llvm-svn: 9335
2003-10-21 17:39:59 +00:00
Chris Lattner
7a75f6b7d4
Hrm, unbreak stuph :(
...
llvm-svn: 9334
2003-10-21 17:22:23 +00:00
Chris Lattner
19f471f002
Fix preselection/lowerswitches bug
...
llvm-svn: 9333
2003-10-21 16:29:23 +00:00
Chris Lattner
2c063c848d
Pull the PHI special case into it's own visit* method
...
llvm-svn: 9332
2003-10-21 16:09:23 +00:00
Chris Lattner
4b8ce1c80d
The lastOp operand is never used
...
llvm-svn: 9331
2003-10-21 16:06:07 +00:00
John Criswell
4746befea3
Added LLVM copyright notice.
...
llvm-svn: 9324
2003-10-21 15:29:18 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
Chris Lattner
bec3b4ede1
Preselection is _not_ a basicblock pass, because it adds global variables to
...
the module. This change converts it from being a basic block pass to being
a simple pass. This allows elimination of the annotation and simplification
of the logic for moving constants into global variables.
llvm-svn: 9320
2003-10-21 14:49:19 +00:00
Vikram S. Adve
b289dff9a8
When opcodes like ADD were split into reg. and immed. versions (ADDi and ADDr),
...
this code wasn't fixed correctly so it missed copy operations that used ADDi.
llvm-svn: 9318
2003-10-21 12:29:45 +00:00
Vikram S. Adve
abf40e897c
Why does g++ not even generate a warning when you miss a break statement?
...
llvm-svn: 9317
2003-10-21 12:28:27 +00:00
Vikram S. Adve
062fda7446
Implement the new varargs instructions and intrinsics.
...
llvm-svn: 9316
2003-10-21 11:25:09 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
Chris Lattner
489483fe88
Convert this code from using annotations to using a local map
...
llvm-svn: 9310
2003-10-20 20:52:23 +00:00
Brian Gaeke
f9b97fda86
Goodbye, AddRegNumToValues
...
llvm-svn: 9309
2003-10-20 20:44:03 +00:00
Chris Lattner
e06b3121c8
Remove using declaration
...
llvm-svn: 9307
2003-10-20 20:38:17 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
d26c1d63f6
"Function"[0] == 'F', not 'M'
...
llvm-svn: 9297
2003-10-20 19:10:06 +00:00
Brian Gaeke
9501118e3b
Minor leftover fixups from replaceMachineCodeForFunction () change.
...
llvm-svn: 9295
2003-10-20 17:59:09 +00:00
Brian Gaeke
b4ceb43a43
Make replaceMachineCodeForFunction() return void.
...
llvm-svn: 9289
2003-10-20 15:17:12 +00:00
Brian Gaeke
afbe8787cc
Make replaceMachineCodeForFunction return void.
...
llvm-svn: 9288
2003-10-20 15:15:17 +00:00
Chris Lattner
332429f023
Apparently the dependencies are wrong for this file, so it didn't rebuild it
...
when changing Instruction.def. :(
llvm-svn: 9286
2003-10-20 14:12:52 +00:00
Chris Lattner
caf5825a8a
Reorder for minor efficiency gain
...
llvm-svn: 9285
2003-10-20 05:54:26 +00:00
Chris Lattner
c4f8226aaf
Emit x86 instructions for: A = B op C, where A and B are 16-bit registers,
...
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.
llvm-svn: 9284
2003-10-20 05:53:31 +00:00
Chris Lattner
bdc522f19d
Hrm, a relic from the past. How cute :)
...
llvm-svn: 9283
2003-10-20 05:45:49 +00:00
Chris Lattner
c83d8249cb
Further cleanups and simplifications
...
llvm-svn: 9282
2003-10-20 04:48:06 +00:00
Chris Lattner
fce0650cee
Eliminate code for pointer size and endianness emulation.
...
llvm-svn: 9281
2003-10-20 04:11:23 +00:00
Misha Brukman
be506fc1c5
The Grammar Police was here.
...
llvm-svn: 9280
2003-10-20 04:03:10 +00:00
Chris Lattner
5a577c0b28
* Rename X86::IMULr16 -> X86::IMULrr16
...
* Implement R1 = R2 * C where R1 and R2 are 32 or 16 bits. This avoids an
extra copy into a register, reducing register pressure.
llvm-svn: 9278
2003-10-20 03:42:58 +00:00
Chris Lattner
7a4e225f37
Eliminate unused class
...
llvm-svn: 9270
2003-10-19 21:39:41 +00:00
Chris Lattner
87843f87b8
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
...
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
3d519c7bab
* Multiplications by 2^X are turned into shifts. This factors code out of the
...
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.
llvm-svn: 9267
2003-10-19 21:09:10 +00:00
Chris Lattner
57825f087d
Add some new instructions. Wheee
...
llvm-svn: 9266
2003-10-19 19:25:35 +00:00
Chris Lattner
9107ee3a11
.string adds an implicit zero at the end. This is not what we wanted.
...
This fixes PR#44.
llvm-svn: 9252
2003-10-19 02:51:01 +00:00
Chris Lattner
9a758cd924
Add debugtype, make output marginally more nice
...
llvm-svn: 9251
2003-10-19 02:27:40 +00:00
Chris Lattner
5c98a2d33a
Fix PR #47
...
llvm-svn: 9250
2003-10-19 02:14:58 +00:00
Chris Lattner
de87c8a892
Fix bug: Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.llx
...
This also fixes miscompilation of 176.gcc.
llvm-svn: 9249
2003-10-19 00:26:11 +00:00
Chris Lattner
27798b47fb
Without this option, the -run-llc mode does not work with shared objects at
...
all, making it pointless for use with the code generator debugger. With it,
it works like a charm.
llvm-svn: 9245
2003-10-18 21:54:47 +00:00
Chris Lattner
620cb7e35a
Fix warning
...
llvm-svn: 9236
2003-10-18 19:48:10 +00:00
Chris Lattner
3ff64cf568
add support for new linkage types
...
llvm-svn: 9228
2003-10-18 06:30:21 +00:00
Chris Lattner
e4a69325ff
Fix PR#50
...
llvm-svn: 9227
2003-10-18 06:14:59 +00:00
Chris Lattner
29825508f0
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00