Reid Spencer
807b56d92b
For PR950: For ICmp and FCmp constant expressions, put the predicate outiside the parentheses to match what llvm-upgrade generates.
...
llvm-svn: 32171
2006-12-04 05:20:06 +00:00
Reid Spencer
e6770851c0
For PR950: Fix constant expressions to properly support ICmp and FCmp type expressions.
...
llvm-svn: 32170
2006-12-04 05:19:50 +00:00
Reid Spencer
2580dd751f
For PR950: Implement a stub for folding ICmp and FCmp instructions
...
llvm-svn: 32169
2006-12-04 05:19:34 +00:00
Reid Spencer
ca27d66971
For PR950: Implement ICmp/FCmp predicate printing for constant expressions
...
llvm-svn: 32168
2006-12-04 05:19:18 +00:00
Reid Spencer
d727d239f8
Update call to CastInst::getCastOpcode for its new signature.
...
llvm-svn: 32166
2006-12-04 02:48:01 +00:00
Reid Spencer
0668975146
Change inferred casts to explicit casts.
...
llvm-svn: 32165
2006-12-04 02:46:44 +00:00
Reid Spencer
4cb4234c17
Take a baby step towards getting rid of inferred casts. Provide methods on
...
CastInst and ConstantExpr that allow the signedness to be explicitly passed
in and reliance on signedness removed from getCastOpcode. These are
temporary measures useful during the conversion of inferred casts.
llvm-svn: 32164
2006-12-04 02:43:42 +00:00
Reid Spencer
41583e85cb
Support ICmp/FCmp constant expression reading and writing.
...
llvm-svn: 32160
2006-12-03 17:17:02 +00:00
Reid Spencer
470e894f5c
Remove dead code.
...
llvm-svn: 32157
2006-12-03 16:21:33 +00:00
Reid Spencer
2d9ef9ff2d
Regenerate.
...
llvm-svn: 32156
2006-12-03 16:20:14 +00:00
Reid Spencer
178ca8ccb7
Remove useless #include.
...
llvm-svn: 32155
2006-12-03 16:19:43 +00:00
Reid Spencer
45af0be5e4
Regenerate.
...
llvm-svn: 32152
2006-12-03 06:59:29 +00:00
Reid Spencer
1f0ce9daae
Shorten the FCmp and ICmp mnemonics to 3 letters. Make the parser
...
disambiguate them.
llvm-svn: 32151
2006-12-03 06:58:07 +00:00
Reid Spencer
f78fe29ca8
Shorten the FCmp predicate mnemonics.
...
llvm-svn: 32150
2006-12-03 06:35:48 +00:00
Reid Spencer
7a449dd20b
Implement reading and writing of the ICmp and FCmp instructions.
...
llvm-svn: 32149
2006-12-03 06:28:54 +00:00
Reid Spencer
904e41f87e
Allow the ICmp and FCmp instructions to be written by the AsmWriter
...
llvm-svn: 32148
2006-12-03 06:27:29 +00:00
Reid Spencer
a468638458
Implement creation of ICmp and FCmp constant expressions.
...
llvm-svn: 32147
2006-12-03 05:48:19 +00:00
Reid Spencer
5f687b7190
Remove backwards compatibility goop. This is now handled by llvm-upgrade.
...
llvm-svn: 32146
2006-12-03 05:47:10 +00:00
Reid Spencer
c7ef78e5be
Regenerate.
...
llvm-svn: 32145
2006-12-03 05:46:11 +00:00
Reid Spencer
e7083039e5
Remove backwards compatibility goop. Now implemented in llvm-upgrade.
...
llvm-svn: 32144
2006-12-03 05:45:44 +00:00
Jeff Cohen
f99052befb
Unbreak VC++ build.
...
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Chris Lattner
1629b0d995
disable transformations that are invalid for fp vectors. This fixes
...
Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll
llvm-svn: 32112
2006-12-02 00:13:08 +00:00
Chris Lattner
7a39941897
Switch analysis groups to be unregistered when llvm_shutdown is called.
...
llvm-svn: 32110
2006-12-01 23:46:50 +00:00
Chris Lattner
1b0e89e022
Start moving pass registration over to using the ManagedStatic mechanism.
...
This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler. Analysis groups up next.
llvm-svn: 32108
2006-12-01 23:27:45 +00:00
Chris Lattner
a2bd5d4aaa
move 'cfgonly' pass tracking into PassInfo, instead of handling it with
...
yet-another global data structure.
llvm-svn: 32102
2006-12-01 22:21:11 +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
Chris Lattner
64b24381a8
These should be rewritten to fold without using the 'Rules' mechanism, but
...
until this happens at least make sext from bool and sitofp from bool do the
right thing.
llvm-svn: 32087
2006-12-01 19:50:54 +00:00
Chris Lattner
7e0d6868fd
this logic is broken for trunc to bool, replace the folding logic for trunc
...
completely, as it is trivial. We should probably do this for the rest of the
cast operations. This fixes ConstProp/2006-12-01-TruncBoolBug.ll.
llvm-svn: 32081
2006-12-01 19:22:41 +00:00
Chris Lattner
497c976859
add a new ConstantIntegral::get method. Simplify the implementation of
...
ConstantInt::get
llvm-svn: 32080
2006-12-01 19:20:02 +00:00
Evan Cheng
1d611158eb
Copy and paste error. An initialized global cannot be a weak reference.
...
llvm-svn: 32075
2006-12-01 17:39:22 +00:00
Jim Laskey
8f43fbf759
1. In ppc64 mode we need only use one GPR.
...
2. Float values need to be promoted to double when they are vararg.
llvm-svn: 32074
2006-12-01 16:30:47 +00:00
Jim Laskey
a8db40105b
ExternalWeak case in wrong location.
...
llvm-svn: 32073
2006-12-01 14:37:39 +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
6f5f81722b
Darwin PPC external weak linkage support.
...
llvm-svn: 32068
2006-12-01 07:56:37 +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
Chris Lattner
c65612e859
Fix a typo introduced by the cast patch that horribly broke a lot of vector
...
code. Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll
llvm-svn: 32062
2006-12-01 05:55:25 +00:00
Reid Spencer
a1613b631b
Don't fold "ptrtoint GV to bool" since this should be doing a truncate not
...
a comparison against zero. Instead fold setne(GV,null) and seteq(GV,null)
to ConstantBool::True or ConstantBool::False, respectively.
llvm-svn: 32060
2006-12-01 03:56:30 +00:00
Chris Lattner
860908f98c
Fix the CodeGen/PowerPC/vec_constants.ll regression.
...
llvm-svn: 32057
2006-12-01 01:45:39 +00:00
Reid Spencer
f13a49f6aa
Regenerate.
...
llvm-svn: 32053
2006-12-01 00:33:46 +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
Reid Spencer
529fb41272
Remove 4 FIXMEs to hack around cast-to-bool problems which no longer exist.
...
llvm-svn: 32051
2006-11-30 23:13:36 +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
Jim Laskey
32137fffa5
better check for version
...
llvm-svn: 32045
2006-11-30 18:29:23 +00:00
Chris Lattner
f3806f1c16
make it clear that this is always a zext
...
llvm-svn: 32044
2006-11-30 17:35:08 +00:00
Chris Lattner
affa9441cd
One more bugfix, 3 cases of making casts explicit.
...
llvm-svn: 32043
2006-11-30 17:32:29 +00:00
Chris Lattner
0b4753a96c
Fix a bug in globalopt due to the recent cast patch.
...
llvm-svn: 32042
2006-11-30 17:26:08 +00:00
Jim Laskey
0369cab61e
Change global descriptor names to provide name, full name and linkage name.
...
llvm-svn: 32036
2006-11-30 14:35:45 +00:00
Jim Laskey
831e2376f2
Temp fix to deal gdb issue.
...
llvm-svn: 32035
2006-11-30 11:09:42 +00:00
Evan Cheng
d8be97599a
MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
...
llvm-svn: 32034
2006-11-30 07:12:03 +00:00
Evan Cheng
08e6984667
Remove the ugly SPARCV9 TargetInstrDescriptors hack.
...
llvm-svn: 32033
2006-11-30 07:10:43 +00:00
Evan Cheng
cb65ba1821
- MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
...
- Remove the ugly TargetInstrDescriptors hack.
llvm-svn: 32032
2006-11-30 07:08:44 +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
Chris Lattner
3219b522c8
Fix bug codegen'ing FP constant vectors with integer splats. Make sure the
...
created intrinsics have the right integer types. This fixes
PowerPC/2006-11-29-AltivecFPSplat.ll
llvm-svn: 32024
2006-11-29 19:58:49 +00:00
Evan Cheng
c9710a3e29
Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
...
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Jim Laskey
d7db5b4a9c
Eliminate unnecessary scopes.
...
llvm-svn: 32020
2006-11-29 16:55:57 +00:00
Jim Laskey
00bcb51943
Offset for load of 32-bit arg in 64-bit world was incorrect.
...
llvm-svn: 32019
2006-11-29 13:37:09 +00:00
Evan Cheng
f968824cdb
Custom lower READCYCLECOUNTER for x86-64.
...
llvm-svn: 32017
2006-11-29 08:28:13 +00:00
Evan Cheng
2acb6345d8
Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
...
llvm-svn: 32016
2006-11-29 08:26:18 +00:00
Chris Lattner
e72dff706e
done
...
llvm-svn: 32013
2006-11-29 07:21:46 +00:00
Chris Lattner
2fd5719f50
implement cast.ll:test35. With this, we recognize:
...
unsigned short swp(unsigned short a) {
return ((a & 0xff00) >> 8 | (a & 0x00ff) << 8);
}
as an idiom for bswap.
llvm-svn: 32011
2006-11-29 07:18:39 +00:00
Chris Lattner
03fdea2e74
Teach instcombine to turn trunc(srl x, c) -> srl (trunc(x), c) when safe.
...
This implements InstCombine/cast.ll:test34. It fires hundreds of times on
176.gcc.
llvm-svn: 32009
2006-11-29 07:04:07 +00:00
Chris Lattner
0409f2c48d
Implement Regression/Transforms/InstCombine/bswap-fold.ll,
...
folding seteq (bswap(x)), c -> seteq(x,bswap(c))
llvm-svn: 32006
2006-11-29 05:02:16 +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
Evan Cheng
0be56fab68
Fix for PR1023 by Dan Gohman.
...
llvm-svn: 32003
2006-11-29 01:58:12 +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
Evan Cheng
f38588a1cd
Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
...
llvm-svn: 32000
2006-11-29 01:38:07 +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
Bill Wendling
a5c00d4c4f
WTF? These weird newlines got in there...
...
llvm-svn: 31998
2006-11-29 01:14:00 +00:00
Chris Lattner
d00734a230
add a hook to allow targets to hack on inline asms to lower them to llvm
...
when they want to.
llvm-svn: 31997
2006-11-29 01:12:32 +00:00
Reid Spencer
a866877d2f
Join a split line.
...
llvm-svn: 31996
2006-11-29 01:11:01 +00:00
Bill Wendling
a29e6c5ec9
Converted to using llvm streams instead of <iostream>s
...
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
4effa38086
Replacing std::iostreams with llvm iostreams. Some of these changes involve
...
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.
llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Bill Wendling
2477c0ac3d
Convert to using llvm streams instead of iostreams.
...
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Andrew Lenharth
e46a408fb9
gcc doesn't like an empty colbber list
...
llvm-svn: 31987
2006-11-28 23:07:32 +00:00
Bill Wendling
c942df4921
Use ostream instead of iostream
...
llvm-svn: 31986
2006-11-28 22:49:32 +00:00
Bill Wendling
d8c0883f20
Use llvm streams instead of <iostream>
...
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
35041c7c45
Removed #include <iostream> and used llvm streams
...
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Bill Wendling
040a60d22d
Removed some of the iostream #includes. Moved towards converting to using
...
llvm streams
llvm-svn: 31983
2006-11-28 22:46:12 +00:00
Chris Lattner
339c732e0b
Add a helper function
...
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Andrew Lenharth
aee28a6544
Identities are default now
...
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Andrew Lenharth
a32f3e30b3
Make identity default, and fix PR1020
...
llvm-svn: 31979
2006-11-28 22:25:32 +00:00
Reid Spencer
c48fe0fd4d
Undo the last patch until 253.perlbmk passes with these changes.
...
llvm-svn: 31977
2006-11-28 20:23:51 +00:00
Evan Cheng
27408161df
New entries.
...
llvm-svn: 31976
2006-11-28 19:59:25 +00:00
Andrew Lenharth
7669b3acc5
update comments
...
llvm-svn: 31975
2006-11-28 19:56:02 +00:00
Andrew Lenharth
d93af28924
Get the asminfo for the target most closely matching the module and use that for inline asm
...
llvm-svn: 31974
2006-11-28 19:53:36 +00:00
Andrew Lenharth
c0ee1250ad
X86 asm -> gcc asm translation table (incomplete)
...
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Andrew Lenharth
c51f451af5
Add per-target support for asm translation in the cbe
...
llvm-svn: 31972
2006-11-28 19:52:20 +00:00
Jim Laskey
7b0a74da3c
Remove debug code.
...
llvm-svn: 31970
2006-11-28 18:27:02 +00:00
Jim Laskey
737f53b6aa
Prime text sections to improve branch locality in large object files.
...
llvm-svn: 31969
2006-11-28 18:21:52 +00:00
Jim Laskey
a5c5ceb212
32-bit int space was not accounted for properly in lowerCall.
...
llvm-svn: 31966
2006-11-28 14:53:52 +00:00
Reid Spencer
2e6a2775db
Regenerate.
...
llvm-svn: 31965
2006-11-28 07:29:44 +00:00
Reid Spencer
05a440d447
Implement signedness caching for values, value lists, constants and
...
constant lists. This is just an internal change to the parser in
preparation for some backwards compatibility code that is to follow.
This will allow things like "uint 4000000000" to retain the unsignedness
of the integer constant as the value moves through the parser. In the
future, all integer types will be signless but parsing "uint" and friends
will be retained for backwards compatibility.
llvm-svn: 31964
2006-11-28 07:28:14 +00:00
Reid Spencer
8587322e79
Remove 4 FIXME's from the CAST patch now that the back end is correctly
...
producing code for "trunc to bool". This passes all tests on Linux.
llvm-svn: 31963
2006-11-28 07:23:01 +00:00
Bill Wendling
a80e3dc0c0
Put the #include for a module first.
...
llvm-svn: 31958
2006-11-28 03:31:29 +00:00
Evan Cheng
e176869ec0
Clean up.
...
llvm-svn: 31957
2006-11-28 02:25:34 +00:00
Bill Wendling
aa02717a76
Changed to using LLVM streams.
...
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Bill Wendling
7e9cea955c
Changed to using llvm streams.
...
llvm-svn: 31954
2006-11-28 02:08:17 +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
Chris Lattner
37a3db4c3f
Fix PR1016
...
llvm-svn: 31950
2006-11-28 01:03:30 +00:00
Bill Wendling
dc4b499ace
Removed #include <iostream> and replaced streams with llvm streams.
...
llvm-svn: 31949
2006-11-27 23:54:50 +00:00
Andrew Lenharth
f284b201e7
Preliminary support for inline asm in the cbe. The target specific ugliness
...
is still in Writer, but issolated to a single function. This might be split
into something in each target directory. This is sufficient to get through
archie and an strcpy impl on linux-x86.
Module level asm is not handled.
llvm-svn: 31948
2006-11-27 23:50:49 +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
Chris Lattner
71a7a2d781
Fix the dag combiner bug corresponding to PR1014.
...
llvm-svn: 31943
2006-11-27 21:50:02 +00:00
Chris Lattner
b391cbb939
Fix PR1014 and InstCombine/2006-11-27-XorBug.ll.
...
llvm-svn: 31941
2006-11-27 19:55:07 +00:00
Reid Spencer
6010c0ef4a
When truncating to bool, it is necessary to & with 1 for all casts that
...
can result in a bool. Previously PtrToInt, FPToUI and FPToSI were missing
this operation.
llvm-svn: 31938
2006-11-27 18:51:06 +00:00
Bill Wendling
a18a61a56a
Removed #include <iostream> and replaced with llvm_* streams.
...
llvm-svn: 31936
2006-11-27 10:09:12 +00:00
Chris Lattner
aa8f67c2b5
For better or worse, load from i1 is assumed to be zero extended. Do not
...
form a load from i1 from larger loads that may not be zext'd.
llvm-svn: 31933
2006-11-27 04:40:53 +00:00
Chris Lattner
c0bdf03e26
If a brcond condition is promoted, make sure to zero extend it, even if not
...
expanded into BR_CC.
llvm-svn: 31932
2006-11-27 04:39:56 +00:00
Reid Spencer
992d9788b3
For PR950:
...
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Bill Wendling
d933b6630c
Removed #include <iostream> and replace with llvm_* streams.
...
llvm-svn: 31927
2006-11-26 10:52:51 +00:00
Bill Wendling
999f49061f
Remove #include <iostream> and use llvm_* streams instead.
...
llvm-svn: 31925
2006-11-26 10:17:54 +00:00
Bill Wendling
5c13d56f78
Replace #include <iostream> with llvm_* streams.
...
llvm-svn: 31924
2006-11-26 10:02:32 +00:00
Bill Wendling
1b3a86000a
Removed #include <iostream> and replaced with llvm_* streams.
...
llvm-svn: 31923
2006-11-26 09:46:52 +00:00
Bill Wendling
f2fadcee85
Removed #include <iostream> and used the llvm_cerr/DOUT streams instead.
...
llvm-svn: 31922
2006-11-26 09:17:06 +00:00
Duraid Madina
02b497f15a
fix storing bools to mem and unordered FP ops
...
llvm-svn: 31920
2006-11-26 04:34:26 +00:00
Reid Spencer
b1fe5794f7
Make the absolute/relative tolerance information easier to read/understand.
...
llvm-svn: 31908
2006-11-25 08:38:44 +00:00
Reid Spencer
5ae73ed00d
Add newline at end of file.
...
llvm-svn: 31902
2006-11-25 05:41:02 +00:00
Nick Lewycky
cd25e651c2
Update to new predicate simplifier VRP design. Fixes PR966 and PR967.
...
Remove predicate simplifier from default gcc3 pipeline. New design is too
slow to enable by default.
Add new testcases for problems encountered in development.
llvm-svn: 31895
2006-11-22 23:49:16 +00:00
Chris Lattner
632c66b8ef
This xform is handled by FoldOpIntoPhi in visitCastInst in a more elegant way.
...
llvm-svn: 31889
2006-11-21 17:05:13 +00:00
Anton Korobeynikov
ddb73b4f1e
Refactored *GVRequiresExtraLoad() to Subtarget method.
...
llvm-svn: 31887
2006-11-21 00:01:06 +00:00
Chris Lattner
ed9a2f6371
in ppc64-mode, don't allocate the 32-bit version of r13 either.
...
llvm-svn: 31884
2006-11-20 20:48:05 +00:00
Jim Laskey
cd74ba8ae1
Global label not handled correctly.
...
llvm-svn: 31883
2006-11-20 20:29:06 +00:00
Chris Lattner
ad5f088196
r13 is the thread pointer on darwin/ppc64, don't allocate it.
...
llvm-svn: 31882
2006-11-20 19:33:51 +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
Chris Lattner
a2bbd246e0
Fix PR1011 and CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
...
llvm-svn: 31878
2006-11-20 18:05:46 +00:00
Chris Lattner
31f45746ad
setOperand should not zap the operand list or add implicit operands to an
...
instruction. Doing so breaks the FP stackifier, the alpha branch selector
the sparc fpmover.
This fixes PR1012 and CodeGen/X86/fp-stack-compare.ll
llvm-svn: 31876
2006-11-20 17:57:22 +00:00
Anton Korobeynikov
2449b29bdd
We should perform extra load for dllimported calls
...
llvm-svn: 31874
2006-11-20 10:46:14 +00:00
Reid Spencer
6e34ef887b
For PR950:
...
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.
llvm-svn: 31867
2006-11-20 01:22:35 +00:00
Reid Spencer
5487228419
For PR950:
...
Retain the signedness of the old integer types in a new TypeInfo structure
so that it can be used in the grammar to implement auto-upgrade of things
that depended on signedness of types. This doesn't implement any new
functionality in the AsmParser, its just plumbing for future changes.
llvm-svn: 31866
2006-11-19 23:07:00 +00:00
Chris Lattner
4946ae54df
Don't transform in another bad case: if the block is empty, it should be
...
simplified before we do this xform so that our cost model is accurate.
llvm-svn: 31864
2006-11-18 22:25:39 +00:00
Chris Lattner
b101c06bce
Fix another case we *don't* want to do this xform.
...
llvm-svn: 31861
2006-11-18 21:56:39 +00:00
Chris Lattner
3a34164b82
Implement operator<< for machine basic blocks to make it easier to dump them.
...
llvm-svn: 31857
2006-11-18 21:47:36 +00:00
Chris Lattner
514fc3de5c
make the previous change more aggressive, moving any block with no fallthrough.
...
This speeds up yacr2 by 7% on a core2.
llvm-svn: 31856
2006-11-18 21:30:35 +00:00
Chris Lattner
bddc114cfb
Minor code layout tweak: if we have something like this:
...
if (cond) goto BB2
BB1:
...
return;
BB2:
...
Move BB1 to the end of the function so that the code falls through in the
non-return case. This has the effect of moving assert (and other no-return
call) bodies and return blocks out of loops.
llvm-svn: 31855
2006-11-18 20:47:54 +00:00
Chris Lattner
cdb67482da
Do not convert massive blocks on phi nodes into select statements. Instead
...
only do these transformations if there are a small number of phi's.
This speeds up Ptrdist/ks from 2.35s to 2.19s on my mac pro.
llvm-svn: 31853
2006-11-18 19:19:36 +00:00
Reid Spencer
c7a1e60e44
Have ConstantExprs upgrade opcodes the same way as instructions.
...
llvm-svn: 31841
2006-11-18 04:37:19 +00:00
Chris Lattner
eb9b1840b3
on ppc64, float arguments take 8-byte stack slots not 4-byte stack slots.
...
Also, valist should create a pointer RC reg class value, not a GPRC value.
llvm-svn: 31840
2006-11-18 01:57:19 +00:00
Chris Lattner
c4b759987a
make sure to safe LR8 in the right stack slot for PPC64
...
llvm-svn: 31839
2006-11-18 01:34:43 +00:00
Chris Lattner
a55a2365bc
Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'.
...
llvm-svn: 31838
2006-11-18 01:23:56 +00:00
Chris Lattner
f50d87eb50
Rewrite the branch selector to be correct in the face of large functions.
...
The algorithm it used before wasn't 100% correct, we now use an iterative
expansion model. This fixes assembler errors when compiling 403.gcc with
tail merging enabled.
Change the way the branch selector works overall: Now, the isel generates
PPC::BCC instructions (as it used to) directly, and these BCC instructions
are emitted to the output or jitted directly if branches don't need
expansion. Only if branches need expansion are instructions rewritten
and created. This should make branch select faster, and eliminates the
Bxx instructions from the .td file.
llvm-svn: 31837
2006-11-18 00:32:03 +00:00
Chris Lattner
a5439b7913
add encoding for BCC, after finally wrestling strange ppc/tblgen endianness
...
issues to the ground.
llvm-svn: 31836
2006-11-17 23:53:28 +00:00
Chris Lattner
0d88b19f2f
convert PPC::BCC to use the 'pred' operand instead of separate predicate
...
value and CR reg #. This requires swapping the order of these everywhere
that touches BCC and requires us to write custom matching logic for
PPCcondbranch :(
llvm-svn: 31835
2006-11-17 22:37:34 +00:00