1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

14835 Commits

Author SHA1 Message Date
Reid Spencer
fb0feb79f0 Initialize some variables the compiler warns about.
llvm-svn: 29277
2006-07-25 20:44:41 +00:00
Evan Cheng
beeb4e5c8c - Refactor the code that resolve basic block references to a TargetJITInfo
method.
- Added synchronizeICache() to TargetJITInfo. It is called after each block
  of code is emitted to flush the icache. This ensures correct execution
  on targets that have separate dcache and icache.
- Added PPC / Mac OS X specific code to do icache flushing.

llvm-svn: 29276
2006-07-25 20:40:54 +00:00
Evan Cheng
692215be9c Can't commute shufps. The high / low parts elements come from different vectors.
llvm-svn: 29275
2006-07-25 20:25:40 +00:00
Rafael Espindola
2919d4ce24 implement function calling of functions with up to 4 arguments
llvm-svn: 29274
2006-07-25 20:17:20 +00:00
Nate Begeman
6ba0156891 Fix the build on my old and busted version of OS X
llvm-svn: 29266
2006-07-22 16:59:38 +00:00
Evan Cheng
09d3be29fa Forgot to #ifdef __APPLE__
llvm-svn: 29264
2006-07-22 00:42:03 +00:00
Evan Cheng
56e0c65937 Done.
llvm-svn: 29262
2006-07-21 23:07:23 +00:00
Evan Cheng
55bff38268 Resolve __dso_handle.
llvm-svn: 29259
2006-07-21 23:06:20 +00:00
Jim Laskey
085a8477a7 Eliminate data relocations by using NULL instead of global empty list.
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Jim Laskey
a67adda697 Use an enumeration to eliminate data relocations.
llvm-svn: 29249
2006-07-21 20:57:35 +00:00
Rafael Espindola
9ea0bc742c implemented sub
correctly update the stack pointer in the prologue and epilogue

llvm-svn: 29244
2006-07-21 12:26:16 +00:00
Evan Cheng
ed1c019899 This opt is now handled in DAG combine.
llvm-svn: 29243
2006-07-21 08:26:46 +00:00
Evan Cheng
3b2a8d2749 If a shuffle is a splat, check if the argument is a build_vector with all elements being the same. If so, return the argument.
llvm-svn: 29242
2006-07-21 08:25:53 +00:00
Chris Lattner
109640a240 Build more debugger/selectiondag libraries as archives instead of .o files.
This works around bugs in some versions of the cygwin linker.

Patch contributed by Anton Korobeynikov.

llvm-svn: 29239
2006-07-21 00:10:47 +00:00
Evan Cheng
56434b7578 A splat of a vector constant of all zero or all one is the vector constant.
llvm-svn: 29234
2006-07-20 23:09:47 +00:00
Evan Cheng
a634c2b838 Missing a space.
llvm-svn: 29233
2006-07-20 22:52:28 +00:00
Evan Cheng
fe4cf8c64a If a shuffle is unary, i.e. one of the vector argument is not needed, turn the
operand into a undef and adjust mask accordingly.

llvm-svn: 29232
2006-07-20 22:44:41 +00:00
Evan Cheng
100096b2bb Clean up.
llvm-svn: 29228
2006-07-20 21:37:39 +00:00
Chris Lattner
d516a3d01a Fix a race condition in the makefile andrew reported
llvm-svn: 29227
2006-07-20 19:08:27 +00:00
Chris Lattner
3890fa2c4a Minor comment tweaks
llvm-svn: 29226
2006-07-20 19:06:16 +00:00
Chris Lattner
77e6cda5d0 Mems can be in the output list also. This is the second half of a fix for
PR833

llvm-svn: 29224
2006-07-20 19:02:21 +00:00
Devang Patel
cb3c26fa6a Make it fit into 80 cols.
llvm-svn: 29223
2006-07-20 18:03:39 +00:00
Devang Patel
07e0d34f7d Add new constructor to accept vector of exported names while creating
InternalizePass.

llvm-svn: 29222
2006-07-20 17:48:05 +00:00
Andrew Lenharth
bf871a2ad5 80 cols
llvm-svn: 29221
2006-07-20 17:43:27 +00:00
Andrew Lenharth
c1074954fb Reduce number of exported symbols
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Andrew Lenharth
0311b39af2 Fix linking on Alpha
llvm-svn: 29219
2006-07-20 17:27:58 +00:00
Chris Lattner
ee79f01695 Fix PR835 so that touching tblgen in a way that doesn't affect intrinsic
generation does not rebuild files that just use intrinsic info.

llvm-svn: 29217
2006-07-20 16:44:21 +00:00
Evan Cheng
6e440c39da New entry.
llvm-svn: 29215
2006-07-19 21:29:30 +00:00
Jim Laskey
5d139b794a Do once flag never set to true.
llvm-svn: 29214
2006-07-19 19:33:08 +00:00
Jim Laskey
88d7595eb3 Tidy up a few things.
llvm-svn: 29213
2006-07-19 19:32:06 +00:00
Jim Laskey
d31b3778d8 Reduce size of routine. Shrinks .o by 37%.
llvm-svn: 29210
2006-07-19 17:53:32 +00:00
Chris Lattner
0f4e4b1bcb bswapped load/store instructions are only availble in indexed addressing form.
As such, use xoaddr (indexed only), not xaddr for address selection.

This fixes CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll, a crash compiling lencod.

llvm-svn: 29208
2006-07-19 17:15:36 +00:00
Jim Laskey
227b585c6e Bug#834 ICE (crash in code generator?) when building PCH .
Missing Darwin check in Intel ATT ASM printer.

llvm-svn: 29204
2006-07-19 11:54:50 +00:00
Evan Cheng
793f3d97ff Misc. new entry.
llvm-svn: 29202
2006-07-19 06:06:24 +00:00
Owen Anderson
3d84b9e0cc Add an assertion.
llvm-svn: 29199
2006-07-19 05:48:45 +00:00
Owen Anderson
7d68cbc39a Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.
llvm-svn: 29198
2006-07-19 05:45:14 +00:00
Owen Anderson
8a36136176 Fix a error that hadn't yet cause any problems, but I'm sure it would have
somewhere down the road.

llvm-svn: 29197
2006-07-19 03:51:48 +00:00
Chris Lattner
2d0f9f0d59 Move MVT::getVectorType out of line, it is large and shouldn't be inlined.
llvm-svn: 29195
2006-07-19 00:40:45 +00:00
Evan Cheng
a2eaed93a0 INC / DEC instructions have shorter code size than ADD32ri8, etc.
llvm-svn: 29194
2006-07-19 00:27:29 +00:00
Evan Cheng
abd650f034 Add code size to target instruction use it as the 3rd isel sorting tie-breaker.
llvm-svn: 29193
2006-07-19 00:24:41 +00:00
Chris Lattner
3415e20ae6 Add an out-of-line virtual method for the sdnode class to give it a home.
llvm-svn: 29192
2006-07-19 00:00:37 +00:00
Chris Lattner
d2ad578246 Add an out-of-line virtual method to provide a home for the cl::option class.
llvm-svn: 29191
2006-07-18 23:59:33 +00:00
Chris Lattner
e1054a6cfe silence warnings in a release build
llvm-svn: 29189
2006-07-18 21:48:57 +00:00
Evan Cheng
725fc9e73d Only reuse a previous IV if it would not require a type conversion.
llvm-svn: 29186
2006-07-18 19:07:58 +00:00
Rafael Espindola
ad256854c0 initial prologue and epilogue implementation. Need to define add and sub before finishing it :-)
llvm-svn: 29175
2006-07-18 17:00:30 +00:00
Chris Lattner
5985b77fae Make the implicit def instructions look like other instrs.
llvm-svn: 29174
2006-07-18 16:33:26 +00:00
Chris Lattner
4854a2a120 simple optimization: don't bother calling "exists" (which calls the syscall
"access").  Instead, just let the open call fail if the file doesn't exist.
This reduces the # syscalls executed.

llvm-svn: 29173
2006-07-18 07:07:51 +00:00
Chris Lattner
c373ed8521 Remove a dead conditional: info_ can only be allocated if FD is good. Improve
spacing

llvm-svn: 29172
2006-07-18 07:03:14 +00:00
Chris Lattner
1c12ee4323 The only entry in the stat buf this code cares about is the size. Keep just
the size, not the whole stat buffer.

llvm-svn: 29171
2006-07-18 07:01:08 +00:00
Chris Lattner
33501c24e8 Reduce code in the error path by only allocating info_ if everything looks
good.

llvm-svn: 29170
2006-07-18 06:57:51 +00:00
Chris Lattner
d01158a404 Unindent some code
llvm-svn: 29169
2006-07-18 06:52:52 +00:00
Jim Laskey
acca26e969 Reduce the size of Constants.o by 25% by generalizing specific instantiations of
std::map.

llvm-svn: 29163
2006-07-17 17:38:29 +00:00
Rafael Espindola
40073f5767 skeleton of a lowerCall implementation for ARM
llvm-svn: 29159
2006-07-16 01:02:57 +00:00
Chris Lattner
65c5f1b9e0 On 64-bit targets like ppc64, we should use .quad to output pointer directives,
not .long.

llvm-svn: 29157
2006-07-15 01:34:12 +00:00
Chris Lattner
f022962081 Remove what little AIX support we have. It has never been tested and isn't
complete.

llvm-svn: 29156
2006-07-15 01:24:23 +00:00
Chris Lattner
ac585b37b1 Add an out-of-line virtual function to home class.
llvm-svn: 29154
2006-07-14 23:08:47 +00:00
Chris Lattner
0f2560a313 Add an out-of-line virtual method for X86DwarfWriter to give it a home.
llvm-svn: 29153
2006-07-14 23:05:05 +00:00
Chris Lattner
0686fdb905 Add two helpers for escaping and unescaping strings.
llvm-svn: 29151
2006-07-14 22:54:39 +00:00
Chris Lattner
3a664f7dc0 eliminate some ugly code, using ConstantExpr::getWithOperands instead.
llvm-svn: 29149
2006-07-14 22:21:31 +00:00
Chris Lattner
e1a75ed7be Add a new helper, simplify ConstantExpr::getWithOperandReplaced at Gabor's
request :)

llvm-svn: 29148
2006-07-14 22:20:01 +00:00
Chris Lattner
10054b8603 Add a new method for bugpoint to use
llvm-svn: 29143
2006-07-14 19:37:40 +00:00
Owen Anderson
715e6d06e6 Hopefully the final attempt at making IndVars preserve LCSSA.
This should fix PR 831.

llvm-svn: 29141
2006-07-14 18:49:15 +00:00
Chris Lattner
ff8ee5486f Add missing PPC64 extload/truncstores
llvm-svn: 29140
2006-07-14 04:42:02 +00:00
Chris Lattner
9aafd2b441 Add a note
llvm-svn: 29139
2006-07-14 04:07:29 +00:00
Chris Lattner
5c489bce2c Another fix in the rotate encodings, needed when the first two operands are not
the same.

llvm-svn: 29136
2006-07-13 21:52:41 +00:00
Chris Lattner
f404323e66 Revert this patch temporarily until PR831 is fixed.
llvm-svn: 29134
2006-07-13 19:05:20 +00:00
Jim Laskey
4d97a53442 Fixed a bug handling void function types.
Requires rebuild of llvm-gcc4 (touch llvm-debug.cpp.)

llvm-svn: 29131
2006-07-13 15:27:42 +00:00
Chris Lattner
753e4f5984 Print negative immediates as negative values instead of large constants
when using the immshifted addressing mode.

llvm-svn: 29130
2006-07-12 23:24:02 +00:00
Chris Lattner
803c609c77 Turn an if into an else if.
llvm-svn: 29129
2006-07-12 22:37:18 +00:00
Chris Lattner
726ca018c0 Fix encoding of rotates, such as rldicl
llvm-svn: 29128
2006-07-12 22:08:13 +00:00
Chris Lattner
b77e687f6f Handle instructions in the map, but that map to a null pointer.
This unbreaks smg2000.

llvm-svn: 29127
2006-07-12 21:37:11 +00:00
Owen Anderson
d4000ea452 IndVars now (correctly) preserves LCSSA form.
llvm-svn: 29126
2006-07-12 21:29:14 +00:00
Chris Lattner
024af03a3c Implement PPC64 relocations types
llvm-svn: 29125
2006-07-12 21:23:20 +00:00
Chris Lattner
c9be3277e7 An overaggressive #ifdef allows a function to fall off the bottom of the
function instead of returning a value.  This sometimes allowed the ppc32 jit
to be used in 64-bit mode.

llvm-svn: 29123
2006-07-12 20:42:10 +00:00
Chris Lattner
0d4c198ecd In addition to deleting calls, the inliner can constant fold them as well.
Handle this case, which doesn't require a new callgraph edge.  This fixes
a crash compiling MallocBench/gs.

llvm-svn: 29121
2006-07-12 18:37:18 +00:00
Chris Lattner
e5e2e8d917 Change the callgraph representation to store the callsite along with the
target CG node.  This allows the inliner to properly update the callgraph
when using the pruning inliner.  The pruning inliner may not copy over all
call sites from a callee to a caller, so the edges corresponding to those
call sites should not be copied over either.

This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll

llvm-svn: 29120
2006-07-12 18:29:36 +00:00
Chris Lattner
d0202bbed3 Add information preventing several register class constraints from working.
This implements PR828 and CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll

llvm-svn: 29118
2006-07-12 16:59:49 +00:00
Chris Lattner
2d974f5de3 Remove non-portable optimization that isn't worth it
llvm-svn: 29115
2006-07-12 00:31:47 +00:00
Chris Lattner
fd9cbcab4a The PPC64 JIT needs register numbers to encode instructions.
llvm-svn: 29114
2006-07-11 20:53:55 +00:00
Chris Lattner
c46e26828e Fix PR826, testcase here: Regression/Verifier/2006-07-11-StoreStruct.ll
llvm-svn: 29112
2006-07-11 20:29:49 +00:00
Evan Cheng
db529debec Emit inc / dec of registers as one byte instruction.
llvm-svn: 29110
2006-07-11 19:49:49 +00:00
Chris Lattner
8c650b87d6 Silence a warning produced in assertions-disabled mode
llvm-svn: 29108
2006-07-11 18:31:26 +00:00
Jim Laskey
d19ba2cf6c It was pointed out that DEBUG() is only available with -debug.
llvm-svn: 29106
2006-07-11 18:25:13 +00:00
Jim Laskey
4c0d841280 Ensure that dump calls that are associated with asserts are removed from
non-debug build.

llvm-svn: 29105
2006-07-11 17:58:07 +00:00
Jim Laskey
6fe083c694 1. Support for c++ mangled names.
2. Support for private/protected class members.

llvm-svn: 29104
2006-07-11 15:58:09 +00:00
Rafael Espindola
fdfaee67f5 add the memri memory operand
this makes it possible for ldr instructions with non-zero immediate

llvm-svn: 29103
2006-07-11 11:36:48 +00:00
Owen Anderson
0dd2844c05 Revert my indvars changes because they were breaking things. Unfortunately this
didn't start showing up until after the recent instcombine fixes.

llvm-svn: 29102
2006-07-11 07:25:33 +00:00
Chris Lattner
b75fe307e1 Implement the inline asm 'A' constraint. This implements PR825 and
CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll

llvm-svn: 29101
2006-07-11 02:54:03 +00:00
Chris Lattner
1f9dfd6157 Fix CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll and PR818.
llvm-svn: 29099
2006-07-11 01:40:09 +00:00
Chris Lattner
2db97248f8 In 64-bit mode, 64-bit GPRs are callee saved, not 32-bit ones.
llvm-svn: 29096
2006-07-11 00:48:23 +00:00
Owen Anderson
bc6e3cc1b3 Add a comment, and fix a typo that broke the build.
llvm-svn: 29094
2006-07-10 22:15:25 +00:00
Owen Anderson
ea91b4ae30 Don't indent the entire function.
llvm-svn: 29093
2006-07-10 22:03:18 +00:00
Evan Cheng
7c11ad2f8d New entry.
llvm-svn: 29091
2006-07-10 21:42:16 +00:00
Evan Cheng
b5e6a4a74d Fixed stack objects do not specify alignments, but their offsets are known.
Use that information when doing the transformation to merge multiple loads
into a 128-bit load.

llvm-svn: 29090
2006-07-10 21:37:44 +00:00
Chris Lattner
abaaddc214 Implement Regression/CodeGen/PowerPC/bswap-load-store.ll by folding bswaps
into i16/i32 load/stores.

llvm-svn: 29089
2006-07-10 20:56:58 +00:00
Chris Lattner
8c5c35af13 Recognize 16-bit bswaps by relaxing overconstrained pattern.
This implements Transforms/InstCombine/bswap.ll:test[34].

llvm-svn: 29087
2006-07-10 20:25:24 +00:00
Chris Lattner
18c77b92a9 Mark internal function static
llvm-svn: 29085
2006-07-10 19:53:12 +00:00
Owen Anderson
81986ede26 Make instcombine not remove Phi nodes when LCSSA is live.
llvm-svn: 29083
2006-07-10 19:03:49 +00:00
Rafael Espindola
071c83dff0 create the raddr addressing mode that matches any register and the frame index
use raddr for the ldr instruction. This removes a dummy mov from the assembly output
remove SelectFrameIndex
remove isLoadFromStackSlot
remove isStoreToStackSlot

llvm-svn: 29079
2006-07-10 01:41:35 +00:00
Owen Anderson
7c03596d93 Fix typo in the comment.
llvm-svn: 29078
2006-07-09 21:35:40 +00:00
Owen Anderson
5812f5d7a8 Add a fix for an issue where LCSSA would fail to insert undef's in some corner
cases.  Ideally, this issue will go away in the future as LCSSA gets smarter
about which Phi nodes it inserts.

llvm-svn: 29076
2006-07-09 08:14:06 +00:00
Evan Cheng
d460c903b1 Fix a typo that causes 2006-07-07-ComputeMaskedBits.ll to fail.
llvm-svn: 29072
2006-07-07 21:37:21 +00:00
Chris Lattner
ad4fa73f50 Fix PR820 and Transforms/GlobalOpt/2006-07-07-InlineAsmCrash.ll
llvm-svn: 29071
2006-07-07 21:37:01 +00:00
Chris Lattner
0438b0c461 no need to do a stat then an lstat. lstat will tell us if normal files don't exist.
llvm-svn: 29068
2006-07-07 21:21:06 +00:00
Reid Spencer
cb66ae964e Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.

llvm-svn: 29067
2006-07-07 20:56:50 +00:00
Reid Spencer
9f4deeabf4 Remove EH use from the Archive library and adjust its users accordingly.
llvm-svn: 29066
2006-07-07 19:09:14 +00:00
Chris Lattner
d6b9711d8a Move << method out of line.
llvm-svn: 29062
2006-07-07 18:11:32 +00:00
Chris Lattner
8116948fa5 Change AllocateRWX/DeallocateRWX to not throw an exception.
llvm-svn: 29058
2006-07-07 17:32:37 +00:00
Chris Lattner
cad94f6042 Change AllocateRWX/DeallocateRWX do not throw an exception.
llvm-svn: 29057
2006-07-07 17:31:41 +00:00
Chris Lattner
12dae23804 Fix this impl
llvm-svn: 29055
2006-07-07 17:26:47 +00:00
Chris Lattner
26b53f505e Adapt to new interface function materialization interface
llvm-svn: 29051
2006-07-07 17:18:09 +00:00
Chris Lattner
d5eb5a13ea LoadLibraryPermanently no longer throws an exception, so this code doesn't have
to catch it.  Other minor cleanups.

llvm-svn: 29050
2006-07-07 17:14:04 +00:00
Chris Lattner
afbae9010f Add a helper function
llvm-svn: 29049
2006-07-07 17:13:10 +00:00
Chris Lattner
832e60566f Change LoadLibraryPermanently to not throw an exception.
llvm-svn: 29048
2006-07-07 17:12:36 +00:00
Chris Lattner
e54ce5af47 This patch (written by Reid) changes compressor to never throw an exception.
llvm-svn: 29045
2006-07-07 17:00:12 +00:00
Chris Lattner
455d034726 This uses EH info
llvm-svn: 29044
2006-07-07 16:46:43 +00:00
Chris Lattner
f898cccc07 These libs use EH info
llvm-svn: 29043
2006-07-07 16:44:31 +00:00
Evan Cheng
1d48a494a2 X86 target specific DAG combine: turn build_vector (load x), (load x+4),
(load x+8), (load x+12), <0, 1, 2, 3> to a single 128-bit load (aligned and
unaligned).

e.g.

__m128 test(float a, float b, float c, float d) {
  return _mm_set_ps(d, c, b, a);
}

_test:
        movups 4(%esp), %xmm0
        ret

llvm-svn: 29042
2006-07-07 08:33:52 +00:00
Chris Lattner
d20dc02699 Fix a bug in my previous patch which broke building llvm/runtime when using llvm-gcc3.
llvm-svn: 29041
2006-07-07 06:06:06 +00:00
Chris Lattner
070ec6bdf6 This uses EH extensively
llvm-svn: 29036
2006-07-07 00:47:29 +00:00
Chris Lattner
24d2f48b07 Modify the SlowOperationInformer interface to not throw exceptions.
llvm-svn: 29028
2006-07-06 22:34:06 +00:00
Chris Lattner
792190e73d Change the ModuleProvider interface to not throw exceptions.
llvm-svn: 29024
2006-07-06 21:35:01 +00:00
Chris Lattner
198d63f336 Print LLVM version info like this:
Low Level Virtual Machine (http://llvm.org/):
  llvm version 1.8cvs
  DEBUG build with assertions.

instead of like this:

Low Level Virtual Machine (llvm) 1.8cvs (see http://llvm.org/) ASSERTIONS ENABLED

Also, add a place for vendor version info.

llvm-svn: 29020
2006-07-06 18:33:03 +00:00
Chris Lattner
c55abf6f70 Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
llvm-svn: 29017
2006-07-06 18:02:27 +00:00
Chris Lattner
da960e218f Undisable ppc64 jit
llvm-svn: 29011
2006-07-06 17:10:42 +00:00
Evan Cheng
a6c9288186 Added option -code-model to set code model (only used in 64-bit) mode. Valid
values include small, kernel, medium, large, and default.

llvm-svn: 29009
2006-07-06 01:53:36 +00:00
Evan Cheng
801ea78096 Reorg. No functionality change.
llvm-svn: 28999
2006-07-05 22:17:51 +00:00
Evan Cheng
d75aed0d60 Fix JIT on non MacOS X i386 systems.
llvm-svn: 28992
2006-07-05 07:09:13 +00:00
Andrew Lenharth
9ea557b06b These are already implemented
llvm-svn: 28990
2006-07-03 18:00:29 +00:00
Andrew Lenharth
98f5e9c45a 0 offsets for memory operands
llvm-svn: 28989
2006-07-03 17:57:34 +00:00
Evan Cheng
90a25bcd6f Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.

llvm-svn: 28987
2006-06-29 23:57:05 +00:00
Evan Cheng
0df13a4f2a Should just use xorps to clear XMM registers for all data types. pxor is also one byte longer.
llvm-svn: 28984
2006-06-29 18:04:54 +00:00
Evan Cheng
5a7af4f99f Let X86CompilationCallback pass previous frame and return address to X86CompilationCallback2. Remove alloca hack.
llvm-svn: 28982
2006-06-29 01:48:36 +00:00
Evan Cheng
1d5fa40da3 Add shift and rotate by 1 instructions / patterns.
llvm-svn: 28980
2006-06-29 00:36:51 +00:00
Evan Cheng
803891eaa8 Always use xorps to clear XMM registers.
llvm-svn: 28979
2006-06-29 00:34:23 +00:00
Evan Cheng
1b53896495 Move .literal4 and .literal8 support into AsmPrinter.cpp
llvm-svn: 28978
2006-06-29 00:33:06 +00:00
Evan Cheng
6ec6e10b48 Add support to print 4-, 8-, and 16- byte constant literals in special
sections. e.g. On Darwin that would be .literal4 and .literal8.

llvm-svn: 28977
2006-06-29 00:26:09 +00:00
Chris Lattner
adc7078c98 Hide x86 symbols
llvm-svn: 28976
2006-06-28 23:27:49 +00:00
Chris Lattner
496bd3fbf6 Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Chris Lattner
754b6939a6 Use hidden visibility to reduce codesize
llvm-svn: 28974
2006-06-28 22:57:00 +00:00
Chris Lattner
de706b3e3e Shave another 27K off libllvmgcc.dylib with visibility hidden
llvm-svn: 28973
2006-06-28 22:17:39 +00:00
Chris Lattner
3aac973374 Shrink libllvmgcc.dylib by another 23K
llvm-svn: 28972
2006-06-28 22:08:15 +00:00
Chris Lattner
26f1985fdc shrink libllvmgcc.dylib another 25K
llvm-svn: 28971
2006-06-28 22:00:36 +00:00
Chris Lattner
601a416d22 Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K
llvm-svn: 28970
2006-06-28 21:58:30 +00:00
Chris Lattner
11f1b29308 Use hidden visibility to reduce the sizes of some .o files. This chops 60K off a release llvm-dis.
llvm-svn: 28969
2006-06-28 21:38:54 +00:00
Chris Lattner
e788574b82 Fix CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
llvm-svn: 28965
2006-06-28 18:29:47 +00:00
Evan Cheng
36d3fccf4b Doh.
llvm-svn: 28963
2006-06-28 17:56:43 +00:00
Owen Anderson
8f95262124 Switch to a very conservative heuristic for determining when loop-unswitching
will be profitable.  This is mainly to remove some cases where excessive
unswitching would result in long compile times and/or huge generated code.

Once someone comes up with a better heuristic that avoids these cases, this
should be switched out.

llvm-svn: 28962
2006-06-28 17:47:50 +00:00
Chris Lattner
d6dbd6d552 Fix Transforms/InstCombine/2006-06-28-infloop.ll
llvm-svn: 28961
2006-06-28 17:34:50 +00:00
Chris Lattner
1d8a141786 Don't unswitch really large loops even if they are mostly filled with empty
blocks.

llvm-svn: 28959
2006-06-28 16:38:55 +00:00
Evan Cheng
e123f47232 Oops. Need to keep CP index.
llvm-svn: 28958
2006-06-28 07:55:24 +00:00
Evan Cheng
3963b5ee02 Darwin puts float and double literal constants into literal4 and literal8 sections.
llvm-svn: 28957
2006-06-28 07:35:41 +00:00
Andrew Lenharth
24a9a6df27 add some missing externals
llvm-svn: 28955
2006-06-28 01:16:06 +00:00
Andrew Lenharth
764ee8eb29 Catch more function pointer casting problems
Remove the Function pointer cast in these calls, converting it to
a cast of argument.
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( int 10 )
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( uint %tmp51 )

llvm-svn: 28953
2006-06-28 01:01:52 +00:00
Chris Lattner
fb34ed6ed4 Handle alias sets that have been unified, and thus can have other references
to them.  This fixes a regression in my previous checkin.

llvm-svn: 28951
2006-06-27 23:56:13 +00:00
Chris Lattner
a3a29d82b6 Don't implement AliasSetTracker::remove in terms of deleteValue. deleteValue
causes the pointer to be removed from the underlying alias analysis
implementation as well.  This impl of remove is also significantly faster than
the old one.  This fixes:
Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll

llvm-svn: 28950
2006-06-27 23:48:59 +00:00
Andrew Lenharth
ae9cbe3545 this case isn't handled
llvm-svn: 28948
2006-06-27 23:19:14 +00:00
Owen Anderson
f9dbb7c834 Fix for 2006-06-27-DeadSwitchCase.ll
Be more careful when updating Phi nodes after eliminating dead switch cases.  Fix
proposed by Chris.

llvm-svn: 28947
2006-06-27 22:26:09 +00:00
Rafael Espindola
f11f34a3d6 handle the "mov reg1, reg2" case in isMoveInstr
llvm-svn: 28945
2006-06-27 21:52:45 +00:00
Chris Lattner
852423b469 Don't match 64-bit bitfield inserts into rlwimi's. todo add rldimi. :)
llvm-svn: 28944
2006-06-27 21:08:52 +00:00
Chris Lattner
92703315b1 Fix Transforms/DeadArgElim/2006-06-27-struct-ret.ll. -deadargelim should not
remove the struct return argument of a csret function, even if it is obviously
dead.

llvm-svn: 28943
2006-06-27 21:05:04 +00:00
Chris Lattner
d7b1f61e72 Fix ppc64 jump tables
llvm-svn: 28941
2006-06-27 20:46:17 +00:00
Evan Cheng
a37a2f781e Remove dead code.
llvm-svn: 28938
2006-06-27 20:34:14 +00:00
Chris Lattner
01965c2fd8 Print stubs for external globals right.
llvm-svn: 28936
2006-06-27 20:20:53 +00:00
Chris Lattner
2c3f67f6a7 Implement 64-bit select, bswap, etc.
llvm-svn: 28935
2006-06-27 20:14:52 +00:00
Chris Lattner
86c7ca4fd4 Add a pattern for i64 sra. Print 8-byte units with a space between the .quad
and the data

llvm-svn: 28934
2006-06-27 20:07:26 +00:00
Chris Lattner
3422f47382 Fix rewriting frame offsets with ixaddr instructions, which implicitly shift
the offset two bits to the left.

llvm-svn: 28933
2006-06-27 18:55:49 +00:00
Chris Lattner
8569f4042d PPC doesn't have bit converts to/from i64
llvm-svn: 28932
2006-06-27 18:40:08 +00:00
Chris Lattner
da08df5d8a Add 64-bit MTCTR so that indirect calls work.
llvm-svn: 28931
2006-06-27 18:36:44 +00:00
Chris Lattner
20959f59cd Fix an incorrect store pattern. This fixes em3d.
llvm-svn: 28930
2006-06-27 18:22:50 +00:00
Chris Lattner
26f2bd4d4b Implement 64-bit undef, sub, shl/shr, srem/urem
llvm-svn: 28929
2006-06-27 18:18:41 +00:00
Chris Lattner
b4a636f966 Use i32 for shift amounts instead of i64. This gets bisort working.
llvm-svn: 28927
2006-06-27 17:34:57 +00:00
Chris Lattner
01182783c4 Add zextload from i32 -> i64, with this, perimeter works.
llvm-svn: 28926
2006-06-27 17:30:08 +00:00
Reid Spencer
938be45012 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!

llvm-svn: 28925
2006-06-27 16:49:46 +00:00
Owen Anderson
1c3b04d485 De-pessimize the handling of LCSSA Phi nodes in IndVarSimplify. Hopefully this
will make Shootout-C/nestedloop faster.

llvm-svn: 28924
2006-06-27 02:17:08 +00:00
Chris Lattner
10e71f60df Print darwin stub stuff correctly in 64-bit mode. With this, treeadd works in
ppc64 mode!

llvm-svn: 28923
2006-06-27 01:02:25 +00:00
Chris Lattner
a572f110b4 Fix variable shadowing issue
llvm-svn: 28922
2006-06-27 00:10:13 +00:00
Chris Lattner
494f476ca7 Implement a bunch of 64-bit cleanliness work. With this, treeadd builds (but
doesn't work right).

llvm-svn: 28921
2006-06-27 00:04:13 +00:00
Chris Lattner
c8a47e0bb0 Rearrange compares, add ADDI8, add sext from 32-to-64 bit register
llvm-svn: 28920
2006-06-26 23:53:10 +00:00
Chris Lattner
cbd4d14b24 Improve PPC64 calling convention support
llvm-svn: 28919
2006-06-26 22:48:35 +00:00
Chris Lattner
5d0654b832 Remove two more definitions
llvm-svn: 28918
2006-06-26 22:47:37 +00:00
Chris Lattner
209c2db6b9 remove two unused instructions.
llvm-svn: 28917
2006-06-26 22:44:13 +00:00
Chris Lattner
e2d4b2f3e2 Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night.

llvm-svn: 28916
2006-06-26 19:20:48 +00:00
Chris Lattner
b12f94b14a random code cleanups, no functionality change
llvm-svn: 28914
2006-06-26 19:10:05 +00:00
Owen Anderson
71056f7113 Make LoopUnswitch able to unswitch loops with live-out values by taking advantage
of LCSSA.  This results several times the number of unswitchings occurring on
tests such and timberwolfmc, unix-tbl, and ldecod.

llvm-svn: 28912
2006-06-26 07:44:36 +00:00
Evan Cheng
db5c7909f5 Simplify X86CompilationCallback: always align to 16-byte boundary; don't save EAX/EDX if unnecessary.
llvm-svn: 28910
2006-06-24 08:36:10 +00:00
Jim Laskey
a8284f65e1 Add and sort "sections" in debug lines. This always stepping through
code in sections other than ".text", including weak sections like ctors and
dtors.

llvm-svn: 28909
2006-06-23 12:51:53 +00:00
Evan Cheng
2db138d4b0 Added jump table address relocation.
llvm-svn: 28908
2006-06-23 01:02:37 +00:00
Evan Cheng
d8090f4666 Eliminate unneeded parameter.
llvm-svn: 28907
2006-06-22 00:02:55 +00:00
Evan Cheng
420ea2c264 variable_ops instructions such as call can have any number of operands.
llvm-svn: 28906
2006-06-21 23:37:07 +00:00
Chris Lattner
66d23312b5 Add more anonymous namespaces to make it clear that these are private classes
llvm-svn: 28901
2006-06-21 18:13:36 +00:00
Chris Lattner
a396e6d9ba Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.

llvm-svn: 28898
2006-06-21 16:53:47 +00:00
Chris Lattner
0a12a0f38b fix typo
llvm-svn: 28897
2006-06-21 16:53:00 +00:00
Andrew Lenharth
e75c2ec042 Add memory operand and int regs
llvm-svn: 28896
2006-06-21 15:42:36 +00:00
Andrew Lenharth
f794ded743 inline asm, at least for floats
llvm-svn: 28895
2006-06-21 13:37:27 +00:00
Andrew Lenharth
78e0cc794f fix argument problem
llvm-svn: 28893
2006-06-21 01:00:43 +00:00
Chris Lattner
5fa6e47534 Correct returns of 64-bit values, though they seemed to work before...
llvm-svn: 28892
2006-06-21 00:34:03 +00:00
Chris Lattner
10d22c274e Make these predicates correct in 64-bit mode too.
llvm-svn: 28890
2006-06-20 23:21:20 +00:00
Chris Lattner
75e6449a0f Rename OR4 -> OR. Move some PPC64-specific stuff to the 64-bit file
llvm-svn: 28889
2006-06-20 23:18:58 +00:00
Chris Lattner
2e1d3158f1 remove unused flag
llvm-svn: 28888
2006-06-20 23:15:07 +00:00
Chris Lattner
c74ef80a95 add some logical ops
llvm-svn: 28887
2006-06-20 23:11:59 +00:00
Chris Lattner
19df1fcd72 remove some unused patterns
llvm-svn: 28886
2006-06-20 23:11:36 +00:00
Chris Lattner
40a0a6c400 Add some more immediate patterns. This allows us to compile:
void test6() {
  Y = 0xABCD0123BCDE4567;
}

into:

_test6:
        lis r2, -21555
        lis r3, ha16(_Y)
        ori r2, r2, 291
        rldicr r2, r2, 32, 31
        oris r2, r2, 48350
        ori r2, r2, 17767
        std r2, lo16(_Y)(r3)
        blr

llvm-svn: 28885
2006-06-20 23:03:01 +00:00
Chris Lattner
690b03fb44 Instead of li/xoris use li/oris. Note that this doesn't work if bit 15 is
set, so disable the pattern in that case.

llvm-svn: 28884
2006-06-20 22:38:59 +00:00
Chris Lattner
eede1e2c00 Add some 64-bit logical ops.
Split imm16Shifted into a sext/zext form for 64-bit support.
Add some patterns for immediate formation.  For example, we now compile this:

static unsigned long long Y;
void test3() {
  Y = 0xF0F00F00;
}

into:

_test3:
        li r2, 3840
        lis r3, ha16(_Y)
        xoris r2, r2, 61680
        std r2, lo16(_Y)(r3)
        blr

GCC produces:

_test3:
        li r0,0
        lis r2,ha16(_Y)
        ori r0,r0,61680
        sldi r0,r0,16
        ori r0,r0,3840
        std r0,lo16(_Y)(r2)
        blr

llvm-svn: 28883
2006-06-20 22:34:10 +00:00
Evan Cheng
b0bb6dd981 __i386__, __i386, etc. are not defined for x86-64. Use __x86_64__.
llvm-svn: 28881
2006-06-20 22:11:12 +00:00
Chris Lattner
4ff5f3d852 64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.
llvm-svn: 28880
2006-06-20 21:39:30 +00:00
Chris Lattner
c97820b17c Add some patterns for globals, so we can now compile this:
static unsigned long long X, Y;
void test1() {
  X = Y;
}

into:

_test1:
        lis r2, ha16(_Y)
        lis r3, ha16(_X)
        ld r2, lo16(_Y)(r2)
        std r2, lo16(_X)(r3)
        blr

llvm-svn: 28879
2006-06-20 21:23:06 +00:00
Jim Laskey
1725929173 Add support for function types.
llvm-svn: 28874
2006-06-20 19:41:06 +00:00
Chris Lattner
3ae4156dd7 Remove some now-unneeded casts from instruction patterns. With the casts
removed, tblgen produces identical output to with them in.

llvm-svn: 28867
2006-06-20 00:39:56 +00:00
Chris Lattner
19339e7a96 Add some patterns for ppc64
llvm-svn: 28866
2006-06-20 00:38:36 +00:00
Chris Lattner
2e64872117 Remove some ugly now-redundant casts.
llvm-svn: 28864
2006-06-20 00:25:29 +00:00
Chris Lattner
fbea064e90 Fix some mismatched type constraints
llvm-svn: 28862
2006-06-20 00:12:37 +00:00
Jim Laskey
e996378867 References need to be section relative.
llvm-svn: 28861
2006-06-19 19:49:42 +00:00
Evan Cheng
98d508af83 Minor clean up.
llvm-svn: 28860
2006-06-19 19:25:30 +00:00
Andrew Lenharth
f0ecdbe7ef Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
llvm-svn: 28859
2006-06-19 18:23:36 +00:00
Jim Laskey
16fcd6389e References need to be section relative.
llvm-svn: 28858
2006-06-19 15:48:00 +00:00
Andrew Lenharth
3ab1711306 Fix a bug, don't drop indirect call sites, especially if there is nothing known about them yet, and restore a simple version of a removed function
llvm-svn: 28857
2006-06-19 15:42:47 +00:00
Jim Laskey
005825407f Handle versioning of compile unit.
llvm-svn: 28855
2006-06-19 12:54:15 +00:00
Rafael Espindola
14a59f5b6e initial implementation of ARMRegisterInfo::eliminateFrameIndex
fixes test/Regression/CodeGen/ARM/ret_arg5.ll

llvm-svn: 28854
2006-06-18 00:08:07 +00:00
Chris Lattner
9d028c26c8 Constant fold sqrtf
llvm-svn: 28853
2006-06-17 18:17:52 +00:00
Chris Lattner
25b04b4249 Fix IndVarsSimplify/2006-06-16-Indvar-LCSSA-Crash.ll, a case where a
"LCSSA" phi node causes indvars to break dominance properties.  This fixes
causes indvars to avoid inserting aggressive code in this case, instead
indvars should be fixed to be more aggressive in the face of lcssa phi's.

llvm-svn: 28850
2006-06-17 01:02:31 +00:00
Evan Cheng
e3b8db6dda A new entry.
llvm-svn: 28848
2006-06-17 00:45:49 +00:00
Chris Lattner
d817b32a8e Implement the getPointerRegClass method, which is required for the ptr_rc
magic to work.

llvm-svn: 28847
2006-06-17 00:01:04 +00:00
Jim Laskey
e62ae62e2b Forgot operands were hard coded for compile unit.
llvm-svn: 28846
2006-06-16 23:36:12 +00:00
Evan Cheng
78e6cefad9 Later models likely to have Yonah like attributes.
llvm-svn: 28843
2006-06-16 21:58:49 +00:00
Chris Lattner
89a0d10812 Upgrade some load/store instructions to use the proper addressing mode stuff.
llvm-svn: 28841
2006-06-16 21:29:41 +00:00
Chris Lattner
163da7cdcb In 64-bit mode, addr mode operands use G8RC instead of GPRC.
llvm-svn: 28840
2006-06-16 21:29:03 +00:00
Chris Lattner
81845946ff fix some assumptions that pointers can only be 32-bits. With this, we can
now compile:

static unsigned long X;
void test1() {
  X = 0;
}

into:

_test1:
        lis r2, ha16(_X)
        li r3, 0
        stw r3, lo16(_X)(r2)
        blr

Totally amazing :)

llvm-svn: 28839
2006-06-16 21:01:35 +00:00
Chris Lattner
cb294464e7 Split 64-bit instructions out into a separate .td file
llvm-svn: 28838
2006-06-16 20:22:01 +00:00
Chris Lattner
59947dda25 Force 64-bit register availability in 64-bit mode. For real.
llvm-svn: 28837
2006-06-16 20:05:06 +00:00
Chris Lattner
126464b577 Remove the -darwin and -aix llc options, inferring darwinism and aixism from
the target triple & subtarget info.  woo.

llvm-svn: 28835
2006-06-16 18:50:48 +00:00
Evan Cheng
884b3a29da Add missing casts. This fixed some regressions.
llvm-svn: 28834
2006-06-16 18:37:15 +00:00
Chris Lattner
5a1f56fc2a Simplify TargetData ctor call
llvm-svn: 28832
2006-06-16 18:24:38 +00:00
Chris Lattner
6a9ec7e80e Don't pass target name into TargetData anymore, it is never used or needed.
Remove explicit casts to std::string now that there is no overload resolution
issues in the TargetData ctors.

llvm-svn: 28830
2006-06-16 18:22:52 +00:00
Chris Lattner
9fcdb0d7e5 Remove ctor with each piece specifyable (which causes overload ambiguities),
add a new init method.

llvm-svn: 28828
2006-06-16 18:11:26 +00:00
Chris Lattner
4a8f3c456a Only count instructions as code size, not constant pools and other per-function stuff.
llvm-svn: 28827
2006-06-16 18:09:26 +00:00
Chris Lattner
ac373d311b Simplify interpreter construction.
llvm-svn: 28826
2006-06-16 18:08:38 +00:00
Chris Lattner
19680a4928 Document the subtarget features better, make sure that 64-bit mode, 64-bit
support, and 64-bit register use are all consistent with each other.

Add a new "IsPPC" feature, to distinguish ppc32 vs ppc64 targets, use this
to configure TargetData differently.  This not makes ppc64 blow up on lots
of stuff :)

llvm-svn: 28825
2006-06-16 17:50:12 +00:00
Chris Lattner
fa884ac11b Rename some subtarget features. A CPU now can *have* 64-bit instructions,
can in 32-bit mode we can choose to optionally *use* 64-bit registers.

llvm-svn: 28824
2006-06-16 17:34:12 +00:00
Andrew Lenharth
9f4587fa50 Add a error message to cbu to match bu
llvm-svn: 28819
2006-06-16 14:43:36 +00:00
Andrew Lenharth
71d1cfa5c4 move header
llvm-svn: 28818
2006-06-16 14:33:53 +00:00
Jim Laskey
120281ddcf 1. Revise vector debug support.
2. Update docs for vector debug support and new version control.

3. Simplify serialization of DebugDescInfo subclasses.

llvm-svn: 28816
2006-06-16 13:14:03 +00:00
Evan Cheng
763d7462d5 More libcall transformations:
printf("%s\n", str) -> puts(str)
printf("%c", c) -> putchar(c)
Also fixed fprintf(file, "%c", c) -> fputc(c, file)

llvm-svn: 28815
2006-06-16 08:36:35 +00:00
Evan Cheng
bde00a97a7 Simplify fprintf(file, "%s", str) to fputs(str, file).
llvm-svn: 28814
2006-06-16 04:52:30 +00:00
Chris Lattner
aeb5a015cd First baby step towards ppc64 support. This adds a new -march=ppc64 backend
that is currently just like ppc32 :)

llvm-svn: 28813
2006-06-16 01:37:27 +00:00
Chris Lattner
29fbce5a20 Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll
llvm-svn: 28812
2006-06-16 01:24:04 +00:00
Reid Spencer
82494a2bce Only print the stack trace if it was requested. Previously, any call into
the Signals module that registered the handlers would cause the stack trace
to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal
in order for that to happen.

llvm-svn: 28810
2006-06-16 00:00:57 +00:00
Chris Lattner
48823987ff Teach the local allocator to know that live-in values (e.g. arguments) are
live at function entry.  This prevents it from using arg registers for other
purposes before the arguments are used.

llvm-svn: 28809
2006-06-15 22:21:53 +00:00
Chris Lattner
4c7ba81f59 Add a note that Nate noticed.
llvm-svn: 28808
2006-06-15 21:33:31 +00:00