Bill Wendling
5789edd7f5
New "TargetObjInfo" class. This holds information that the object writers will
...
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.
llvm-svn: 33286
2007-01-17 03:46:30 +00:00
Anton Korobeynikov
47f343edc3
Missed "<" :)
...
llvm-svn: 33265
2007-01-16 20:22:18 +00:00
Anton Korobeynikov
9b380c56f2
Cleanup. Comments added.
...
llvm-svn: 33260
2007-01-16 18:23:09 +00:00
Chris Lattner
30cef1024d
document some subtlety
...
llvm-svn: 33257
2007-01-16 17:51:40 +00:00
Anton Korobeynikov
8fbc09843e
Emit symbol type information for ELF/COFF targets
...
llvm-svn: 33256
2007-01-16 16:41:57 +00:00
Bill Wendling
efde03bbf6
Instead of yet another enum indicating the "assembly language flavor",
...
just use the one that's in the subtarget.
llvm-svn: 33255
2007-01-16 09:29:17 +00:00
Bill Wendling
08272a2fa6
Make inline ASM the INTEL one if it's in that emission mode.
...
llvm-svn: 33247
2007-01-16 04:13:03 +00:00
Bill Wendling
cfdd717db5
Fix for PR1095:
...
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.
llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Chris Lattner
851b9e93a2
add some notes
...
llvm-svn: 33228
2007-01-15 06:25:39 +00:00
Chris Lattner
c5e1611848
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
...
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
bf132d8342
Make use of isInteger vs isIntegral more explicit
...
llvm-svn: 33216
2007-01-15 01:48:11 +00:00
Anton Korobeynikov
9398ef2167
No hidden visiblity on Mingw32/Cygwin
...
llvm-svn: 33202
2007-01-14 11:49:39 +00:00
Chris Lattner
f43ad084b8
add support for hidden visibility to darwin/x86
...
llvm-svn: 33198
2007-01-14 06:29:53 +00:00
Chris Lattner
716c76605c
add a missing else. This caused globals to be printed as:
...
movq ___dso_handle@GOTPCREL(%rip)(%rip), %rsi
instead of:
movq ___dso_handle@GOTPCREL(%rip), %rsi
llvm-svn: 33196
2007-01-14 06:08:14 +00:00
Chris Lattner
3560a9f595
darwin doesn't use .hidden. Disable this until we fix it right.
...
llvm-svn: 33191
2007-01-14 00:50:56 +00:00
Chris Lattner
a4d48724af
Fix PR1103 and Regression/CodeGen/X86/2007-01-13-StackPtrIndex.ll
...
llvm-svn: 33189
2007-01-14 00:13:07 +00:00
Chris Lattner
937b09c54a
remove dead code, frameindices must be resolve before the asmprinter runs.
...
llvm-svn: 33187
2007-01-13 23:59:03 +00:00
Chris Lattner
657e08b994
remove over-general code.
...
llvm-svn: 33157
2007-01-12 23:28:32 +00:00
Reid Spencer
09efdecc2d
Adjust #includes to compensate for lost of DerivedTypes.h in
...
TargetLowering.h
llvm-svn: 33154
2007-01-12 23:22:14 +00:00
Anton Korobeynikov
548b9af9c2
* PIC codegen for X86/Linux has been implemented
...
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)
llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Reid Spencer
373d2bccea
For PR1064:
...
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.
This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
bits in an integer. The Type classes SubclassData field is used to
store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
64-bit integers. These are replaced with just IntegerType which is not
a primitive any more.
3. Adjust the rest of LLVM to account for this change.
Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types. Future increments
will rectify this situation.
llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Chris Lattner
a62936ee6f
relax type
...
llvm-svn: 32983
2007-01-07 07:24:32 +00:00
Anton Korobeynikov
874aaaa34a
As PR1085 was fixed, back out workaround
...
llvm-svn: 32969
2007-01-07 00:41:20 +00:00
Anton Korobeynikov
fdd778278f
gcc often inserts it's own names for sections (e.g.
...
gnu.linkonce.t.FunctionName). Convert them to "normal" LLVM names,
otherwise linker won't be able to merge them.
llvm-svn: 32958
2007-01-06 18:24:26 +00:00
Chris Lattner
aed0e0292b
new note
...
llvm-svn: 32945
2007-01-06 01:30:45 +00:00
Evan Cheng
df277336b8
- FCOPYSIGN custom lowering bug. Clear the sign bit of operand 0 first before
...
or'ing in the sign bit of operand 1.
- Tweaking: rather than left shift the sign bit, fp_extend operand 1 first
before taking its sign bit if its type is smaller than that of operand 0.
llvm-svn: 32932
2007-01-05 21:37:56 +00:00
Evan Cheng
c273c9c830
Typo
...
llvm-svn: 32902
2007-01-05 08:32:24 +00:00
Evan Cheng
bcf3d2bd15
With SSE2, expand FCOPYSIGN to a series of SSE bitwise operations.
...
llvm-svn: 32900
2007-01-05 07:55:56 +00:00
Chris Lattner
aaafc3d16b
fix testcase. It's not safe to strictly evaluate a load that should be lazy.
...
llvm-svn: 32842
2007-01-03 19:12:31 +00:00
Chris Lattner
a3f7277e2e
Private labels start with .L on linux, not just .
...
llvm-svn: 32841
2007-01-03 18:16:48 +00:00
Reid Spencer
c2da5d3d97
Fix a comment that referred to the now defunct ubyte type.
...
llvm-svn: 32840
2007-01-03 17:24:59 +00:00
Reid Spencer
741b64d1ca
Remove two useless bit casts.
...
llvm-svn: 32839
2007-01-03 17:24:11 +00:00
Anton Korobeynikov
2b39939053
Really big cleanup.
...
- New target type "mingw" was introduced
- Same things for both mingw & cygwin are marked as "cygming" (as in
gcc)
- .lcomm is supported here, so allow LLVM to use it
- Correctly use underscored versions of setjmp & _longjmp for both mingw
& cygwin
llvm-svn: 32833
2007-01-03 11:43:14 +00:00
Evan Cheng
bd6a333b52
Fix naming inconsistency.
...
llvm-svn: 32823
2007-01-02 21:33:40 +00:00
Reid Spencer
dda168599d
For PR950:
...
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
type of an function parameter was used to determine whether it should
be sign extended or zero extended before the call. This information is
now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
the parameter attribute information. Although it would have been
convenient to pass in the FunctionType itself, there isn't always one
present in the caller. Consequently, a signedness indication for the
result type and for each parameter was provided for in the interface
to this method. All implementations were changed to make the adjustment
necessary.
llvm-svn: 32788
2006-12-31 05:55:36 +00:00
Anton Korobeynikov
3a6faf0b96
Refactored JIT codegen for mingw32. Now we're using standart relocation
...
type for distinguish JIT & non-JIT instead of "dirty" hacks :)
llvm-svn: 32745
2006-12-22 22:29:05 +00:00
Chris Lattner
f04c00f475
add a note
...
llvm-svn: 32741
2006-12-22 01:03:22 +00:00
Anton Korobeynikov
df6487d069
Fixed 80 cols & style violation
...
llvm-svn: 32720
2006-12-20 20:40:30 +00:00
Anton Korobeynikov
76dbbd6e24
Fixed dllimported symbols support during JIT'ing. JIT on mingw32
...
platform should be more or less workable. At least, sim is running fine
under lli :)
llvm-svn: 32711
2006-12-20 01:03:20 +00:00
Chris Lattner
8896b6cb46
eliminate static ctors for Statistic objects.
...
llvm-svn: 32703
2006-12-19 22:59:26 +00:00
Evan Cheng
f5c9f4c3c9
Fix for PR1062 by Dan Gohman.
...
llvm-svn: 32688
2006-12-19 21:31:42 +00:00
Anton Korobeynikov
391dc74af0
Fix for PR1059: http://llvm.org/PR1059
...
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Chris Lattner
5e52d6c0da
The x86-64 target machine should be used for amd64-* target triples.
...
llvm-svn: 32678
2006-12-19 19:40:09 +00:00
Chris Lattner
26f8533c7f
Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
...
llvm-svn: 32676
2006-12-19 19:29:58 +00:00
Rafael Espindola
08c0825f18
move ExtWeakSymbols to AsmPrinter
...
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Evan Cheng
32c45fa21e
Some AT&T syntax assembler (e.g. Mac OS X) does not recognize the movq alias for i64 <-> XMM moves.
...
llvm-svn: 32609
2006-12-15 19:58:58 +00:00
Evan Cheng
c24bf8bd87
This is done.
...
llvm-svn: 32591
2006-12-15 05:50:39 +00:00
Evan Cheng
5effab79f3
f64 <-> i64 bit_convert using movq in 64-bit mode.
...
llvm-svn: 32587
2006-12-14 21:55:39 +00:00
Evan Cheng
4529b8cf2e
Fix a couple of typo's.
...
llvm-svn: 32585
2006-12-14 19:46:06 +00:00
Evan Cheng
6100c83f79
This is done.
...
llvm-svn: 32584
2006-12-14 19:45:32 +00:00
Evan Cheng
9918e7780a
Added MOVSS2DIrr and MOVDI2SSrr to foldMemeoryOperand().
...
llvm-svn: 32583
2006-12-14 19:44:45 +00:00
Evan Cheng
4dc2f8e9bb
- Rename MOVDSS2DIrr to MOVSS2DIrr for consistency sake.
...
- Add MOVDI2SSrm and MOVSS2DImr to fold load / store for i32 <-> f32 bit_convert
patterns.
llvm-svn: 32582
2006-12-14 19:43:11 +00:00
Evan Cheng
504fec49b1
Add note.
...
llvm-svn: 32561
2006-12-13 20:59:43 +00:00
Chris Lattner
8f2a26ac12
Update note, with the SROA change, we now produce:
...
_pairtest:
movl 8(%esp), %eax
movl 4(%esp), %ecx
movd %eax, %xmm0
movd %ecx, %xmm1
addss %xmm0, %xmm1
movl 12(%esp), %eax
movss %xmm1, (%eax)
ret
instead of:
_pairtest:
subl $12, %esp
movl 20(%esp), %eax
movl %eax, 4(%esp)
movl 16(%esp), %eax
movl %eax, (%esp)
movss (%esp), %xmm0
addss 4(%esp), %xmm0
movl 24(%esp), %eax
movss %xmm0, (%eax)
addl $12, %esp
ret
llvm-svn: 32427
2006-12-11 01:20:25 +00:00
Chris Lattner
a6428b2ce4
this is done
...
llvm-svn: 32424
2006-12-11 01:01:03 +00:00
Anton Korobeynikov
e76b69846d
Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
...
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.
llvm-svn: 32415
2006-12-10 23:12:42 +00:00
Rafael Espindola
8251abb0e9
fix test/Regression/CodeGen/X86/weak.ll
...
if a variable has no initialization, I->getInitializer() will fail
llvm-svn: 32407
2006-12-09 23:14:08 +00:00
Chris Lattner
51a6154ce5
Fix a bug introduced by the streams patch. DEBUG code was made unconditional.
...
llvm-svn: 32351
2006-12-08 05:41:26 +00:00
Bill Wendling
f13d78d3b8
What should be the last unnecessary <iostream>s in the library.
...
llvm-svn: 32333
2006-12-07 22:21:48 +00:00
Evan Cheng
f4788fe306
MI keeps a ptr of TargetInstrDescriptor, use it.
...
llvm-svn: 32296
2006-12-07 01:21:59 +00:00
Chris Lattner
06ba0b8202
add missing #include
...
llvm-svn: 32280
2006-12-06 18:14:47 +00:00
Chris Lattner
a531ce882e
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Evan Cheng
40a5de9cd9
Revert an unintended change.
...
llvm-svn: 32239
2006-12-05 22:03:40 +00:00
Evan Cheng
adeea85f7d
- Switch X86-64 JIT to large code size model.
...
- Re-enable some codegen niceties for X86-64 static relocation model codegen.
- Clean ups, etc.
llvm-svn: 32238
2006-12-05 19:50:18 +00:00
Chris Lattner
6a9de21df5
If we have ScalarSSE, we can select bitconvert into single instructions.
...
This compiles bitcast.ll:test3/test4 into:
_test3:
movd %xmm0, %eax
ret
_test4:
movd %edi, %xmm0
ret
llvm-svn: 32230
2006-12-05 18:45:06 +00:00
Chris Lattner
0edf53eb71
Add a perf optzn corresponding to PR1033.
...
llvm-svn: 32229
2006-12-05 18:25:10 +00:00
Chris Lattner
4ad68ab4d7
Fix PR1033 and CodeGen/X86/bitcast.ll, by expanding bitcast to a load/store pair.
...
This could be better, readme entry pending.
llvm-svn: 32228
2006-12-05 18:22:22 +00:00
Chris Lattner
7368984a3d
Fix typo noticed by Lauro Ramos Venancio, thanks!
...
llvm-svn: 32223
2006-12-05 17:29:40 +00:00
Evan Cheng
32c16b7d3a
JIT large code model support.
...
llvm-svn: 32220
2006-12-05 07:29:55 +00:00
Evan Cheng
2c48ef5aab
Asm printing bug.
...
llvm-svn: 32218
2006-12-05 06:43:58 +00:00
Evan Cheng
2c35691a02
- Fix X86-64 JIT by temporarily disabling code that treats GV address as 32-bit
...
immediate in small code model. The JIT cannot ensure GV's are placed in the
lower 4G.
- Some preliminary support for large code model.
llvm-svn: 32215
2006-12-05 04:01:03 +00:00
Evan Cheng
b16bf52453
Update
...
llvm-svn: 32214
2006-12-05 03:58:23 +00:00
Chris Lattner
0be88afd90
Add support for 64-bit 'r' constraint. Patch by by Rafael ~Avila de EspÃndol!
...
This fixes PR1029 and Regression/CodeGen/X86/x86-64-asm.ll
llvm-svn: 32206
2006-12-04 22:38:21 +00:00
Evan Cheng
11e73ffe93
Non-darwin gcc should default to static relocation to match gcc.
...
llvm-svn: 32184
2006-12-04 18:07:10 +00:00
Evan Cheng
bf13611e84
Match TargetInstrInfo changes.
...
llvm-svn: 32098
2006-12-01 21:52:58 +00:00
Evan Cheng
5c7e78886c
convertToThreeAddress() is now responsible for updating live info as well as inserting the new MI's.
...
llvm-svn: 32097
2006-12-01 21:52:41 +00:00
Evan Cheng
c5ad9caeff
Add weak reference directive.
...
llvm-svn: 32091
2006-12-01 20:47:11 +00:00
Evan Cheng
04e66b07dc
Fix 2005-05-08-FPStackifierPHI.ll failure.
...
llvm-svn: 32071
2006-12-01 10:11:51 +00:00
Evan Cheng
3cc87db480
A initialized global variable cannot be extern weak. However, if a global value's initializer is itself a external weak symbol, emit the weak reference.
...
llvm-svn: 32069
2006-12-01 09:13:26 +00:00
Evan Cheng
d326e5b35e
Minor code clean up.
...
llvm-svn: 32067
2006-12-01 07:38:23 +00:00
Evan Cheng
5b43e8613e
Fix indentation.
...
llvm-svn: 32066
2006-12-01 07:17:00 +00:00
Evan Cheng
1dfe5221c1
Darwin X86 external weak linkage support.
...
llvm-svn: 32065
2006-12-01 07:15:24 +00:00
Anton Korobeynikov
f627d28d9c
Introducing external weak linkage. Darwin codegen should be added later.
...
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Anton Korobeynikov
25535e6c64
Factor out GVRequiresExtraLoad() from .h to .cpp
...
llvm-svn: 32048
2006-11-30 22:42:55 +00:00
Evan Cheng
456101ebb9
- Use a different wrapper node for RIP-relative GV, etc.
...
- Proper support for both small static and PIC modes under X86-64
- Some (non-optimal) support for medium modes.
llvm-svn: 32046
2006-11-30 21:55:46 +00:00
Evan Cheng
d8be97599a
MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
...
llvm-svn: 32034
2006-11-30 07:12:03 +00:00
Evan Cheng
f64e341522
In PIC mode, GV not requiring an extra load can be used as address immediate.
...
llvm-svn: 32028
2006-11-29 23:48:14 +00:00
Evan Cheng
1e3f41acde
Clean up.
...
llvm-svn: 32027
2006-11-29 23:46:27 +00:00
Evan Cheng
7e20347607
Fix for PR1018 - Better support for X86-64 Linux in small code model.
...
llvm-svn: 32026
2006-11-29 23:19:46 +00:00
Evan Cheng
f968824cdb
Custom lower READCYCLECOUNTER for x86-64.
...
llvm-svn: 32017
2006-11-29 08:28:13 +00:00
Evan Cheng
52f30d0ff2
16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.
...
llvm-svn: 32004
2006-11-29 02:00:40 +00:00
Chris Lattner
4e07e4aa24
Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
...
xchgl %eax, %edx) to llvm.bswap.i64. This compiles:
long long test2(long long A) {
return _OSSwapInt64(A);
}
to:
_test2:
movl 8(%esp), %eax
movl 4(%esp), %edx
bswapl %eax
bswapl %edx
ret
instead of:
_test2:
movl 8(%esp), %edx
movl 4(%esp), %eax
bswap %eax
bswap %edx
xchgl %eax, %edx
ret
GCC manages (with -fomit-frame-pointer) the uglier:
_test2:
subl $4, %esp
movl 8(%esp), %eax
movl 12(%esp), %edx
bswap %eax
bswap %edx
xchgl %eax, %edx
addl $4, %esp
ret
llvm-svn: 32001
2006-11-29 01:48:01 +00:00
Chris Lattner
50d2db3b77
Trivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
...
JIT on darwin/x86, which has htonl implemented as inline asm.
llvm-svn: 31999
2006-11-29 01:14:06 +00:00
Andrew Lenharth
aee28a6544
Identities are default now
...
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Evan Cheng
27408161df
New entries.
...
llvm-svn: 31976
2006-11-28 19:59:25 +00:00
Andrew Lenharth
c0ee1250ad
X86 asm -> gcc asm translation table (incomplete)
...
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Evan Cheng
62d19fbf98
Fix JIT encoding bugs for shift / rotate by one ops.
...
llvm-svn: 31952
2006-11-28 01:28:00 +00:00
Evan Cheng
98fa7ab4d7
Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead
...
of opcode and number of operands.
llvm-svn: 31947
2006-11-27 23:37:22 +00:00
Anton Korobeynikov
ddb73b4f1e
Refactored *GVRequiresExtraLoad() to Subtarget method.
...
llvm-svn: 31887
2006-11-21 00:01:06 +00:00
Chris Lattner
86e39c84b6
Fix codegen for x86-64 on systems (like ppc or i386) that don't have 64-bit
...
features autodetected. This fixes PR1010 and Regression/CodeGen/X86/xmm-r64.ll
on non-x86-64 hosts.
llvm-svn: 31879
2006-11-20 18:16:05 +00:00
Anton Korobeynikov
2449b29bdd
We should perform extra load for dllimported calls
...
llvm-svn: 31874
2006-11-20 10:46:14 +00:00
Evan Cheng
a9176b38f9
For unsigned 8-bit division. Use movzbw to set the lower 8 bits of AX while
...
clearing the upper 8-bits instead of issuing two instructions. This also
eliminates the need to target the AH register which can be problematic on
x86-64.
llvm-svn: 31832
2006-11-17 22:10:14 +00:00
Jim Laskey
bc27bd0c6e
Hopefully a good crack at making debugging work on intel -disable-fp-elim.
...
llvm-svn: 31830
2006-11-17 21:19:15 +00:00
Bill Wendling
b6061e32fa
Removed even more std::cerr and #include <iostream> things.
...
llvm-svn: 31813
2006-11-17 07:52:03 +00:00
Evan Cheng
fc1b3d8bc8
Correct instructions for moving data between GR64 and SSE registers; also correct load i64 / store i64 from v2i64.
...
llvm-svn: 31795
2006-11-16 23:33:25 +00:00
Evan Cheng
a838021d2c
Fix a potential bug: MOVPDI2DI, etc. are not copy instructions.
...
llvm-svn: 31794
2006-11-16 23:22:26 +00:00
Evan Cheng
c653e70b2d
Align stubs on 4 byte boundary. This fixes 447.dealII.
...
llvm-svn: 31790
2006-11-16 20:13:34 +00:00
Evan Cheng
2a92afa25d
Properly transfer kill / dead info.
...
llvm-svn: 31765
2006-11-15 20:58:11 +00:00
Evan Cheng
1b3bde1c1b
Kill / dead info has been moved to MI's.
...
llvm-svn: 31764
2006-11-15 20:56:39 +00:00
Chris Lattner
1453db28c3
Remove unneeded forward decls
...
llvm-svn: 31754
2006-11-15 17:53:13 +00:00
Evan Cheng
7c9b3c7ea3
Revert. This wasn't meant to be checked in.
...
llvm-svn: 31737
2006-11-14 19:20:33 +00:00
Chris Lattner
da103686a6
it would be nice of ctlz were lowered to bsf etc.
...
llvm-svn: 31730
2006-11-14 08:08:46 +00:00
Evan Cheng
0e82270ff2
Matches MachineInstr changes.
...
llvm-svn: 31712
2006-11-13 23:36:35 +00:00
Evan Cheng
b9e2ae9e37
Add implicit use / def operands to created MI's.
...
llvm-svn: 31676
2006-11-11 10:21:44 +00:00
Evan Cheng
f880ed86ff
Add all implicit defs to FP_REG_KILL mi.
...
llvm-svn: 31674
2006-11-11 07:19:36 +00:00
Evan Cheng
922c8f63b0
Add a note.
...
llvm-svn: 31650
2006-11-10 22:09:17 +00:00
Evan Cheng
8c372dc9b3
These are done.
...
llvm-svn: 31649
2006-11-10 22:03:35 +00:00
Evan Cheng
ae1f3758bd
Don't dag combine floating point select to max and min intrinsics. Those
...
take v4f32 / v2f64 operands and may end up causing larger spills / restores.
Added X86 specific nodes X86ISD::FMAX, X86ISD::FMIN instead.
This fixes PR996.
llvm-svn: 31645
2006-11-10 21:43:37 +00:00
Evan Cheng
3a017e8abd
Fix a bug in SelectScalarSSELoad. Since the load is wrapped in a
...
SCALAR_TO_VECTOR, even if the hasOneUse() check pass we may end up folding
the load into two instructions. Make sure we check the SCALAR_TO_VECTOR
has only one use as well.
llvm-svn: 31641
2006-11-10 21:23:04 +00:00
Evan Cheng
de7ff3fa3d
Fix a potential bug.
...
llvm-svn: 31634
2006-11-10 09:13:37 +00:00
Evan Cheng
013597778d
Add implicit def / use operands to MachineInstr.
...
llvm-svn: 31633
2006-11-10 08:43:01 +00:00
Evan Cheng
6f0095807e
Use TargetInstrInfo::getNumOperands() instead of MachineInstr::getNumOperands(). In preparation for implicit reg def/use changes.
...
llvm-svn: 31616
2006-11-10 01:28:43 +00:00
Anton Korobeynikov
23ffdb1971
Fixing PR990: http://llvm.org/PR990 .
...
This should unbreak csretcc on Linux & mingw targets. Several tests from
llvm-test should be also restored (fftbench, bigfib).
llvm-svn: 31613
2006-11-10 00:48:11 +00:00
Evan Cheng
8743c67826
Remove M_2_ADDR_FLAG.
...
llvm-svn: 31583
2006-11-09 02:22:54 +00:00
Evan Cheng
2edeb17aed
Use movl+xchgl instead of pushl+popl.
...
llvm-svn: 31572
2006-11-08 20:35:37 +00:00
Evan Cheng
736a8eb3cd
Match tblegen changes.
...
llvm-svn: 31571
2006-11-08 20:34:28 +00:00
Evan Cheng
7ca1f47a96
Fixed a bug which causes x86 be to incorrectly match
...
shuffle v, undef, <2, ?, 3, ?>
to movhlps
It should match to unpckhps instead.
Added proper matching code for
shuffle v, undef, <2, 3, 2, 3>
llvm-svn: 31519
2006-11-07 22:14:24 +00:00
Jeff Cohen
e1003da1a2
Unbreak VC++ build.
...
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Chris Lattner
7c265ad682
remove dead/redundant vars
...
llvm-svn: 31435
2006-11-03 23:48:56 +00:00
Evan Cheng
54c4be233e
Dead code.
...
llvm-svn: 31405
2006-11-03 02:08:41 +00:00
Chris Lattner
24e8fdc1f6
silence warning
...
llvm-svn: 31393
2006-11-03 01:13:15 +00:00
Reid Spencer
4bafa71dc1
For PR786:
...
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Evan Cheng
790d5c7697
Fix ldmxcsr JIT encoding.
...
llvm-svn: 31343
2006-11-01 06:53:52 +00:00
Evan Cheng
cabfd99a79
Nuke dead code.
...
llvm-svn: 31327
2006-10-31 21:53:31 +00:00
Chris Lattner
def30d3eda
allow the address of a global to be used with the "i" constraint when in
...
-static mode. This implements PR882.
llvm-svn: 31326
2006-10-31 20:13:11 +00:00
Chris Lattner
0571c323bf
implement the 'c' inline asm modifier character
...
llvm-svn: 31325
2006-10-31 20:12:30 +00:00
Chris Lattner
3bed109ed9
handle "st" as "st(0)"
...
llvm-svn: 31320
2006-10-31 19:42:44 +00:00
Anton Korobeynikov
e6ba8a819c
1. Clean up code due to changes in SwitchTo*Section(2)
...
2. Added partial debug support for mingw\cygwin targets (the same as
Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
for storing debug info by default, thus many (runtime) libraries has
this information included. These formats shouldn't be mixed in one binary
('stabs' & 'DWARF'), otherwise binutils tools will be confused.
llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Anton Korobeynikov
9867bf5eaf
Unbreaking static ctors patch.
...
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.
llvm-svn: 31306
2006-10-31 06:11:06 +00:00
Reid Spencer
0b5a938e79
Make this compile again.
...
llvm-svn: 31304
2006-10-31 01:45:56 +00:00
Evan Cheng
a8168f310e
Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.
...
llvm-svn: 31303
2006-10-31 01:26:55 +00:00
Reid Spencer
db06ed9156
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
...
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.
llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Chris Lattner
ac9ed02670
fix wonky indentation
...
llvm-svn: 31298
2006-10-30 22:27:23 +00:00
Evan Cheng
5766dd6455
All targets expand BR_JT for now.
...
llvm-svn: 31294
2006-10-30 08:02:39 +00:00
Chris Lattner
dcfee77788
add another target hook for branch folding.
...
llvm-svn: 31262
2006-10-28 17:29:57 +00:00
Evan Cheng
45b6e99308
Doh. Must check if GV is constant first.
...
llvm-svn: 31252
2006-10-28 05:56:06 +00:00
Chris Lattner
b57c880eb0
don't distribute internal readme's
...
llvm-svn: 31245
2006-10-28 00:48:27 +00:00
Reid Spencer
6719e92a1a
Make sure all the readme files get distributed.
...
llvm-svn: 31244
2006-10-28 00:11:39 +00:00
Evan Cheng
090e9abaee
Fixed a significant bug where unpcklpd is incorrectly used to extract element 1 from a v2f64 value.
...
llvm-svn: 31228
2006-10-27 21:08:32 +00:00
Evan Cheng
a1ce4523e5
Fix for PR968: expand vector sdiv, udiv, srem, urem.
...
llvm-svn: 31220
2006-10-27 18:49:08 +00:00
Evan Cheng
3144b839f0
Put cstrings in .cstring section when compiling for Mac OS X.
...
llvm-svn: 31203
2006-10-26 19:18:18 +00:00
Evan Cheng
1abe8bd233
During vector shuffle lowering, we sometimes commute a vector shuffle to try
...
to match MOVL (movss, movsd, etc.). Don't forget to commute it back and try
unpck* and shufp* if that doesn't pan out.
llvm-svn: 31186
2006-10-25 21:49:50 +00:00
Evan Cheng
034305a2e8
X86ISD::PEXTRW 3rd operand type is always target pointer type.
...
llvm-svn: 31185
2006-10-25 21:35:05 +00:00
Evan Cheng
01529405c9
Remove -disable-x86-shuffle-opti
...
llvm-svn: 31183
2006-10-25 20:48:19 +00:00
Devang Patel
0691019e12
Move getPreferredAlignmentLog from AsmPrinter to TargetData
...
llvm-svn: 31171
2006-10-24 20:32:14 +00:00
Chris Lattner
3826e15c8d
this part implemented.
...
llvm-svn: 31122
2006-10-22 21:40:12 +00:00
Anton Korobeynikov
da7897a6c8
Do section switching right way for Mingw\Cygwin and Linux.
...
This will allow (after llvm-gcc linkage fix) more dummy tests using
libstdc++ to pass on mingw :)
llvm-svn: 31120
2006-10-22 21:37:13 +00:00
Chris Lattner
016325f336
Implement support for branch condition reversal.
...
llvm-svn: 31099
2006-10-21 05:52:40 +00:00
Chris Lattner
20bb8bfd45
Simplify code, no functionality change
...
llvm-svn: 31097
2006-10-21 05:42:09 +00:00
Chris Lattner
b638d287f4
allow insertion of a conditional branch with fall-through
...
llvm-svn: 31095
2006-10-21 05:34:23 +00:00
Chris Lattner
596c126372
update assert message
...
llvm-svn: 31093
2006-10-21 04:42:29 +00:00
Chris Lattner
3fb2b87f17
bugfix
...
llvm-svn: 31074
2006-10-20 20:44:34 +00:00
Chris Lattner
62a0f00312
Implement branch analysis/xform hooks required by the branch folding pass.
...
llvm-svn: 31065
2006-10-20 17:42:20 +00:00
Reid Spencer
d414793dbc
For PR950:
...
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Chris Lattner
a86fff7583
fit in 80 cols
...
llvm-svn: 31039
2006-10-18 18:26:48 +00:00
Chris Lattner
fa22dc8afe
add a note
...
llvm-svn: 31038
2006-10-18 17:04:09 +00:00
Anton Korobeynikov
d1436ae792
Fixed mingw\cygwin linkonce linkage once again.
...
Added workaround for linker bug with linkonce sections.
Changed sections prefix to allow linker merge them
(PE loader doesn't like too much long-named sections :) )
All of this unbreaks libstdc++ on mingw32 allowing (small)
programs to be compiled, linked and run.
llvm-svn: 31033
2006-10-18 09:12:29 +00:00
Chris Lattner
7353b07275
expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
...
llvm-svn: 31024
2006-10-17 22:41:45 +00:00
Anton Korobeynikov
c86485a397
Adding linkonce linkage codegeneration support for mingw32\cygwin
...
targets.
llvm-svn: 31011
2006-10-17 20:29:49 +00:00
Evan Cheng
bf3e5a1d7a
Proper fix.
...
llvm-svn: 30993
2006-10-17 00:24:49 +00:00
Evan Cheng
36ab7976a0
One more try.
...
llvm-svn: 30992
2006-10-16 23:44:08 +00:00
Evan Cheng
1cf362ec18
Unbreak x86-64 build.
...
llvm-svn: 30990
2006-10-16 22:53:28 +00:00
Evan Cheng
04bec886a9
Added a X86CompilationCallback variant which saves XMM argument registers for targets with SSE.
...
llvm-svn: 30986
2006-10-16 21:01:55 +00:00
Evan Cheng
b4d8323e54
Proper fix for rdar://problem/4770604 Thanks to Stuart Hastings!
...
llvm-svn: 30985
2006-10-16 21:00:37 +00:00
Evan Cheng
ca5eaf4020
Avoid getting into an infinite loop when -disable-x86-shuffle-opti is specified.
...
llvm-svn: 30974
2006-10-16 06:36:00 +00:00
Evan Cheng
c73547a71d
SelectScalarSSELoad should call CanBeFoldedBy as well.
...
llvm-svn: 30973
2006-10-16 06:34:55 +00:00
Anton Korobeynikov
61d88967b9
Align stack size to DWORD boundary
...
llvm-svn: 30964
2006-10-14 20:53:35 +00:00
Evan Cheng
6c8de88f88
Corrected load folding check. We need to start from the root of the sub-dag
...
being matched and ensure there isn't a non-direct path to the load (i.e. a
path that goes out of the sub-dag.)
llvm-svn: 30958
2006-10-14 08:33:25 +00:00
Evan Cheng
fe5bb5dbe6
Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
...
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Chris Lattner
bea7a9de50
remove some dead code
...
llvm-svn: 30938
2006-10-13 20:40:42 +00:00
Chris Lattner
9777da8fb7
add a note
...
llvm-svn: 30921
2006-10-12 22:01:26 +00:00
Evan Cheng
76d365ac84
Doh. This wasn't causing problems by luck.
...
llvm-svn: 30914
2006-10-12 19:13:59 +00:00
Evan Cheng
d07e2f081a
Some X86ISD::CMP were created with wrong ValueType's.
...
llvm-svn: 30913
2006-10-12 19:12:56 +00:00
Chris Lattner
b25677f5ca
Move the Imp tblgen class from the X86 backend to common code.
...
llvm-svn: 30907
2006-10-12 17:49:27 +00:00
Chris Lattner
a678c5bac1
Mark ADJCALLSTACKUP/DOWN as clobbering ESP so that virtregmap will notice
...
that it can't assume ESP is unmodified across the instrs.
llvm-svn: 30905
2006-10-12 17:42:56 +00:00
Chris Lattner
fde6859201
fix compilation failure of smg2000
...
llvm-svn: 30900
2006-10-12 03:55:48 +00:00
Chris Lattner
502246c4a6
Fold "zero extending vector loads" now that evan added the chain manip stuff.
...
This compiles both tests in X86/vec_ss_load_fold.ll into:
_test1:
movss 4(%esp), %xmm0
subss LCPI1_0, %xmm0
mulss LCPI1_1, %xmm0
minss LCPI1_2, %xmm0
xorps %xmm1, %xmm1
maxss %xmm1, %xmm0
cvttss2si %xmm0, %eax
andl $65535, %eax
ret
instead of:
_test1:
movss LCPI1_0, %xmm0
movss 4(%esp), %xmm1
subss %xmm0, %xmm1
movss LCPI1_1, %xmm0
mulss %xmm0, %xmm1
movss LCPI1_2, %xmm0
minss %xmm0, %xmm1
xorps %xmm0, %xmm0
maxss %xmm0, %xmm1
cvttss2si %xmm1, %eax
andl $65535, %eax
ret
llvm-svn: 30894
2006-10-11 22:09:58 +00:00
Evan Cheng
95140c9c64
ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
...
llvm-svn: 30892
2006-10-11 21:06:01 +00:00
Evan Cheng
ca66f49574
Add properties to ComplexPattern.
...
llvm-svn: 30891
2006-10-11 21:03:53 +00:00
Evan Cheng
b2998e15f2
More isel time load folding checking for nodes that produce flag values.
...
See comment in CanBeFoldedBy() for detailed explanation.
llvm-svn: 30851
2006-10-10 01:46:56 +00:00
Evan Cheng
d1a37cb9dc
Don't go too crazy with these AddComplexity. Try matching shufps with load
...
folding first.
llvm-svn: 30848
2006-10-09 21:42:15 +00:00
Evan Cheng
8f6c6b19e6
Don't convert to MOVLP if using shufps etc. may allow load folding.
...
llvm-svn: 30847
2006-10-09 21:39:25 +00:00
Evan Cheng
d22f3dd3ed
Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
...
llvm-svn: 30844
2006-10-09 20:57:25 +00:00
Chris Lattner
3cd1d08ac6
completely disable folding of loads into scalar sse instructions and provide
...
a framework for doing it right. This fixes
CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll.
Once X86DAGToDAGISel::SelectScalarSSELoad is implemented right, this task
will be done.
llvm-svn: 30817
2006-10-07 21:55:32 +00:00
Chris Lattner
a51aea84b8
convert packed FP add/sub/mul/div to use a multiclass.
...
llvm-svn: 30815
2006-10-07 21:17:13 +00:00
Chris Lattner
da75127cea
one multiclass now defines all 8 variants of binary-scalar-sse-fp operations.
...
llvm-svn: 30814
2006-10-07 20:55:57 +00:00
Chris Lattner
8ce6993f53
Switch ADD/MUL/DIV/SUB scalarsse fp ops to a multiclass
...
llvm-svn: 30813
2006-10-07 20:35:44 +00:00
Chris Lattner
ec39f5bcd5
Random acts of shrinkage
...
llvm-svn: 30812
2006-10-07 19:49:05 +00:00
Chris Lattner
8e3aa16298
Convert pand/por/pxor to use multiclass
...
llvm-svn: 30811
2006-10-07 19:37:30 +00:00
Chris Lattner
33aecdebfc
Convert some more instructions over to use a new multiclass.
...
Fix a bug where the asmstring for PSUBQrm was wrong.
llvm-svn: 30810
2006-10-07 19:34:33 +00:00