1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

8230 Commits

Author SHA1 Message Date
Chris Lattner
e4a97f4bee If a global is just loaded and restored, realize that it is not changing
value.  This allows us to turn more globals into constants and eliminate them.
This patch implements GlobalOpt/load-store-global.llx.

Note that this patch speeds up 255.vortex from:

Output/255.vortex.out-cbe.time:program 7.640000
Output/255.vortex.out-llc.time:program 9.810000

to:

Output/255.vortex.out-cbe.time:program 7.250000
Output/255.vortex.out-llc.time:program 9.490000

Which isn't bad at all!

llvm-svn: 17746
2004-11-14 20:50:30 +00:00
Misha Brukman
c98cd22aae Fix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)
llvm-svn: 17744
2004-11-14 20:34:01 +00:00
Reid Spencer
9534caa3bb Moved to lib/Bytecode/Archive in preparation for re-write.
llvm-svn: 17742
2004-11-14 19:59:40 +00:00
Chris Lattner
3d61b688a9 This optimization makes MANY phi nodes that all have the same incoming value.
If this happens, detect it early instead of relying on instcombine to notice
it later.  This can be a big speedup, because PHI nodes can have many
incoming values.

llvm-svn: 17741
2004-11-14 19:29:34 +00:00
Chris Lattner
1e4cad9176 Implement instcombine/phi.ll:test6 - pulling operations through PHI nodes.
This exposes subsequent optimization possiblities and reduces code size.
This triggers 1423 times in spec.

llvm-svn: 17740
2004-11-14 19:13:23 +00:00
Chris Lattner
fdd41995d8 Transform this:
%X = alloca ...
  %Y = alloca ...
    X == Y

into false.  This allows us to simplify some stuff in eon (and probably
many other C++ programs) where operator= was checking for self assignment.
Folding this allows us to SROA several additional structs.

llvm-svn: 17735
2004-11-14 07:33:16 +00:00
Chris Lattner
d6d9a04344 Remove note to self
llvm-svn: 17734
2004-11-14 06:57:47 +00:00
Brian Gaeke
f9ec4c8ee2 Fix problem with insertion point for ADJCALLSTACKDOWN.
llvm-svn: 17733
2004-11-14 06:32:08 +00:00
Brian Gaeke
0e77dab4e8 Update lists of failing unit tests.
Exclude bigfib, so that we effectively exclude all C++ benchmarks.
Update to-do list: mention va_start.

llvm-svn: 17732
2004-11-14 06:32:07 +00:00
Chris Lattner
363e78c357 If a function always returns a constant, replace all calls sites with that
constant value.  This makes the return value dead and allows for
simplification in the caller.

This implements IPConstantProp/return-constant.ll

This triggers several dozen times throughout SPEC.

llvm-svn: 17730
2004-11-14 06:10:11 +00:00
Brian Gaeke
ab60855423 Fix NotTest - round up extraStack to the nearest doubleword, if it is
not zero.

llvm-svn: 17728
2004-11-14 05:19:00 +00:00
Chris Lattner
d0a0af0818 Teach SROA how to promote an array index that is variable, if the dimension
of the array is just two.  This occurs 8 times in gcc, 6 times in crafty, and
12 times in 099.go.

This implements ScalarRepl/sroa_two.ll

llvm-svn: 17727
2004-11-14 05:00:19 +00:00
Brian Gaeke
79f5f96a60 Update failing Benchmarks; point out that I'm skipping Shootout-C++.
llvm-svn: 17725
2004-11-14 04:43:12 +00:00
Chris Lattner
bc35272f86 Rearrange some code, no functionality changes.
llvm-svn: 17724
2004-11-14 04:24:28 +00:00
Brian Gaeke
505a9ee73d Update expected UnitTests failures.
llvm-svn: 17723
2004-11-14 03:22:08 +00:00
Brian Gaeke
1b3d701769 Rewrite outgoing arg handling to handle more weird corner cases.
llvm-svn: 17722
2004-11-14 03:22:07 +00:00
Brian Gaeke
294af88a7a Support UndefValue emission.
llvm-svn: 17721
2004-11-14 03:22:05 +00:00
Chris Lattner
9b2f0f93e3 Remove debugging code
llvm-svn: 17719
2004-11-13 23:32:53 +00:00
Chris Lattner
9749bf21f8 Argument promotion transforms functions to unconditionally load their
argument pointers.  This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid.  Make sure to do the required checks.

This fixed ArgumentPromotion/control-flow.ll and the Burg program.

llvm-svn: 17718
2004-11-13 23:31:34 +00:00
Chris Lattner
09b7f968e0 Don't print unneeded labels
llvm-svn: 17714
2004-11-13 23:27:11 +00:00
Chris Lattner
3684294c71 Hack around stupidity in GCC, fixing Burg with the CBE and
CBackend/2004-11-13-FunctionPointerCast.llx

llvm-svn: 17710
2004-11-13 22:21:56 +00:00
Chris Lattner
1cde11aa95 shld is a very high latency operation. Instead of emitting it for shifts of
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).

For example, instead of compiling this:

long long X2(long long Y) { return Y << 2; }

to:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        shldl $2, %eax, %edx
        shll $2, %eax
        ret

Compile it to:

X2:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $30, %edx
        leal (%edx,%ecx,4), %edx
        shll $2, %eax
        ret

Likewise, for << 3, compile to:

X3:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $29, %edx
        leal (%edx,%ecx,8), %edx
        shll $3, %eax
        ret

This matches icc, except that icc open codes the shifts as adds on the P4.

llvm-svn: 17707
2004-11-13 20:48:57 +00:00
Chris Lattner
c531e090db Add missing check
llvm-svn: 17706
2004-11-13 20:04:38 +00:00
Chris Lattner
d1381380ae Compile:
long long X3_2(long long Y) { return Y+Y; }
int X(int Y) { return Y+Y; }

into:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        addl %eax, %eax
        adcl %edx, %edx
        ret
X:
        movl 4(%esp), %eax
        addl %eax, %eax
        ret

instead of:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        shldl $1, %eax, %edx
        shll $1, %eax
        ret

X:
        movl 4(%esp), %eax
        shll $1, %eax
        ret

llvm-svn: 17705
2004-11-13 20:03:48 +00:00
Chris Lattner
70e351fb1c Simplify handling of shifts to be the same as we do for adds. Add support
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:

   Y+Y+Y+Y+Y+Y+Y+Y

into
         %tmp.8 = shl long %Y, ubyte 3           ; <long> [#uses=1]

instead of

        %tmp.4 = shl long %Y, ubyte 2           ; <long> [#uses=1]
        %tmp.12 = shl long %Y, ubyte 2          ; <long> [#uses=1]
        %tmp.8 = add long %tmp.4, %tmp.12               ; <long> [#uses=1]

This implements add.ll:test25

Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18

llvm-svn: 17704
2004-11-13 19:50:12 +00:00
Chris Lattner
7a8d26a581 Fold:
(X + (X << C2)) --> X * ((1 << C2) + 1)
   ((X << C2) + X) --> X * ((1 << C2) + 1)

This means that we now canonicalize "Y+Y+Y" into:

        %tmp.2 = mul long %Y, 3         ; <long> [#uses=1]

instead of:

        %tmp.10 = shl long %Y, ubyte 1          ; <long> [#uses=1]
        %tmp.6 = add long %Y, %tmp.10               ; <long> [#uses=1]

llvm-svn: 17701
2004-11-13 19:31:40 +00:00
Chris Lattner
d348f5b9fb Lazily create the abort message, so only translation units that use unwind
will actually get it.

llvm-svn: 17700
2004-11-13 19:07:32 +00:00
Chris Lattner
ab917141d0 Fix: CodeExtractor/2004-11-12-InvokeExtract.ll
llvm-svn: 17699
2004-11-13 00:06:45 +00:00
Chris Lattner
c6b1d7a081 Fix a bug where the code extractor would get a bit confused handling invoke
instructions, setting DefBlock to a block it did not have dom info for.

llvm-svn: 17697
2004-11-12 23:50:44 +00:00
Chris Lattner
922a1b4601 Simplify handling of constant initializers
llvm-svn: 17696
2004-11-12 22:42:57 +00:00
Reid Spencer
f6caf3b1c2 Makefile for lib/Linker
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer
f755c169b3 This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp

llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer
13a6af95ad This file originated in tools/gccld/Linker.cpp but now lives in
lib/Linker/LinkArchives.cpp

llvm-svn: 17693
2004-11-12 20:34:32 +00:00
Chris Lattner
1a469385bd Actually, leave the check in. This prevents us from counting dead arguments
as IPCP opportunities.

llvm-svn: 17680
2004-11-11 07:47:54 +00:00
Chris Lattner
dba9c2b0ef Fix bug: IPConstantProp/deadarg.ll
llvm-svn: 17679
2004-11-11 07:46:29 +00:00
Chris Lattner
d920b5b770 Make IP Constant prop more aggressive about handling self recursive calls.
This implements IPConstantProp/recursion.ll

llvm-svn: 17666
2004-11-10 19:43:59 +00:00
John Criswell
402e338f11 Correct the name of stosd for the AT&T syntax:
It's stosl (l for long == 32 bit).

llvm-svn: 17658
2004-11-10 04:48:15 +00:00
Chris Lattner
b214a04a16 Do not let dead constant expressions hanging off of functions prevent IPCP.
This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)

llvm-svn: 17657
2004-11-09 20:47:30 +00:00
Reid Spencer
d17e35893c Fix isBytecodeFile to correctly recognized compressed bytecode too.
llvm-svn: 17655
2004-11-09 20:27:23 +00:00
Reid Spencer
28ceb24005 * Implement getStatusInfo for getting stat(2) like information
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.

llvm-svn: 17654
2004-11-09 20:26:31 +00:00
John Criswell
5be81b837b Recognize compressed LLVM bytecode files.
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.

llvm-svn: 17648
2004-11-09 19:37:07 +00:00
Reid Spencer
d9387fee02 Tune compression:
bzip2: block size 9 -> 5, reduces memory by 400Kbytes, doesn't affect speed
       or compression ratio on all but the largest bytecode files (>1MB)
zip:   level 9 -> 6, this speeds up compression time by ~30% but only
       degrades the compressed size by a few bytes per megabyte. Those few
       bytes aren't worth the effort.

llvm-svn: 17647
2004-11-09 17:58:09 +00:00
Chris Lattner
9f035c9fdb Change this back so that I get stable numbers to reflect the change from the
nightly testers

llvm-svn: 17646
2004-11-09 08:05:23 +00:00
Chris Lattner
b924e8be62 Fix bug: 2004-11-08-FreeUseCrash.ll
llvm-svn: 17642
2004-11-09 05:10:56 +00:00
Misha Brukman
5718caa3ab * Convert tabs to spaces
* Order #includes according to style guide
* Remove extraneous blank lines

llvm-svn: 17639
2004-11-09 04:27:19 +00:00
Nate Begeman
398bd2b9f6 Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
llvm-svn: 17637
2004-11-09 04:01:18 +00:00
Misha Brukman
f28a01454d Handle headers for compressed bytecode files
llvm-svn: 17634
2004-11-08 22:03:32 +00:00
Chris Lattner
0efef015fa Fix a bug that was preventing povray and namd from pool allocating correctly.
llvm-svn: 17632
2004-11-08 21:08:46 +00:00
Chris Lattner
dcee21898f Handle assert_fail special
llvm-svn: 17631
2004-11-08 21:08:28 +00:00
Reid Spencer
af24480f3e Fix a typo: isvalid -> isValid
llvm-svn: 17621
2004-11-08 08:27:51 +00:00
Nate Begeman
a0c15f3ffd Put int the getReg cast optimization from x86 so that we generate fewer
move instructions for the register allocator to coalesce.

llvm-svn: 17608
2004-11-08 02:25:40 +00:00
Misha Brukman
8c397821a5 Implement ExecutionEngine::freeMachineCodeForFunction()
llvm-svn: 17601
2004-11-07 23:58:46 +00:00
Chris Lattner
a9e56ddaa3 VERY large functions that are only called from one place are not really
exciting to inline.  Only inline medium or small sized functions with a
single call site.

llvm-svn: 17588
2004-11-07 21:46:47 +00:00
Nate Begeman
a7541b19fc Disable bogus cast elimination when the cast is used by a setcc instruction.
llvm-svn: 17583
2004-11-07 20:23:42 +00:00
Reid Spencer
c9c7c7fbee * Comments & cleanup per CL code review.
* Accept 'llvc' as signature for compressed bytecode

llvm-svn: 17579
2004-11-07 18:20:55 +00:00
Reid Spencer
152f895e9b Add comments per CL code review.
llvm-svn: 17578
2004-11-07 18:19:00 +00:00
Reid Spencer
1446cd065f * Add comments and cleanup per CL code review
* Make signature for compressed bytecode llvc instead of unreadable
* Make the CompressionContext have a constructor and destructor.

llvm-svn: 17576
2004-11-07 18:17:38 +00:00
Misha Brukman
ce8c2c2aee Replace uses of llvm.org with llvm.cs.uiuc.edu
llvm-svn: 17549
2004-11-07 00:58:38 +00:00
Misha Brukman
820aa44589 Consistently use llvm.cs.uiuc.edu instead of llvm.org
llvm-svn: 17548
2004-11-07 00:58:20 +00:00
Chris Lattner
f5c5cb033e Decompose* is V9 specific, make it internal
llvm-svn: 17547
2004-11-07 00:43:24 +00:00
Chris Lattner
a060b55dea This is V9 specific, move it there.
llvm-svn: 17545
2004-11-07 00:39:26 +00:00
Chris Lattner
f11d034489 Move this file from lib/Transforms/Scalar
llvm-svn: 17544
2004-11-07 00:39:09 +00:00
Reid Spencer
a81994464f Add support for compressed bytecode
llvm-svn: 17535
2004-11-06 23:17:23 +00:00
Reid Spencer
bf14271ed6 Implement the GetBytecodeSymbols interface function to extract just the
externally visible defined symbols from a bytecode file.

llvm-svn: 17503
2004-11-06 08:56:40 +00:00
Reid Spencer
c3a4c8a346 Makefile for the LLVMArchive library.
llvm-svn: 17500
2004-11-06 08:52:36 +00:00
Reid Spencer
8907e56650 First kinda/sorta working version of the Archive library. Reading is not
yet supported but writing works. Way too early to review this. More to come

llvm-svn: 17499
2004-11-06 08:51:45 +00:00
Reid Spencer
7090e6a875 Stop propagating method names that violate the coding standard
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
John Criswell
97da76178c Fix compilation problem; make the cast and the LHS be the same type.
llvm-svn: 17488
2004-11-05 16:17:06 +00:00
Chris Lattner
9f23af6d68 Remove dead var
llvm-svn: 17485
2004-11-05 04:52:08 +00:00
Chris Lattner
499e1b16a7 Quiet VC++ warnings
llvm-svn: 17484
2004-11-05 04:50:59 +00:00
Chris Lattner
bde92f3c03 Do not make i have bigger scope that we need
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Chris Lattner
b5ff07e46e Remove dead vars
llvm-svn: 17482
2004-11-05 04:46:22 +00:00
Chris Lattner
064071600d Fix some warnings on VC++
llvm-svn: 17481
2004-11-05 04:45:43 +00:00
Nate Begeman
bc8bc24d28 Thanks to sabre for pointing out that we were incorrectly codegen'ing
int test(int x) { return 32768 - x; }

Fixed by teaching the function that checks a constant's validity to be used
as an immediate argument about subtract-from instructions.

llvm-svn: 17476
2004-11-04 19:43:18 +00:00
Brian Gaeke
85e7df8097 Handle "call" operands of type long/ulong passed in registers.
llvm-svn: 17464
2004-11-04 00:27:04 +00:00
Chris Lattner
3b6d1045d3 Don't call Constant::getNullValue when the argument could be VoidTy
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
f2976f16ce Fix this function to not say that longs have 8-byte alignment on X86/PPC.
This method is really a gross hack, but at least we can make it work on
the targets we support right now.

This bug fix stops a crash in a testcase reduced from 176.gcc

llvm-svn: 17443
2004-11-02 22:18:18 +00:00
Tanya Lattner
bd82bbff7c Added gross hacks such as creating my own def-use map, and picking on Instruction that I can add all my TmpInstructions to its MCFI.
llvm-svn: 17441
2004-11-02 21:04:56 +00:00
Chris Lattner
d9696aa7b8 Fix a warning
llvm-svn: 17431
2004-11-02 15:27:57 +00:00
Chris Lattner
33ed2c8984 * Rearrange code slightly
* Disable broken transforms for simplifying (setcc (cast X to larger), CI)
  where CC is not != or ==

llvm-svn: 17422
2004-11-02 03:50:32 +00:00
Chris Lattner
10de12fd46 Add placeholder variable to make Win32 work, applied for Morten Ofstad
llvm-svn: 17406
2004-11-01 20:10:20 +00:00
Chris Lattner
b81520727e Speed up the tail duplication pass on the testcase below from 68.2s to 1.23s:
#define CL0(a) case a: f(); goto c;
 #define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
 CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
 #define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
 CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
 #define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
 CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
 #define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
 CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)

 void f();

 void a() {
     int b;
  c: switch (b) {
         CL4(1)
     }
 }

This comes from GCC PR 15524

llvm-svn: 17390
2004-11-01 07:05:07 +00:00
Chris Lattner
3083f2a424 Do not compute the predecessor list for a block unless we need it.
This speeds up simplifycfg on this program, from 44.87s to 0.29s (with
a profiled build):

 #define CL0(a) case a: goto c;
 #define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
 CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
 #define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
 CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
 #define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
 CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
 #define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
 CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)

 void f();

 void a() {
     int b;
  c: switch (b) {
         CL4(1)
     }
 }

This testcase is contrived to expose N^2 behavior, but this patch should speedup
simplifycfg on any programs that use large switch statements.  This testcase
comes from GCC PR17895.

llvm-svn: 17389
2004-11-01 06:53:58 +00:00
Chris Lattner
8572d582cf Fix comment
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Chris Lattner
d72b6b1e77 Improve comment
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Chris Lattner
14d85c9b09 Add more paranoid assertions :)
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Reid Spencer
acb1305e99 Internalize variable names to prevent recursive assignment. Cleanup docs.
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Chris Lattner
29b6259de3 Fix some more problems where we called getOffset before getNode()
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
4b741eab69 Fix three bugs:
1. Calls to external global VARIABLES should not be treated as a call to an
    external function
 2. Efficiently deleting an element from a vector by using std::swap with
    the back, then pop_back is NOT a good way to keep the vector sorted.
 3. Our hope of having stuff get deleted by making them redundant just won't
    work.  In particular, if we have three calls in sequence that should be
    merged: A, B, C   first we unify B into A.  To be sure that they appeared
    identical (so B would be erased) we set B = A.  On the next step, we
    unified C into A and set C = A.  Unfortunately, this is no guarantee that
    C = B, so we would fail to delete the dead call.  Switch to a more
    explicit scheme.

llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
14dfc01ad5 Fix more undefined behavior
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
c17cd85776 * Add a method
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
  evaluation of arguments to function calls to ensure that getNode() was
  called before getOffset().  In practice, this was NOT happening.

llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Tanya Lattner
8b938744dc Fixed bug with infinite epilogues.
Fixed issue with generating the partial order. It now adds the nodes not in recurrences in sets for each connected component.

llvm-svn: 17351
2004-10-30 00:39:07 +00:00
Misha Brukman
4e78536fa3 * Fix compilation on AIX: GCC's fixincludes eliminates isinf() declaration
* Move file comment to the top of the header where it belongs

llvm-svn: 17349
2004-10-29 23:17:45 +00:00
Brian Gaeke
c66a1d540b Change name of target lib to conform to new naming scheme.
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
db07ac46f0 Remove dependency on MRegisterInfo::getRegClass
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
dba13ac3cb The Alpha (tm) intrinsics have never been used anywhere
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Brian Gaeke
a757bae04f When emitting debug msgs for function stubs, don't truncate the
printed pointer value if sizeof(unsigned) != pointer size.  Instead,
use uintptr_t.

llvm-svn: 17338
2004-10-29 18:22:45 +00:00
Alkis Evlogimenos
e88c2aaed7 Gep indices must be of int, uint, long or ulong type.
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Reid Spencer
1be896397a Fix library name.
llvm-svn: 17307
2004-10-28 05:37:24 +00:00
Alkis Evlogimenos
1162280a0d Fix library name.
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
36b5b2c07e Fix library name.
llvm-svn: 17305
2004-10-28 05:32:01 +00:00
Reid Spencer
ccdfdd7346 Fix name of library
llvm-svn: 17304
2004-10-28 05:30:54 +00:00
Reid Spencer
a909f95ebd Make sure that the yacc and lex output are specified as BUILT_SOURCES.
Correct the dependency of the Lexer.o file on the constructed
llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on
the header, its the output of compiling Lexer.cpp, Lexer.o

llvm-svn: 17289
2004-10-28 00:43:24 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
1a344dfd95 Changes to support rand48 tests
llvm-svn: 17284
2004-10-27 23:03:44 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Nate Begeman
2a64d462d9 Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre.
llvm-svn: 17278
2004-10-27 06:00:53 +00:00
Chris Lattner
000424b69e Hrm, this code was severely botched. As it turns out, this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html

exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill
the zion nightly tester disk up and make the tester barf.

This is obviously not a good thing, so lets fix this bug shall we? :)

llvm-svn: 17276
2004-10-27 05:57:15 +00:00
Nate Begeman
a6fafb1f64 Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid
llvm-svn: 17275
2004-10-27 05:44:23 +00:00
Chris Lattner
abfae1c72e Initialize with the correct constant type
llvm-svn: 17270
2004-10-27 03:55:24 +00:00
Chris Lattner
d8ac6d4a25 Plug a memory leak in the asmparser. It turns out that we were leaking
the strings for basic block labels in some cases.  This amounted to about
120K of memory for namd, a medium sized program.

llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Chris Lattner
3a79669263 add support for UndefValue
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
2c73917686 Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
a361504a90 Clean up the MachineBasicBlock.h file, percolating #includes into this file.
Patch contributed by Morten Ofstad

llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Nate Begeman
64ddf151fa Remove include of MRegisterInfo.h, since it is already included by
SkeletonGenRegisterInfo.h.inc

llvm-svn: 17245
2004-10-26 06:04:23 +00:00
Nate Begeman
46c3a8875f Remove file that is no longer used, and move include of MRegisterInfo.h
from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually
needed.

llvm-svn: 17244
2004-10-26 06:02:38 +00:00
Nate Begeman
7c3c97af10 Eliminate usage of MRegisterInfo::getRegClass(physreg)
llvm-svn: 17240
2004-10-26 05:40:45 +00:00
Chris Lattner
0dbd792854 Fix the interpreter crash that Michael McCracken found
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Chris Lattner
6e775d56cf Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 17238
2004-10-26 05:29:18 +00:00
Nate Begeman
ae98298003 Update to-do list
llvm-svn: 17235
2004-10-26 04:10:53 +00:00
Nate Begeman
113f516f6b Fix treecc. Also fix a latent bug in emitBinaryConstOperation that would
allow and const, 0 to be incorrectly codegen'd into a rlwinm instruction.

llvm-svn: 17234
2004-10-26 03:48:25 +00:00
Reid Spencer
2f74ad1e36 Add EXTRA_DIST for additional files to be distributed.
llvm-svn: 17233
2004-10-26 03:12:11 +00:00
Chris Lattner
9c356da87d Disable the JIT until it can sorta kinda work.
llvm-svn: 17230
2004-10-25 20:53:41 +00:00
Chris Lattner
c178fc879a Remove dead assert
llvm-svn: 17221
2004-10-25 19:04:01 +00:00
Chris Lattner
e8d5408a45 Patch to support MSVC, contributed by Morten Ofstad
llvm-svn: 17220
2004-10-25 18:47:10 +00:00
Chris Lattner
e5ccecc27e Patch to support MSVC, contributed by Morten Ofstad
llvm-svn: 17219
2004-10-25 18:46:05 +00:00
Chris Lattner
895f16ebfc Fix compatibility with MSVC, patch by Morten Ofstad
llvm-svn: 17218
2004-10-25 18:45:16 +00:00
Chris Lattner
84b07af401 Do not use variable sized arrays in C++, they are non-portable. Patch
contributed by Morten Ofstad

llvm-svn: 17217
2004-10-25 18:44:14 +00:00
John Criswell
3c14d0815c Removed dead method, printPHICopiesForSuccessors().
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
Chris Lattner
ec942219ad Patch to support MSVC better, contributed by Morten Ofstad
llvm-svn: 17215
2004-10-25 18:40:47 +00:00
Chris Lattner
1cef20bac1 Patch to support MSVC, contributed by Morten Ofstad
llvm-svn: 17214
2004-10-25 18:40:08 +00:00
John Criswell
259f362897 Modified switch generation so that only the phi values associated with the
destination basic block are copied.

llvm-svn: 17212
2004-10-25 18:30:09 +00:00
Nate Begeman
4b5ed899fd Implement more complete and correct codegen for bitfield inserts, as tested
by the recently committed rlwimi.ll test file.  Also commit initial code
for bitfield extract, although it is turned off until fully debugged.

llvm-svn: 17207
2004-10-24 10:33:30 +00:00
Chris Lattner
75772beb3b Fix the previous bug the correct way. This fixes ptrdist/bc
llvm-svn: 17201
2004-10-24 04:27:59 +00:00
Alkis Evlogimenos
4c30220f3a Make this actually work.
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
a893aad8fb Add ConstantExpr::getSizeOf(Type*).
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Misha Brukman
f8bd6fc901 * Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
* Stop the confusion of using rv and Addr for global addresses: just use rv

llvm-svn: 17195
2004-10-23 23:47:34 +00:00
Misha Brukman
58d9e43fa1 Add BA, BL, and BLA opcodes
llvm-svn: 17193
2004-10-23 20:29:24 +00:00
Misha Brukman
0342392149 * Do not emit IMPLICIT_DEF pseudo-instructions
* Convert register numbers from their opcode value to the real value, e.g.
  PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
  implement ha16() and lo16()

llvm-svn: 17190
2004-10-23 18:28:01 +00:00
Misha Brukman
bd6a01c3ef DForm_1, particularly used by store instructions, needs the immediate operand to
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents

llvm-svn: 17183
2004-10-23 06:08:38 +00:00
Misha Brukman
e4ae05e099 Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.

llvm-svn: 17182
2004-10-23 06:05:49 +00:00
Misha Brukman
5cea06807d The value of the XO field for MFLR and MFCTR is 339, not 399
llvm-svn: 17181
2004-10-23 05:38:55 +00:00
Misha Brukman
39d23c81d4 Remove extraneous blank line
llvm-svn: 17180
2004-10-23 04:59:22 +00:00
Misha Brukman
c660c6c514 Align function arguments in function headers
llvm-svn: 17178
2004-10-23 04:58:32 +00:00
Chris Lattner
9595df9f4e Fix a bug that Brian brought to my attention. This corrects:
Assembler/2004-10-22-BCWriterUndefBug.llx

llvm-svn: 17177
2004-10-23 03:10:23 +00:00
Nate Begeman
91ef127999 Kill casts from integer types to unsigned byte, when the cast was only used
as the shift amount operand to a shift instruction.  This was causing us to
emit unnecessary clear operations for code such as:
int foo(int x) { return 1 << x; }

llvm-svn: 17175
2004-10-23 00:50:23 +00:00
Misha Brukman
cfd8a7eb53 Use cleaner quoting and eliminate blank space
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer
4e31ccbe2e Clean up the output from this makefile so its not verbose.
llvm-svn: 17173
2004-10-22 23:24:39 +00:00
Misha Brukman
2493cb2a2a Adjust rules for building .inc files due to Reid's changes of Makefile.rules
llvm-svn: 17169
2004-10-22 22:16:24 +00:00
Reid Spencer
019621a1ea Adjust to changes in Makefile.rules
llvm-svn: 17167
2004-10-22 21:02:08 +00:00