Chris Lattner
30d26ac561
Generate the fchs instruction to negate a floating point number
...
llvm-svn: 11078
2004-02-02 19:31:38 +00:00
Chris Lattner
298fdd7eb1
Codegen -0.0 correctly. Do not use fldz! This is another -0.0 == +0.0 problem, arg.
...
llvm-svn: 11070
2004-02-02 18:56:30 +00:00
Chris Lattner
4710add9dd
Add (currently disabled) support to the instruction selector to only insert
...
FP_REG_KILL instructions at the end of blocks involved with critical edges.
Fix a bug where FP_REG_KILL instructions weren't inserted in fall through
unconditional branches. Perhaps this will fix some linscan problems?
llvm-svn: 11019
2004-01-30 22:13:44 +00:00
Alkis Evlogimenos
975c8bde79
Output mov %REG = 0 instead of xor %REG, %REG, %REG to clear a
...
register so that LiveVariable analysis is not confused.
llvm-svn: 10773
2004-01-12 07:22:45 +00:00
Chris Lattner
5d236005b0
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Chris Lattner
10cac58d23
Whoops, don't try to lower non intrinsic calls
...
llvm-svn: 10632
2003-12-28 09:53:23 +00:00
Chris Lattner
c45a033b42
implement support for the intrinsic lowering functionality
...
llvm-svn: 10629
2003-12-28 09:47:19 +00:00
Alkis Evlogimenos
2103574b32
Move FP_REG_KILL closer to the return instruction.
...
llvm-svn: 10567
2003-12-21 16:47:43 +00:00
Alkis Evlogimenos
27437e3318
Move FP_REG_KILL closer to the actual branch instruction.
...
llvm-svn: 10563
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
68cff6bf4d
Remove floating point killer pass. This is now implemented in the
...
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.
llvm-svn: 10562
2003-12-20 16:22:59 +00:00
Brian Gaeke
9ba9225b35
Constant shift expressions, meet InstSelectSimple. Yow!!
...
llvm-svn: 10170
2003-11-22 06:49:41 +00:00
Brian Gaeke
e42b8fd298
Stub for constant shift expr support.
...
llvm-svn: 10168
2003-11-22 05:18:35 +00:00
Chris Lattner
8c09ecf0c9
Fix PR123
...
llvm-svn: 10069
2003-11-18 17:47:05 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
37f4a4c184
Delete unused EmitByteSwap method
...
Implement mul/div/rem constant expressions
llvm-svn: 9424
2003-10-23 17:21:43 +00:00
Misha Brukman
998cabe4ff
* Order includes according to style guide
...
* Convert tabs to spaces
* Make code fit within 80 columns
llvm-svn: 9416
2003-10-23 16:22:08 +00:00
John Criswell
482202a601
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
369246d855
Further cleanups and simplifications
...
llvm-svn: 9282
2003-10-20 04:48:06 +00:00
Chris Lattner
358e7c3edb
Eliminate code for pointer size and endianness emulation.
...
llvm-svn: 9281
2003-10-20 04:11:23 +00:00
Chris Lattner
97e1b55723
* 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
bf87734fa0
* 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
ee898b35a1
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
80a308c920
Add support for the new varargs intrinsics
...
llvm-svn: 9224
2003-10-18 05:56:40 +00:00
Chris Lattner
f95d9b99b3
Decrease usage of use_size()
...
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Misha Brukman
8b2bd4ed47
Fix spelling.
...
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Chris Lattner
37225efa97
Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke pass
...
llvm-svn: 8871
2003-10-05 19:15:47 +00:00
Chris Lattner
04ecefe232
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
9c58cf6d03
Add support for the unwind instruction
...
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
147b66cd2b
Add support for the llvm.unwind intrinsic, which we codegen to just do an abort
...
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.
llvm-svn: 8187
2003-08-28 21:23:43 +00:00
Chris Lattner
2a3b4e5bc7
Implement: Jello/test-constantexpr.ll
...
llvm-svn: 8127
2003-08-24 19:19:47 +00:00
Chris Lattner
a592cac43c
Add support for the sig(set|long)jmp intrinsics
...
llvm-svn: 7951
2003-08-18 16:06:09 +00:00
Brian Gaeke
89207943a1
Factory methods for FunctionPasses now return type FunctionPass *.
...
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Chris Lattner
7c257321c7
This is the real fix for the previous register allocator problem.
...
Physical registers should not float around.
llvm-svn: 7587
2003-08-05 00:48:47 +00:00
Chris Lattner
796684b8c7
Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
...
llvm-svn: 7558
2003-08-04 02:12:48 +00:00
Chris Lattner
ea6aac412d
Use target specific interface instead of forcing it to be target-generic
...
llvm-svn: 7413
2003-07-30 05:33:48 +00:00
Chris Lattner
a2e2f5cc45
Rename function to be more consistent with filename
...
llvm-svn: 7352
2003-07-26 23:49:58 +00:00
Chris Lattner
ba21b33499
If the pass changes _anything_ it must return true
...
llvm-svn: 7344
2003-07-26 23:05:37 +00:00
Chris Lattner
6077c3195f
Simplify code by using ConstantInt::getRawValue instead of checking to see
...
whether the constant is signed or unsigned, then casting
llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Brian Gaeke
26bb3c1df6
Please, save your applause^H^H^H^H^H^H^H^Hflames for the end...
...
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.
llvm-svn: 7205
2003-07-18 20:23:43 +00:00
Brian Gaeke
ac7c5a5241
Use getClassB for load and store; we don't want to abort when we
...
try to load or store through a bool*.
llvm-svn: 7195
2003-07-17 21:30:06 +00:00
Chris Lattner
53426e6526
Setjmp should always return zero if we don't implement longjmp. This avoids
...
leaving trash in the register, fixing anagram
llvm-svn: 7013
2003-06-30 19:35:54 +00:00
Chris Lattner
7ac937e011
Until there is a setjmp/longjmp transformation pass, codegen setjmp as a noop
...
and longjmp as an abort!
llvm-svn: 6977
2003-06-29 16:42:32 +00:00
Chris Lattner
53b843fc04
Do not use the inefficient, fixed function, CBW, CDQ, ... instructions
...
llvm-svn: 6844
2003-06-22 03:31:18 +00:00
Chris Lattner
6e1ec2394f
Minor simplification to 64-bit instsel
...
llvm-svn: 6831
2003-06-21 18:15:27 +00:00
Chris Lattner
22f54501be
For 16 and 32-bit multiplies, use the IMUL instruction instead of the MUL instruction.
...
This allows us to not force the use of the EAX/AX registers!
llvm-svn: 6830
2003-06-21 17:16:58 +00:00
Chris Lattner
df1230ecf2
Generate code for LONG indexes to getelementptr instructions more efficiently
...
llvm-svn: 6828
2003-06-21 16:01:24 +00:00
Chris Lattner
f6db070e65
Implement generation of cmp R, C to not use an extra register
...
llvm-svn: 6627
2003-06-05 19:30:30 +00:00
Chris Lattner
06250116a8
Special case simple binary operator X op C
...
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. :)
llvm-svn: 6626
2003-06-05 18:28:55 +00:00
Chris Lattner
fd2a8f5868
Remove usage of typedef
...
llvm-svn: 6583
2003-06-03 15:41:58 +00:00
Chris Lattner
4536fcd57b
* Implement cast (long|ulong) to bool
...
* Fix cast of (short|ushort|int|uint) to bool to work right
llvm-svn: 6510
2003-06-01 03:38:24 +00:00