Commit Graph

28427 Commits

Author SHA1 Message Date
Chris Lattner ade1f6894d Fix regression on 400.perlbench last night.
llvm-svn: 32486
2006-12-12 18:41:03 +00:00
Rafael Espindola 67d1c8ae0e more general matching of the MVN instruction
llvm-svn: 32484
2006-12-12 17:10:13 +00:00
Jim Laskey 7c3cab9ddc Honor the command line specification for machine type.
llvm-svn: 32483
2006-12-12 16:07:33 +00:00
Rafael Espindola 470d61d82c don't use "ordinary" addressing mode 1 when mvn is appropriate
llvm-svn: 32482
2006-12-12 14:03:29 +00:00
Jim Laskey 095e6f3044 Reduce number of instructions to load 64-bit constants.
llvm-svn: 32481
2006-12-12 13:23:43 +00:00
Reid Spencer 13bc5d7b57 Fix numerous inferred casts.
llvm-svn: 32479
2006-12-12 09:18:51 +00:00
Reid Spencer 1ac0ab0850 Get even more accurate on the casting.
llvm-svn: 32478
2006-12-12 09:17:50 +00:00
Reid Spencer 41cb269a2b Fix the casting for the computation of the Malloc size.
llvm-svn: 32477
2006-12-12 09:17:08 +00:00
Evan Cheng 0c0b78c18e Expand formal arguments and call arguments recursively: e.g. f64 -> i64 -> 2 x i32.
llvm-svn: 32476
2006-12-12 07:27:38 +00:00
Reid Spencer ca104e80ee Don't create usless casts for same-bith-width floating point casts.
llvm-svn: 32475
2006-12-12 05:38:50 +00:00
Chris Lattner 2f96e7d241 fit in 80 cols
llvm-svn: 32474
2006-12-12 05:22:21 +00:00
Chris Lattner 080881614d this can only be fptrunc.
llvm-svn: 32473
2006-12-12 05:21:51 +00:00
Chris Lattner 6801f02557 This case isn't needed with recent changes to ConstantInt::get
llvm-svn: 32472
2006-12-12 05:19:46 +00:00
Chris Lattner 0c537dae55 split up inttoptr from ptrtoint handling, the cases aren't similar at all.
llvm-svn: 32471
2006-12-12 05:18:19 +00:00
Chris Lattner b9e41f5559 the operand of a bitcast is always the right size, just emit it in place.
llvm-svn: 32470
2006-12-12 05:14:13 +00:00
Reid Spencer b341b0861d Change inferred getCast into specific getCast. Passes all tests.
llvm-svn: 32469
2006-12-12 05:05:00 +00:00
Chris Lattner 6e5fe376ec Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.ll
llvm-svn: 32468
2006-12-12 04:24:41 +00:00
Chris Lattner f65ce046db new testcase for pr1045
llvm-svn: 32467
2006-12-12 04:24:17 +00:00
Chris Lattner 6ba11fbd75 Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
and legalizer separated like they currently are, I don't see a way to handle
this xform.

llvm-svn: 32466
2006-12-12 04:18:56 +00:00
Chris Lattner b7524b6d0e make this code more aggressive about turning store fpimm into store int imm.
This is not sufficient to fix X86/store-fp-constant.ll

llvm-svn: 32465
2006-12-12 04:16:14 +00:00
Chris Lattner f929e81d37 This should check for darwin literal sections as well.
llvm-svn: 32464
2006-12-12 03:59:46 +00:00
Chris Lattner 49b090ed61 teach scev to analyze X*4|1 like X*4+c. This allows us to produce:
LBB1_1: #bb
        movdqa (%esi), %xmm2
        movaps %xmm2, %xmm3
        punpcklbw %xmm0, %xmm3
        movaps %xmm3, %xmm4
        punpcklwd %xmm0, %xmm4
        cvtdq2ps %xmm4, %xmm4
        mulps %xmm1, %xmm4
        movaps %xmm4, (%edi)
        leal 1(,%eax,4), %ebx
        shll $4, %ebx
        punpckhwd %xmm0, %xmm3
        cvtdq2ps %xmm3, %xmm3
        mulps %xmm1, %xmm3
        movaps %xmm3, (%edx,%ebx)
        leal 2(,%eax,4), %ebx
        shll $4, %ebx
        punpckhbw %xmm0, %xmm2
        movaps %xmm2, %xmm3
        punpcklwd %xmm0, %xmm3
        cvtdq2ps %xmm3, %xmm3
        mulps %xmm1, %xmm3
        movaps %xmm3, (%edx,%ebx)
        leal 3(,%eax,4), %ebx
        shll $4, %ebx
        punpckhwd %xmm0, %xmm2
        cvtdq2ps %xmm2, %xmm2
        mulps %xmm1, %xmm2
        movaps %xmm2, (%edx,%ebx)
        addl $64, %edi
        incl %eax
        addl $16, %esi
        cmpl %ecx, %eax
        jne LBB1_1      #bb

instead of:

LBB1_1: #bb
        movdqa (%esi), %xmm2
        movaps %xmm2, %xmm3
        punpcklbw %xmm0, %xmm3
        movaps %xmm3, %xmm4
        punpcklwd %xmm0, %xmm4
        cvtdq2ps %xmm4, %xmm4
        mulps %xmm1, %xmm4
        movaps %xmm4, (%edi)
        leal 1(,%eax,4), %ebx
        shll $4, %ebx
        punpckhwd %xmm0, %xmm3
        cvtdq2ps %xmm3, %xmm3
        mulps %xmm1, %xmm3
        movaps %xmm3, (%edx,%ebx)
        leal 2(,%eax,4), %ebx
        shll $4, %ebx
        punpckhbw %xmm0, %xmm2
        movaps %xmm2, %xmm3
        punpcklwd %xmm0, %xmm3
        cvtdq2ps %xmm3, %xmm3
        mulps %xmm1, %xmm3
        movaps %xmm3, (%edx,%ebx)
        leal 3(,%eax,4), %ebx
        shll $4, %ebx
        punpckhwd %xmm0, %xmm2
        cvtdq2ps %xmm2, %xmm2
        mulps %xmm1, %xmm2
        movaps %xmm2, (%edx,%ebx)
        addl $64, %edi
        incl %eax
        addl $16, %esi
        cmpl %ecx, %eax
        jne LBB1_1      #bb

for a testcase.

llvm-svn: 32463
2006-12-12 02:26:09 +00:00
Reid Spencer 38dbe1ca14 Tidy up a bit.
llvm-svn: 32462
2006-12-12 01:32:02 +00:00
Reid Spencer 595cef1650 Generate the correct cast opcode for constant expressions.
llvm-svn: 32461
2006-12-12 01:31:37 +00:00
Reid Spencer 3c49edcaa1 Change inferred cast creation calls to more specific cast creations.
llvm-svn: 32460
2006-12-12 01:17:41 +00:00
Rafael Espindola 9fa0a26808 use MVN to handle small negative constants
llvm-svn: 32459
2006-12-12 01:03:11 +00:00
Reid Spencer aabebbbf2e Don't bother upgrading this.
llvm-svn: 32458
2006-12-12 00:53:31 +00:00
Reid Spencer 56521c48fe Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
to the createIntegerCast and createFPCast for CastInst instructions.

llvm-svn: 32457
2006-12-12 00:51:07 +00:00
Reid Spencer 7e93347b57 Implement createIntegerCast and createFPCast factory methods for handling
integer and floating point cast creation. createIntegerCast generates
ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or
FPTrunc.

llvm-svn: 32456
2006-12-12 00:49:44 +00:00
Reid Spencer b7e5180d3c Fix PR1040:
Don't rebuild llvm-config if none of the library dependencies changed.

llvm-svn: 32455
2006-12-12 00:43:38 +00:00
Rafael Espindola 1bbe581d0f add mvn
llvm-svn: 32454
2006-12-12 00:37:38 +00:00
Reid Spencer 2075374e28 Fix the BitCastUnion type for 32-bit targets.
llvm-svn: 32453
2006-12-12 00:11:08 +00:00
Rafael Espindola eb3e8d75df add note
llvm-svn: 32452
2006-12-11 23:56:10 +00:00
Chris Lattner f4646a7e54 Another step forward in PPC64 JIT support: we now no-longer need stubs
emitted for external globals in PPC64-JIT-PIC mode (which is good because
we didn't handle them before!).

This also fixes a bug handling the picbase delta, which we would get wrong
in some cases.

llvm-svn: 32451
2006-12-11 23:22:45 +00:00
Reid Spencer 2d73fe7fad Create the cast constant expression that was read instead of attempting
to infer the cast from its operand and type. This fixes:
test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll

llvm-svn: 32450
2006-12-11 23:20:20 +00:00
Reid Spencer 840cc9e1a9 Test case for ensuring correct reading back of cast constant expressions.
llvm-svn: 32449
2006-12-11 23:19:53 +00:00
Chris Lattner b1f3157638 getInstrItineraryData shouldn't copy the itineraries
llvm-svn: 32448
2006-12-11 21:42:55 +00:00
Reid Spencer 3db7d3764e Fix constant folding of FP->int due to cut & paste error in last commit.
llvm-svn: 32447
2006-12-11 21:27:28 +00:00
Reid Spencer 0fdba212a7 Add a test for constant folding of bitcast to/from floating point.
llvm-svn: 32446
2006-12-11 21:25:10 +00:00
Reid Spencer 025ca90b7a Provide a test for int<->float and long<->double bitcasts.
llvm-svn: 32445
2006-12-11 20:40:28 +00:00
Reid Spencer b943555716 Implement correct bitcast of int<->float and long<->double by using a
union to perform the bitcast.

llvm-svn: 32444
2006-12-11 20:39:15 +00:00
Evan Cheng 3432ab97c1 Re-apply changes that were backed out and fix a naughty typo.
llvm-svn: 32442
2006-12-11 19:27:14 +00:00
John Criswell b3b285185f It seems the llvm::OStream class does not handle stream manipulators.
For now, just grab the stream and perform the output on it directly.

llvm-svn: 32441
2006-12-11 19:15:36 +00:00
Chris Lattner e9a203c4e5 Revert changes that broke oggenc on ppc
llvm-svn: 32440
2006-12-11 18:53:38 +00:00
Jim Laskey 2b136a73bd Missing opcode.
llvm-svn: 32439
2006-12-11 18:45:56 +00:00
Chris Lattner 4d1da16ec1 Implement correct constant folding of bitcast. This implements
Transforms/ConstProp/bitcast.ll and fixes
SingleSource/Regression/C/2003-10-12-GlobalVarInitializers

llvm-svn: 32438
2006-12-11 18:30:27 +00:00
Chris Lattner 2a39f55e24 constant folding of bitcast is broken.
llvm-svn: 32437
2006-12-11 18:29:07 +00:00
Jim Laskey e95909a4ef Layout proper frame for ppc64.
llvm-svn: 32436
2006-12-11 18:10:54 +00:00
Reid Spencer d436ea5cb4 Provide a script that can track down which optimization pass causes
different code to be produced between two llvm builds that differe slightly.
This is useful in tracking down mis-optimization bugs.

llvm-svn: 32435
2006-12-11 17:42:12 +00:00
Evan Cheng 218369881f Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type.
llvm-svn: 32434
2006-12-11 17:25:19 +00:00
Evan Cheng f4bec95b58 f32 / f64 node is expanded to one i32 / i64 node.
llvm-svn: 32433
2006-12-11 06:50:04 +00:00
Evan Cheng f6b01fdb48 Clean up some bad code.
llvm-svn: 32432
2006-12-11 06:25:26 +00:00
Nate Begeman 8e20c760fa Move something that should be in the dag combiner from the legalizer to the
dag combiner.

llvm-svn: 32431
2006-12-11 02:23:46 +00:00
Nate Begeman e8da58b3f9 Properly mangles symbol table names
Supports constant pools
Supports relocations to jump tables
Supports relocations within the data segment (global = address of global)
Allocates memory in a non-hacky for all non-code objects.

llvm-svn: 32430
2006-12-11 02:20:45 +00:00
Nate Begeman 5c56215232 Add a default relocation type, and allow clients to set the ConstantVal
field after creation.

llvm-svn: 32429
2006-12-11 02:19:29 +00:00
Chris Lattner 8410beb12d fix typo
llvm-svn: 32428
2006-12-11 02:16:58 +00:00
Chris Lattner a11aa92e6b 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 e810140c4b trunc to integer, not to FP.
llvm-svn: 32426
2006-12-11 01:17:00 +00:00
Chris Lattner e9c430c5d8 the xform is done by scalarrepl not the code generator.
llvm-svn: 32425
2006-12-11 01:03:32 +00:00
Chris Lattner 6727f2a5f9 this is done
llvm-svn: 32424
2006-12-11 01:01:03 +00:00
Chris Lattner feeb9c7be5 Evan implemented the machineinstr improvements.
The rot example works if the type is cast to ubyte.

Move sroa examples together and upgrade them to HEAD syntax.

llvm-svn: 32423
2006-12-11 00:44:03 +00:00
Chris Lattner 23f4b68f7e implement promotion of unions containing two packed types of the same width.
This implements Transforms/ScalarRepl/union-packed.ll

llvm-svn: 32422
2006-12-11 00:35:08 +00:00
Chris Lattner ac57792106 new testcase
llvm-svn: 32421
2006-12-11 00:34:27 +00:00
Chris Lattner b2f5973867 clarify some comments, simplify some checks, fix:
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll

llvm-svn: 32420
2006-12-11 00:12:31 +00:00
Chris Lattner a571d211ae testcase for a regression introduced by the recent cast patch
llvm-svn: 32419
2006-12-11 00:12:07 +00:00
Chris Lattner 216c3028e6 * Eliminate calls to CastInst::createInferredCast.
* Add support for promoting unions with fp values in them.  This produces
   our new int<->fp bitcast instructions, implementing
   Transforms/ScalarRepl/union-fp-int.ll

As an example, this allows us to compile this:

union intfloat { int i; float f; };
float invsqrt(const float arg_x) {
    union intfloat x = { .f = arg_x };
    const float xhalf = arg_x * 0.5f;
    x.i = 0x5f3759df - (x.i >> 1);
    return x.f * (1.5f - xhalf * x.f * x.f);
}

into:

_invsqrt:
        movss 4(%esp), %xmm0
        movd %xmm0, %eax
        sarl %eax
        movl $1597463007, %ecx
        subl %eax, %ecx
        movd %ecx, %xmm1
        mulss LCPI1_0, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        mulss %xmm1, %xmm0
        subss %xmm0, %xmm2
        movl 8(%esp), %eax
        mulss %xmm2, %xmm1
        movss %xmm1, (%eax)
        ret

instead of:

_invsqrt:
        subl $4, %esp
        movss 8(%esp), %xmm0
        movss %xmm0, (%esp)
        movl (%esp), %eax
        movl $1597463007, %ecx
        sarl %eax
        subl %eax, %ecx
        movl %ecx, (%esp)
        mulss LCPI1_0, %xmm0
        movss (%esp), %xmm1
        mulss %xmm1, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        subss %xmm0, %xmm2
        mulss %xmm2, %xmm1
        movl 12(%esp), %eax
        movss %xmm1, (%eax)
        addl $4, %esp
        ret

llvm-svn: 32418
2006-12-10 23:56:50 +00:00
Chris Lattner a4121981ce new testcase
llvm-svn: 32417
2006-12-10 23:52:28 +00:00
Reid Spencer 4372571d3d Regenerate.
llvm-svn: 32416
2006-12-10 23:29:19 +00:00
Anton Korobeynikov 3b7c257cae 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
Chris Lattner 6161452b67 make statistics and timing info print even if the JIT'd program calls exit
instead of returning from main.

llvm-svn: 32414
2006-12-10 19:01:52 +00:00
Jim Laskey 6af2220815 Reverting until finding the cause of secondary bugs.
llvm-svn: 32413
2006-12-10 13:09:42 +00:00
Jim Laskey 04c832d4ab __PPC64CompilationCallback code was allowing registers to be clobbered by stub.
llvm-svn: 32412
2006-12-10 12:13:31 +00:00
Chris Lattner ad796fadf7 fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
static dtors.

llvm-svn: 32411
2006-12-10 07:40:46 +00:00
Reid Spencer bef61c5781 Don't bother with setting the path before running llvm-gcc4, it doesn't
need it like llvm-gcc3 did.

llvm-svn: 32410
2006-12-10 04:56:38 +00:00
Reid Spencer d8c16d39b6 For PR739:
Define a DESTDIR variable and use it to define the various install
locations. This allows DESTDIR to be overridden on the command line.

llvm-svn: 32409
2006-12-10 04:09:19 +00:00
Rafael Espindola b8ada08b26 .align is in bits
.comm is in bytes
:-(

llvm-svn: 32408
2006-12-10 02:53:14 +00:00
Rafael Espindola b313efb0cd 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
Rafael Espindola 839bcb4af2 use a . instead of a % in the grep expression
llvm-svn: 32406
2006-12-09 21:21:06 +00:00
Reid Spencer 04f47b9e8d Regenerate.
llvm-svn: 32405
2006-12-09 19:41:25 +00:00
Reid Spencer 2126b0518e Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool.

llvm-svn: 32404
2006-12-09 19:40:41 +00:00
Reid Spencer 2fee8a99e2 Fix the run line and make this test more specific.
llvm-svn: 32403
2006-12-09 19:39:56 +00:00
Reid Spencer 1d3dbd34b7 Add a check to catch an incorrect upgrade.
llvm-svn: 32402
2006-12-09 19:35:43 +00:00
Reid Spencer 1719061bfd Regenerate.
llvm-svn: 32400
2006-12-09 16:57:22 +00:00
Reid Spencer 87644df5bc When upgrading cast to bool to a setne, generate icmp ne instead.
llvm-svn: 32399
2006-12-09 16:56:55 +00:00
Reid Spencer b558b57e75 Too soon to commit, revert.
llvm-svn: 32397
2006-12-09 05:13:50 +00:00
Reid Spencer 0606d15530 New test cases for regressions in the SetCC -> ICmp patch.
llvm-svn: 32396
2006-12-09 05:13:01 +00:00
Reid Spencer 68acb20000 Allow the input of the test program to be specified.
Don't generate the reference output for each comparison.

llvm-svn: 32395
2006-12-09 04:42:33 +00:00
Evan Cheng 4eee72471c Preliminary soft float support.
llvm-svn: 32394
2006-12-09 02:42:38 +00:00
Evan Cheng e107a8b872 Added option -soft-float to generate SW fp library calls instead of fp instructions.
llvm-svn: 32393
2006-12-09 02:41:30 +00:00
Bill Wendling b0629487d8 Fixed some formatting.
llvm-svn: 32392
2006-12-09 01:35:43 +00:00
Bill Wendling c78ae26ff8 Another example of using the llvm IO streams.
llvm-svn: 32391
2006-12-09 01:27:51 +00:00
Bill Wendling 2b52dc1753 Add documentation for how to use the new LLVM streams.
llvm-svn: 32390
2006-12-09 01:20:34 +00:00
Devang Patel 984698ac24 Analysis resolver now manages AnalysisImpls for the given patch.
llvm-svn: 32389
2006-12-09 01:11:34 +00:00
Devang Patel 9d759b8854 Top level pass manager keeps track of other managers, so this can be
removed now.

llvm-svn: 32388
2006-12-09 00:09:12 +00:00
Devang Patel 64619bec14 Use analysis resolver to find the info.
llvm-svn: 32387
2006-12-09 00:07:38 +00:00
Devang Patel fa971cda8b Do not drop ImmutablePasses on the floor.
llvm-svn: 32386
2006-12-08 23:57:43 +00:00
Devang Patel d440cd92a5 Set AnalysisResolver for the passes when they are inserted into
pass manager queuer.

llvm-svn: 32385
2006-12-08 23:53:00 +00:00
Devang Patel 5fdac4070b Add AnalysisResolver_New.
llvm-svn: 32384
2006-12-08 23:52:04 +00:00
Devang Patel 9bdf7d46f6 Add AnalysisResolver_New. It is a replacement for existing
AnalysisResolver.

llvm-svn: 32383
2006-12-08 23:28:54 +00:00
Devang Patel af1fca5f10 Keep track of other pass managers, that are not directly managed by
top level manager. Use this info to findAnalysisPass.

llvm-svn: 32382
2006-12-08 23:11:43 +00:00
Devang Patel 272908dcf2 Implement top level FunctionPassManager::run(Function &F)
llvm-svn: 32381
2006-12-08 22:57:48 +00:00
Devang Patel 5bbeb49130 Do not keep yet another list of pass managers in PassManagerImpl_New.
Use one provided by toplevel manager.

llvm-svn: 32380
2006-12-08 22:47:25 +00:00
Devang Patel df6c9ae208 Remove unused schedulePass() parameter.
llvm-svn: 32379
2006-12-08 22:34:02 +00:00
Devang Patel e31049fed5 Remove unused getAnalysisPass and getAnalysisPassFromManager
llvm-svn: 32378
2006-12-08 22:32:32 +00:00
Devang Patel 640c5bba77 Implement PMTopLevel::findAnalysisPass() and
PMDataManager::findAnalysisPass()

llvm-svn: 32377
2006-12-08 22:30:11 +00:00
Rafael Espindola d12d2250a7 %progbits not @progbits
llvm-svn: 32376
2006-12-08 22:06:02 +00:00
Reid Spencer efe5c862f1 Incorporate any changes in the successor blocks into the result of
MarkAliveBlocks.

llvm-svn: 32375
2006-12-08 21:52:01 +00:00
Rafael Espindola 735a27246c add missing &&
llvm-svn: 32374
2006-12-08 21:43:02 +00:00
Rafael Espindola 94f29f129d add \"aw\",@progbits" to ctors and dtors
llvm-svn: 32373
2006-12-08 21:24:58 +00:00
Chris Lattner 8c9969ac03 Change the implementation of statistic to not need destructors at all.
Instead, the stat info is printed when llvm_shutdown() is called.
These also don't need static ctors, but getting rid of them is uglier:
still investigating.  This reduces the number of static dtors in llvm from
~1400 to ~750.

llvm-svn: 32372
2006-12-08 20:00:42 +00:00
Devang Patel 0e29e29cc5 During runOnModule() do initialization and finalization.
llvm-svn: 32371
2006-12-08 19:04:09 +00:00
Devang Patel 1929089ea2 Reuse code. Directly use runOnFunction().
llvm-svn: 32370
2006-12-08 19:03:05 +00:00
Reid Spencer 5c09dd74b9 Add the -ldl library option.
llvm-svn: 32369
2006-12-08 18:58:38 +00:00
Devang Patel 1f65368a82 Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
llvm-svn: 32368
2006-12-08 18:57:16 +00:00
Andrew Lenharth 60be4775ff test packed struct codegen on x86
llvm-svn: 32367
2006-12-08 18:54:15 +00:00
Evan Cheng 78cb08d082 Move findTiedToSrcOperand to TargetInstrDescriptor.
llvm-svn: 32366
2006-12-08 18:45:48 +00:00
Andrew Lenharth ae5733ba6a packed initializers too in the test
llvm-svn: 32365
2006-12-08 18:45:38 +00:00
Rafael Espindola 87f4382163 fix truncstorei1
llvm-svn: 32364
2006-12-08 18:41:21 +00:00
Andrew Lenharth 23469cca1a feature test for packed structs
llvm-svn: 32363
2006-12-08 18:36:24 +00:00
Andrew Lenharth 2d189ff8cd Hopefully these are the regenerated files
llvm-svn: 32362
2006-12-08 18:07:09 +00:00
Andrew Lenharth dcb3c978c4 Packed Structures
llvm-svn: 32361
2006-12-08 18:06:16 +00:00
Andrew Lenharth 78f9389d79 A backwards compatible bc format for packed structs
llvm-svn: 32360
2006-12-08 17:50:05 +00:00
Reid Spencer 3c63db7138 This test needs to be upgraded.
llvm-svn: 32359
2006-12-08 17:39:49 +00:00
Reid Spencer ed644771ea For PR950:
Add a test for a regression in combining of ICmp instructions.

llvm-svn: 32358
2006-12-08 17:38:55 +00:00
Andrew Lenharth 8df88e2cc9 Packed Structure Definitions (docs)
llvm-svn: 32357
2006-12-08 17:13:00 +00:00
Evan Cheng bb4e6d4d12 Proper fix for PR1037: to determine is a VR is a modref, check 1) whether it is
tied to another oeprand, 2) whether is is being tied to by another operand. So
the destination operand of a two-address MI can be correctly identified.

llvm-svn: 32354
2006-12-08 08:02:34 +00:00
Evan Cheng 4539418a7b findTiedToSrcOperand() changed.
llvm-svn: 32353
2006-12-08 07:59:51 +00:00
Evan Cheng b5f1c22e94 Use MI's TargetInstrDescriptor.
llvm-svn: 32352
2006-12-08 07:57:56 +00:00
Chris Lattner 5040f58ae4 Fix a bug introduced by the streams patch. DEBUG code was made unconditional.
llvm-svn: 32351
2006-12-08 05:41:26 +00:00
Reid Spencer 196d517667 Regenerate.
llvm-svn: 32350
2006-12-08 05:06:28 +00:00
Chris Lattner 060750b731 this warning is obsolete with llvmgcc3 being gone
llvm-svn: 32349
2006-12-08 05:03:54 +00:00
Chris Lattner 09fecf9a47 this is an initial patch to switch the ppc64 jit over to working in PIC mode,
which allows the code to be above the 2G marker.  We still need to JIT emit
dyld stubs to support external, weak, common, etc globals, but that will
happen tomorrow.

llvm-svn: 32348
2006-12-08 04:54:03 +00:00
Chris Lattner 4d475f6e6e add a note
llvm-svn: 32347
2006-12-08 02:01:32 +00:00
Devang Patel e958559204 BasicBlockPassManager_New::runOnFunction()
Do initialization and finalization.

llvm-svn: 32346
2006-12-08 01:38:28 +00:00
Devang Patel 475c453c00 doInitialization and doFinalization for BasicBlockPassManager_New
llvm-svn: 32345
2006-12-08 00:59:05 +00:00
Devang Patel 17ad096dd8 Reimplement removeDeadPasses().
llvm-svn: 32344
2006-12-08 00:37:52 +00:00
Andrew Lenharth 085cfdbfdc Simplify a bit
llvm-svn: 32343
2006-12-07 23:55:55 +00:00
Devang Patel bc03f13b75 set Last User.
llvm-svn: 32342
2006-12-07 23:55:10 +00:00
Chris Lattner 13535c2d93 fix incorrect encoding of rldicr, used by ppc64 function stubs, etc.
llvm-svn: 32341
2006-12-07 23:44:07 +00:00
Bill Wendling 30c0f3367c Don't use <sstream> in Streams.h but <iosfwd> instead.
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Devang Patel 4c36e6bee0 Maintain level(or depth) of pass manager in pass manager food chain.
llvm-svn: 32339
2006-12-07 23:24:58 +00:00
Devang Patel 1d6267cac3 New method, PMDataManager::collectRequiredAnalysisPasses()
llvm-svn: 32338
2006-12-07 23:05:44 +00:00
Rafael Espindola 265fa68bd8 fix alignment
llvm-svn: 32337
2006-12-07 22:38:06 +00:00
Chris Lattner d9f04e4875 Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64
llvm-svn: 32336
2006-12-07 22:36:47 +00:00
Chris Lattner f843356150 new testcase
llvm-svn: 32335
2006-12-07 22:36:14 +00:00
Devang Patel 4949fe01f1 When new pass manager is created, initialize available analysis info
of existing manager at the same level. Otherwise, such info may be
considered as available, which not true.

llvm-svn: 32334
2006-12-07 22:34:21 +00:00
Bill Wendling 9bfb1e1f29 What should be the last unnecessary <iostream>s in the library.
llvm-svn: 32333
2006-12-07 22:21:48 +00:00
Devang Patel f4805ce89a PMDataManager does not maintain LastUser info.
llvm-svn: 32332
2006-12-07 22:17:09 +00:00
Chris Lattner a9a817dc7d fix CodeGen/PowerPC/2006-12-07-LargeAlloca.ll on ppc64
llvm-svn: 32331
2006-12-07 22:15:58 +00:00
Chris Lattner 0cd35b2884 new testcase
llvm-svn: 32330
2006-12-07 22:15:20 +00:00
Devang Patel 17bff0dbdc Make current pass info available _after_ removing info that is not
preserved.

llvm-svn: 32329
2006-12-07 22:09:36 +00:00
Devang Patel 642c1437cf Add TODOs
llvm-svn: 32328
2006-12-07 21:58:50 +00:00
Devang Patel 28bbcbed4f Fix thinko.
llvm-svn: 32327
2006-12-07 21:44:12 +00:00
Devang Patel 31217aff9b Top level manages schedule the pass immediately at the time of insertion.
llvm-svn: 32326
2006-12-07 21:32:57 +00:00
Devang Patel abcd1d38ed Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.

llvm-svn: 32325
2006-12-07 21:27:23 +00:00
Devang Patel de124185fa Reimplement schedulePass interface. Move it into PMTopLevelManager.
llvm-svn: 32324
2006-12-07 21:10:57 +00:00
Devang Patel b3900320c6 While initializing AvailableAnalysis info, make ImmutablePasses available
immediately.

llvm-svn: 32323
2006-12-07 21:02:08 +00:00
Devang Patel e0eb9d8e31 Add ImmutablePass into the list of info managed by top level pass
manager.

llvm-svn: 32322
2006-12-07 20:51:18 +00:00
Bill Wendling 355fc5ad50 Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling 22e978a736 Removing even more <iostream> includes.
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Devang Patel 2e169c37ea If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first.

llvm-svn: 32319
2006-12-07 20:03:49 +00:00
Devang Patel f9d96b934d Pass Managers themselves do not invalidate any analysis info.
llvm-svn: 32318
2006-12-07 19:57:52 +00:00
Devang Patel f3827bc21d Add a handle to the top level pass manager in PMDataManager.
llvm-svn: 32317
2006-12-07 19:54:15 +00:00
Devang Patel a1514cbdea Cosmetic markers to divide code in separate chunks.
llvm-svn: 32316
2006-12-07 19:39:39 +00:00
Devang Patel e9976aa91d s/noteDownAvailableAnalysis/recordAvailableAnalysis
While recording available analysis, include interfaces implemented.

llvm-svn: 32315
2006-12-07 19:33:53 +00:00
Devang Patel f33f3ebd14 Add PMTopLevelManager. It is not used yet.
llvm-svn: 32314
2006-12-07 19:21:29 +00:00
Devang Patel 8f677cecaa RequiredAnalysis support is buggy and not used at the moment so remove
the code. Add TODO note.

llvm-svn: 32313
2006-12-07 18:47:25 +00:00
Devang Patel a6b6dcbb1b s/clearAnalysis/initializeAnalysisInfo/g
llvm-svn: 32312
2006-12-07 18:41:09 +00:00
Devang Patel dbe4a1eef2 s/CommonPassManagerImpl/PMDataManager/g
llvm-svn: 32311
2006-12-07 18:36:24 +00:00
Rafael Espindola 219a796475 make sure that we don't use a common symbol if a section was specified
llvm-svn: 32310
2006-12-07 18:33:58 +00:00
Devang Patel 6fea285c82 Add overview of pass manager.
llvm-svn: 32309
2006-12-07 18:23:30 +00:00
Andrew Lenharth 76a61eb054 Be sure to grab weak functions too, and make implicit defs comments
llvm-svn: 32308
2006-12-07 17:39:14 +00:00
Andrew Lenharth 2997019c62 Copy ARM's weak symbol test
llvm-svn: 32307
2006-12-07 17:37:54 +00:00
Reid Spencer 581a07a34d This now passes on Linux/x86
llvm-svn: 32306
2006-12-07 16:28:32 +00:00
Reid Spencer e44aa812b4 Revision 1.83 causes PR1037.
Reverted.

llvm-svn: 32305
2006-12-07 16:21:19 +00:00
Reid Spencer 7485a167a7 Regenerate.
llvm-svn: 32303
2006-12-07 04:23:03 +00:00
Reid Spencer fc9ca55b6a Create an option to turn off generation of fcmp instructions while still
allowing integer setxx instructions to be converted to icmp.

llvm-svn: 32302
2006-12-07 04:22:23 +00:00
Reid Spencer bee1306634 Manually convert this to new assembly.
llvm-svn: 32301
2006-12-07 04:20:23 +00:00
Reid Spencer fcb0dd3a0f Provide a getOpcode() method on CmpInst to ensure the opcode is returned
as the right type. Use this to shorten some code.

llvm-svn: 32300
2006-12-07 04:18:31 +00:00
Evan Cheng c41ed4e0e1 Initialize {Min|Max}CSFrameIndex properly.
llvm-svn: 32299
2006-12-07 02:25:34 +00:00
Bill Wendling f3baad3ee1 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner d8e7451dc3 Fix i64 uint_to_fp on ppc64
llvm-svn: 32297
2006-12-07 01:24:16 +00:00
Evan Cheng e312c152d2 MI keeps a ptr of TargetInstrDescriptor, use it.
llvm-svn: 32296
2006-12-07 01:21:59 +00:00
Evan Cheng 7074cbd449 getOperandConstraint returns -1 if the operand does have the specific constraint. This bug was causing excessive spills.
llvm-svn: 32295
2006-12-07 00:46:04 +00:00
Jim Laskey 9a86d6c10b Ignoring the upper 32 bits of a 64 bit constant is not a good thing.
llvm-svn: 32294
2006-12-06 22:47:14 +00:00
Chris Lattner 43c0eb839c implement sextinreg i8->i64 and i16->i64
llvm-svn: 32293
2006-12-06 21:46:13 +00:00
Jim Laskey 7fb08347ea Failing linux.
llvm-svn: 32292
2006-12-06 21:36:07 +00:00
Chris Lattner 9472eb83c3 fix another sradi encoding bug. This fixes Olden/health with the ppc64 jit.
llvm-svn: 32291
2006-12-06 21:35:10 +00:00
Reid Spencer b8cf1ff83c Always pass "true" to isMaxValue(bool) because we know the type is LongTy.
llvm-svn: 32290
2006-12-06 21:27:07 +00:00
Reid Spencer de09dea742 Adjust to new ConstantIntegral interface for Max/Min tests.
llvm-svn: 32289
2006-12-06 20:45:15 +00:00
Reid Spencer 4ae56f3086 Update ConstantIntegral Max/Min tests for new interface.
llvm-svn: 32288
2006-12-06 20:39:57 +00:00
Reid Spencer e51700983a For PR950:
Remove the getMaxValue and getMinValue functions from ConstantIntegral.
They don't make sense for a signless type. Also, for isMaxValue and
isMinValue, have the caller provided the signedness rather than obtaining
it from the constant's type.

llvm-svn: 32287
2006-12-06 20:30:17 +00:00
Reid Spencer b95504d8f5 Fix some 80 col violations.
llvm-svn: 32286
2006-12-06 20:28:46 +00:00
Chris Lattner aeadac88ea fix the jit encoding of sradi, simplify the MDForm1 description.
llvm-svn: 32285
2006-12-06 20:02:54 +00:00
Chris Lattner 1fa392dbfa add relocation support for ppc64 branches.
llvm-svn: 32284
2006-12-06 19:40:04 +00:00
Devang Patel e06e9fdf0b Detemplatize the Statistic class.
llvm-svn: 32283
2006-12-06 19:00:27 +00:00
Chris Lattner 5bbf770764 merge the Statistic and StatisticBase classes, eliminating virtual methods
and eliminating #includes from the Statistic.h file.

llvm-svn: 32282
2006-12-06 18:20:44 +00:00
Chris Lattner 7c779fcad4 add #include
llvm-svn: 32281
2006-12-06 18:19:53 +00:00
Chris Lattner f06bb658a8 add missing #include
llvm-svn: 32280
2006-12-06 18:14:47 +00:00
Chris Lattner 700b873130 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00