Commit Graph

27739 Commits

Author SHA1 Message Date
Devang Patel 1a6eaa49fe Implement schedulePasses().
llvm-svn: 31671
2006-11-11 02:22:31 +00:00
Devang Patel db789fb8f2 Implement PassManagerImpl_New::add().
Just add pass into the pass manager queue without processing analysis.

llvm-svn: 31670
2006-11-11 02:06:21 +00:00
Devang Patel 90b05e0bc3 While adding pass into the manager, process Analysis only if it is
required to do so.

llvm-svn: 31669
2006-11-11 02:04:19 +00:00
Devang Patel 2efbad4a72 Remove dead code.
llvm-svn: 31668
2006-11-11 01:56:39 +00:00
Devang Patel 8cad70de14 Code refactoring. Move common code into CommonPassManagerImpl :)
llvm-svn: 31667
2006-11-11 01:51:02 +00:00
Devang Patel a98445962d Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
llvm-svn: 31666
2006-11-11 01:31:05 +00:00
Devang Patel 349170f5da Remove analysis that is not preserved by the pass from AvailableAnalysis.
llvm-svn: 31665
2006-11-11 01:24:55 +00:00
Devang Patel 643676c1f5 Keep track if analysis made available by the pass.
llvm-svn: 31664
2006-11-11 01:10:19 +00:00
Reid Spencer e183ed753f Instruction name changes.
llvm-svn: 31663
2006-11-11 01:04:13 +00:00
Reid Spencer 279a3aefc3 Enable path completion when typing the TESTSUITE= option by allowing the
test directory to precede the test suite name. That is, it will strip off
test/ from TESTSUITE which allows path completion from the command line.

llvm-svn: 31662
2006-11-11 01:02:45 +00:00
Chris Lattner a0a8003f59 disallow preinc of a frameindex. This is not profitable and causes 2-addr
pass to explode.  This fixes a bunch of llc-beta failures on ppc last night.

llvm-svn: 31661
2006-11-11 01:00:15 +00:00
Chris Lattner eabc15c1d8 reduce indentation by using early exits. No functionality change.
llvm-svn: 31660
2006-11-11 00:56:29 +00:00
Devang Patel 6c9f548704 Keep track of analysis required by the passes. Force use of new pass
manager if a pass does not preserve analysis that is used by other
passes.

llvm-svn: 31659
2006-11-11 00:42:16 +00:00
Chris Lattner ffad2166e1 move big chunks of code out-of-line, no functionality change.
llvm-svn: 31658
2006-11-11 00:39:41 +00:00
Chris Lattner e15018b8b7 enable this test, check ppc64 as well.
llvm-svn: 31657
2006-11-11 00:13:07 +00:00
Chris Lattner b314b155ed ppc64 doesn't have lwau, don't attempt to form it.
llvm-svn: 31656
2006-11-11 00:08:42 +00:00
Reid Spencer d185c02007 Allow ENABLE_OPTIMIZED=0 to turn off optimization (turn on debug).
llvm-svn: 31655
2006-11-11 00:00:31 +00:00
Chris Lattner c9fa36d706 implement preinc support for r+i loads on ppc64
llvm-svn: 31654
2006-11-10 23:58:45 +00:00
Chris Lattner d4dee405cb Fix InstCombine/2006-11-10-ashr-miscompile.ll a miscompilation introduced
by the shr -> [al]shr patch.  This was reduced from 176.gcc.

llvm-svn: 31653
2006-11-10 23:38:52 +00:00
Chris Lattner d530a503da This testcase is miscompiled by instcombine, reduced from 176.gcc
llvm-svn: 31652
2006-11-10 23:37:54 +00:00
Evan Cheng 915026cdc3 Add a note.
llvm-svn: 31650
2006-11-10 22:09:17 +00:00
Evan Cheng 5b725a71a9 These are done.
llvm-svn: 31649
2006-11-10 22:03:35 +00:00
Evan Cheng 49683ba236 Don't dag combine floating point select to max and min intrinsics. Those
take v4f32 / v2f64 operands and may end up causing larger spills / restores.
Added X86 specific nodes X86ISD::FMAX, X86ISD::FMIN instead.

This fixes PR996.

llvm-svn: 31645
2006-11-10 21:43:37 +00:00
Chris Lattner 4eac5f59e6 Fix a dag combiner bug exposed by my recent instcombine patch. This fixes
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast

llvm-svn: 31644
2006-11-10 21:37:15 +00:00
Chris Lattner 82a85b66a3 new testcase
llvm-svn: 31643
2006-11-10 21:36:07 +00:00
Devang Patel 0ed477969f s/PassManagerAnalysisHelper/CommonPassManagerImpl
Inherit CommonPassManagerImpl from Pass.

llvm-svn: 31642
2006-11-10 21:33:13 +00:00
Evan Cheng fb44822a98 Fix a bug in SelectScalarSSELoad. Since the load is wrapped in a
SCALAR_TO_VECTOR, even if the hasOneUse() check pass we may end up folding
the load into two instructions. Make sure we check the SCALAR_TO_VECTOR
has only one use as well.

llvm-svn: 31641
2006-11-10 21:23:04 +00:00
Jim Laskey bc60d34748 Must have a frame pointer argument fixed. Now fails on PowerPC.
llvm-svn: 31639
2006-11-10 17:56:29 +00:00
Jim Laskey 11ba2bf721 Must have a frame pointer.
llvm-svn: 31638
2006-11-10 17:51:25 +00:00
Chris Lattner 6c8656a6b1 dform 8/9 are identical to dform 1
llvm-svn: 31637
2006-11-10 17:51:02 +00:00
Reid Spencer 8488eac9d7 This is XFAILed on i[0-9]86 systems not Linux
llvm-svn: 31636
2006-11-10 17:47:28 +00:00
Jim Laskey 0c75372933 Shut up the warning.
llvm-svn: 31635
2006-11-10 14:44:12 +00:00
Evan Cheng 286357480c Fix a potential bug.
llvm-svn: 31634
2006-11-10 09:13:37 +00:00
Evan Cheng 8c9c6d71ed Add implicit def / use operands to MachineInstr.
llvm-svn: 31633
2006-11-10 08:43:01 +00:00
Evan Cheng f5bebe83a5 Add implicit def / use operands to MachineInstr.
llvm-svn: 31632
2006-11-10 08:32:14 +00:00
Evan Cheng 13440b025c When forming a pre-indexed store, make sure ptr isn't the same or is a pred of value being stored. It would cause a cycle.
llvm-svn: 31631
2006-11-10 08:28:11 +00:00
Anton Korobeynikov a1561d4fdf Adding target triple to test
llvm-svn: 31630
2006-11-10 06:59:53 +00:00
Tanya Lattner 1537ecce93 xfail for llvmgcc3
llvm-svn: 31629
2006-11-10 04:53:50 +00:00
Chris Lattner d5e604dbb2 commentate
llvm-svn: 31627
2006-11-10 04:41:34 +00:00
Chris Lattner ce6455489a add an initial cut at preinc loads for ppc32. This is broken for ppc64
(because the 64-bit reg target versions aren't implemented yet), doesn't
support r+r addr modes, and doesn't handle stores, but it works otherwise. :)

This is disabled unless -enable-ppc-preinc is passed to llc for now.

llvm-svn: 31621
2006-11-10 02:08:47 +00:00
Chris Lattner 7a82314782 make this test more interesting
llvm-svn: 31619
2006-11-10 02:04:52 +00:00
Chris Lattner ba7b3673f9 allow ptr_rc to explicitly appear in an instructions operand list, it doesn't
have to be a subpart of a complex operand.

llvm-svn: 31618
2006-11-10 02:01:40 +00:00
Chris Lattner cd436327f1 add note about ugly codegen with preinc
llvm-svn: 31617
2006-11-10 01:33:53 +00:00
Evan Cheng 14140059f0 Use TargetInstrInfo::getNumOperands() instead of MachineInstr::getNumOperands(). In preparation for implicit reg def/use changes.
llvm-svn: 31616
2006-11-10 01:28:43 +00:00
Anton Korobeynikov b9c91c265c Fixing PR990: http://llvm.org/PR990.
This should unbreak csretcc on Linux & mingw targets. Several tests from
llvm-test should be also restored (fftbench, bigfib).

llvm-svn: 31613
2006-11-10 00:48:11 +00:00
Chris Lattner 4e03cb1945 add a note about viterbi
llvm-svn: 31612
2006-11-10 00:23:26 +00:00
Chris Lattner 82928ca290 second patch to fix PR992/993.
llvm-svn: 31610
2006-11-09 23:36:08 +00:00
Chris Lattner 8511bd95f5 new testcases for PR992/993
llvm-svn: 31609
2006-11-09 23:35:01 +00:00
Chris Lattner 924f4fee8b Minimal patch to fix PR992/PR993
llvm-svn: 31608
2006-11-09 23:17:45 +00:00
Reid Spencer 51b07256a3 Post-review changes on conversion instructions.
llvm-svn: 31607
2006-11-09 23:03:26 +00:00
Reid Spencer 2e2740d46a Fix runaway <tt> element and section ordering.
llvm-svn: 31606
2006-11-09 21:48:10 +00:00
Reid Spencer 8a82cc6304 Remove futurisms that won't be in our future.
llvm-svn: 31605
2006-11-09 21:42:14 +00:00
Reid Spencer a89fb18c98 One more time for indentation.
llvm-svn: 31604
2006-11-09 21:18:01 +00:00
Reid Spencer 443460a318 Fix indentation problem starting at GEP.
llvm-svn: 31603
2006-11-09 21:15:49 +00:00
Chris Lattner 5fdbe55979 if lazy compilation is disabled, print an error message and abort if
lazy compilation is ever attempted

llvm-svn: 31602
2006-11-09 19:32:13 +00:00
Chris Lattner 87aee74ccb init ivar
llvm-svn: 31601
2006-11-09 19:31:15 +00:00
Chris Lattner 6dbe06de39 allow clients to indicate that they never want lazy compilation.
llvm-svn: 31600
2006-11-09 19:30:47 +00:00
Evan Cheng 36a8fbf771 PPC supports i32 / i64 pre-inc load / store.
llvm-svn: 31599
2006-11-09 19:11:50 +00:00
Evan Cheng 6878378390 Don't attempt expensive pre-/post- indexed dag combine if target does not support them.
llvm-svn: 31598
2006-11-09 19:10:46 +00:00
Evan Cheng d550248f2c Add a mechanism to specify whether a target supports a particular indexed load / store.
llvm-svn: 31597
2006-11-09 18:56:43 +00:00
Evan Cheng c034f14fbe Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
llvm-svn: 31596
2006-11-09 18:44:21 +00:00
Evan Cheng b15000736c Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
llvm-svn: 31595
2006-11-09 17:55:04 +00:00
Jim Laskey f1606b80f1 Allows debugging llc self hosted.
llvm-svn: 31594
2006-11-09 16:32:26 +00:00
Jim Laskey 97f89b11b3 Merging dwarf info to a single compile unit.
llvm-svn: 31593
2006-11-09 14:52:14 +00:00
Rafael Espindola 5f7ab1b964 implement load effective address similar to the alpha backend
remove lea_addri and the now unused memri addressing mode

llvm-svn: 31592
2006-11-09 13:58:55 +00:00
Jim Laskey 48b21d5024 math.h creates ambiguity
llvm-svn: 31591
2006-11-09 08:26:22 +00:00
Jim Laskey 31890e7e86 math.h for C's sake.
llvm-svn: 31590
2006-11-09 08:05:39 +00:00
Chris Lattner 7275b02ea5 completely revert patrick's enhancement to bugpoint. Though it makes bugpoint
speed up, it sometimes makes it crash on complex bc files, which isn't very nice.


With this, bugpoint can reduce the 176.gcc failure.

llvm-svn: 31589
2006-11-09 06:24:56 +00:00
Chris Lattner f1a1a7ae6f add a new bugpoint mode -llc-safe. This uses LLC for both halves of a
miscompilation.  This is useful for working around GCC+CBE bugs or for handling
programs that CBE doesn't support (e.g. inline asm) when searching for
optimizer bugs.

llvm-svn: 31588
2006-11-09 05:57:53 +00:00
Chris Lattner 1b9633d7f0 silence warnings
llvm-svn: 31587
2006-11-09 05:18:12 +00:00
Chris Lattner 6e2c15c158 Teach ShrinkDemandedConstant how to handle X+C. This implements:
add.ll:test33, add.ll:test34, shift-sra.ll:test2

llvm-svn: 31586
2006-11-09 05:12:27 +00:00
Chris Lattner 92fc0c0651 new testcases
llvm-svn: 31585
2006-11-09 05:11:23 +00:00
Evan Cheng b58e06bc9e getPostIndexedAddressParts change: passes in load/store instead of its loaded / stored VT.
llvm-svn: 31584
2006-11-09 04:29:46 +00:00
Evan Cheng 1698c2999c Remove M_2_ADDR_FLAG.
llvm-svn: 31583
2006-11-09 02:22:54 +00:00
Reid Spencer c6389c10cc Don't run bugpoint if we can't find a misoptimization.
llvm-svn: 31582
2006-11-09 01:47:04 +00:00
Reid Spencer 206d609cdd Print a usage message if too few arguments to program.
llvm-svn: 31581
2006-11-09 00:50:32 +00:00
Reid Spencer e73551303f Add a utility script to find a mis-optimization problem. This sometimes
helps when bugpoint can't find the problem directly because it needs the
set of optimizations that cause the program to fail.

llvm-svn: 31580
2006-11-09 00:26:17 +00:00
Tanya Lattner 01167a7eff Should be xfailed for llvmgcc3
llvm-svn: 31578
2006-11-08 23:26:16 +00:00
Tanya Lattner 8a01d7a820 Should be xfailed for llvmgcc4 and NOT *. * means all platforms regardless of what llvmgcc you use.
llvm-svn: 31577
2006-11-08 23:25:58 +00:00
Evan Cheng c9a4cdc9c9 Added indexed store node and patfrag's.
llvm-svn: 31576
2006-11-08 23:02:11 +00:00
Evan Cheng 7120b9e9c7 Divide select methods into groups by SelectionDAG node opcodes (ISD::ADD,
X86ISD::CMP, etc.) instead of SDNode names (add, x86cmp, etc). We now allow
multiple SDNodes to map to the same SelectionDAG node (e.g. store, indexed
store).

llvm-svn: 31575
2006-11-08 23:01:03 +00:00
Reid Spencer eacb043c0a Ensure we don't regress on reading version 6 bytecode.
llvm-svn: 31574
2006-11-08 21:28:30 +00:00
Reid Spencer c4ecf9ff47 Bump the bytecode version number to 7. Implement upgrade of version 6 and
version 6 bytecode.

llvm-svn: 31573
2006-11-08 21:27:54 +00:00
Evan Cheng 3b3b786f03 Use movl+xchgl instead of pushl+popl.
llvm-svn: 31572
2006-11-08 20:35:37 +00:00
Evan Cheng 6cd0909da7 Match tblegen changes.
llvm-svn: 31571
2006-11-08 20:34:28 +00:00
Evan Cheng d715a2cbfb Always pass the root node to ComplexPattern isel matching function.
llvm-svn: 31570
2006-11-08 20:31:10 +00:00
Evan Cheng 85e54223cd Match more post-indexed ops.
llvm-svn: 31569
2006-11-08 20:27:27 +00:00
Tanya Lattner fd6e54439a Should be xfailed for llvm-gcc3.4
llvm-svn: 31568
2006-11-08 20:16:05 +00:00
Reid Spencer b3aa10f933 Document correct opcodes for post 1.9 release.
llvm-svn: 31566
2006-11-08 20:07:40 +00:00
Reid Spencer 99b21508e6 Update the instruction opcodes for release 1.9
llvm-svn: 31565
2006-11-08 20:06:36 +00:00
Chris Lattner 4f218d56f5 reenable factoring of GEP expressions, being more precise about the
case that it bad to do.

llvm-svn: 31563
2006-11-08 19:42:28 +00:00
Chris Lattner cd62f11227 make this code more efficient by not creating a phi node we are just going to
delete in the first place.  This also makes it simpler.

llvm-svn: 31562
2006-11-08 19:29:23 +00:00
Jim Laskey 61feeb90f9 Remove redundant <cmath>.
llvm-svn: 31561
2006-11-08 19:16:44 +00:00
Chris Lattner a3acfca920 disable this factoring optzn for GEPs for now, this severely pessimizes some
loops.

llvm-svn: 31560
2006-11-08 18:49:31 +00:00
Jim Laskey 7b6fb8048e Make sure <cmath> comes first
llvm-svn: 31559
2006-11-08 18:48:14 +00:00
Jim Laskey 3caa009892 Add backup support for HUGH_VALF.
llvm-svn: 31553
2006-11-08 17:19:29 +00:00
Rafael Espindola 708cb60588 initial implementation of addressing mode 2
TODO: fix lea_addri

llvm-svn: 31552
2006-11-08 17:07:32 +00:00
Jim Laskey 050747fc8c Make it work on Darwin.
llvm-svn: 31551
2006-11-08 16:38:45 +00:00
John Criswell 8ea2e68493 Include llvm/Support/DataTypes.h to define intptr_t.
This fixes the build on OpenBSD and potentially other systems.

llvm-svn: 31550
2006-11-08 15:04:35 +00:00
Jim Laskey 62bbc9ef58 Now can re-enable debug label folding.
llvm-svn: 31549
2006-11-08 14:17:45 +00:00
Jim Laskey ac05d7d084 Wasn't handling case of when machine move labels were undefined.
llvm-svn: 31548
2006-11-08 14:16:39 +00:00
Devang Patel 4e12f86a1b Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.

llvm-svn: 31547
2006-11-08 10:44:40 +00:00
Devang Patel 376fefafb2 Split PassManager_New into PassManager_New and PassManagerImpl_New.
PassManagerImpl_New implements the pass manager.
PassManager_New is the public interface.

llvm-svn: 31546
2006-11-08 10:29:57 +00:00
Devang Patel ca58e3532f Move BasicBlockPassManager_New, FunctionPassManager_New and
ModulePassManager_New class declarations from PassManager.h
to PassManager.cpp

llvm-svn: 31545
2006-11-08 10:05:38 +00:00
Evan Cheng 0303cb9b33 - When performing pre-/post- indexed load/store transformation, do not worry
about whether the new base ptr would be live below the load/store. Let two
  address pass split it back to non-indexed ops.
- Minor tweaks / fixes.

llvm-svn: 31544
2006-11-08 08:30:28 +00:00
Evan Cheng 6072435756 Fixed a minor bug preventing some pre-indexed load / store transformation.
llvm-svn: 31543
2006-11-08 06:56:05 +00:00
Reid Spencer fdff938a7e For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.

llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Reid Spencer 41f6c7cfb2 XFAIL this on Linux until Jim gets Darwin ship shape.
llvm-svn: 31541
2006-11-08 06:43:16 +00:00
Chris Lattner 71cd8cf478 now that we handle single mbb loops better, one branch is allowed
llvm-svn: 31540
2006-11-08 06:42:42 +00:00
Chris Lattner 6aee6f2a93 regenerate
llvm-svn: 31539
2006-11-08 05:58:47 +00:00
Chris Lattner 60f1f194f9 Fix a bug noticed by Emil Mikulic.
llvm-svn: 31538
2006-11-08 05:58:11 +00:00
Evan Cheng d48f7dd250 Fix a obscure post-indexed load / store dag combine bug.
llvm-svn: 31537
2006-11-08 02:38:55 +00:00
Chris Lattner a801fcedd3 Refactor all the addressing mode selection stuff into the isel lowering
class, where it can be used for preinc formation.

llvm-svn: 31536
2006-11-08 02:15:41 +00:00
Chris Lattner 6a5a4f85d3 correct the (currently unused) pattern for lwzu.
llvm-svn: 31535
2006-11-08 02:13:12 +00:00
Chris Lattner 543572716b preincrement case we miss. xfail until we catch it
llvm-svn: 31534
2006-11-08 01:44:35 +00:00
Devang Patel d65e9e9fd8 Beautify.
llvm-svn: 31533
2006-11-08 01:31:28 +00:00
Reid Spencer 97c5fa4607 Fix the section headings.
llvm-svn: 31532
2006-11-08 01:18:52 +00:00
Reid Spencer 59b6b7d9e4 For PR950:
Early commit of the documentation for new conversion instructions for
easier review.

llvm-svn: 31531
2006-11-08 01:11:31 +00:00
Chris Lattner bf3b57f221 optimize single MBB loops better. In particular, produce:
LBB1_57:        #bb207.i
        movl 72(%esp), %ecx
        movb (%ecx,%eax), %cl
        movl 80(%esp), %edx
        movb %cl, 1(%edx,%eax)
        incl %eax
        cmpl $143, %eax
        jne LBB1_57     #bb207.i
        jmp LBB1_64     #cond_next255.i

intead of:

LBB1_57:        #bb207.i
        movl 72(%esp), %ecx
        movb (%ecx,%eax), %cl
        movl 80(%esp), %edx
        movb %cl, 1(%edx,%eax)
        incl %eax
        cmpl $143, %eax
        je LBB1_64      #cond_next255.i
        jmp LBB1_57     #bb207.i

This eliminates a branch per iteration of the loop.  This hurted PPC
particularly, because the extra branch meant another dispatch group for each
iteration of the loop.

llvm-svn: 31530
2006-11-08 01:03:21 +00:00
Devang Patel 800596d60e Beautify.
Clarify comments.

llvm-svn: 31529
2006-11-08 00:19:31 +00:00
Devang Patel 3c8eb62560 Update new pass managers to use PassManagerAnalysisHelper API.
llvm-svn: 31526
2006-11-07 22:56:50 +00:00
Devang Patel cc85563dd9 Derive new pass managers from PassManagerAnalysisHelper.
llvm-svn: 31525
2006-11-07 22:44:55 +00:00
Chris Lattner 4967f6ddea scalarrepl should not split the two elements of the vsiidx array:
int func(vFloat v0, vFloat v1) {
        int ii;
        vSInt32 vsiidx[2];
        vsiidx[0] = _mm_cvttps_epi32(v0);
        vsiidx[1] = _mm_cvttps_epi32(v1);
        ii = ((int *) vsiidx)[4];
        return ii;
}

This fixes Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll

llvm-svn: 31524
2006-11-07 22:42:47 +00:00
Chris Lattner 2d7a5d9b5d scalarrepl should not split the two elements of the vsiidx array:
int func(vFloat v0, vFloat v1) {
	int ii;
	vSInt32 vsiidx[2];
	vsiidx[0] = _mm_cvttps_epi32(v0);
	vsiidx[1] = _mm_cvttps_epi32(v1);
	ii = ((int *) vsiidx)[4];
	return ii;
}

llvm-svn: 31523
2006-11-07 22:42:29 +00:00
Devang Patel f68a34908d Introduce PassManagerAnalysisHelper.
llvm-svn: 31522
2006-11-07 22:35:17 +00:00
Devang Patel c290c8a2c8 Add PassManager_New.
llvm-svn: 31521
2006-11-07 22:23:34 +00:00
Evan Cheng 847adeebb8 New test case.
llvm-svn: 31520
2006-11-07 22:18:14 +00:00
Evan Cheng 922e191116 Fixed a bug which causes x86 be to incorrectly match
shuffle v, undef, <2, ?, 3, ?>
to movhlps
It should match to unpckhps instead.

Added proper matching code for
shuffle v, undef, <2, 3, 2, 3>

llvm-svn: 31519
2006-11-07 22:14:24 +00:00
Devang Patel 85da9b73b7 Fix comment.
llvm-svn: 31518
2006-11-07 22:04:53 +00:00
Devang Patel 05e1a970f3 Add ModulePassManager_New.
llvm-svn: 31517
2006-11-07 22:03:15 +00:00
Jim Laskey 21d4d895ca Accidently reran commit.
llvm-svn: 31516
2006-11-07 21:58:55 +00:00
Devang Patel 0c2012ffb3 Add FunctionPassManager_New.
llvm-svn: 31515
2006-11-07 21:49:50 +00:00
Jim Laskey a919ba9abd Missed a label map, reverting till covered.
llvm-svn: 31514
2006-11-07 21:37:31 +00:00
Devang Patel 6e5a113923 Add BasicBlockPassManager_New.
llvm-svn: 31513
2006-11-07 21:31:57 +00:00
Jim Laskey 21ce53b94e Missed a label map, reverting till covered.
llvm-svn: 31512
2006-11-07 20:53:05 +00:00
Andrew Lenharth 30b254e48b Optionally allow comparison operations from affect DSGraphs
llvm-svn: 31511
2006-11-07 20:39:05 +00:00
Andrew Lenharth 1ee904e503 Allow loop detection during debug in forwarding nodes, and revert auxcall patch as it make 176.gcc untenable
llvm-svn: 31510
2006-11-07 20:36:02 +00:00
Andrew Lenharth cb902c4942 debug type for DSA TD
llvm-svn: 31509
2006-11-07 20:35:11 +00:00
Jim Laskey 6ea4fae838 1. Add a pass to fold debug label instructions so a debug info client can detect
empty ranges.

2. Reorg how MachineDebugInfo maintains changes to debug labels.

3. Have dwarf writer use debug label info to simplify scopes and source line
coorespondence.

4. Revert the merging of compile units until I can get the bugs ironed out.

llvm-svn: 31507
2006-11-07 19:33:46 +00:00
Chris Lattner be7033b346 add a note from viterbi
llvm-svn: 31506
2006-11-07 18:30:21 +00:00
Chris Lattner b18177bfab Enable improved spilling costs by default. This speeds up viterbi on x86
by 40%, FreeBench/fourinarow by 20%, and many other programs 10-25%.

On PPC, this speeds up fourinarow by 18%, and probably other things as well.

llvm-svn: 31504
2006-11-07 18:04:58 +00:00
Andrew Lenharth 0e9c437f0b Got a little ahead of myself here
llvm-svn: 31502
2006-11-07 16:40:19 +00:00
Andrew Lenharth 3b18505d9f Fix this test
llvm-svn: 31501
2006-11-07 16:32:55 +00:00
Jim Laskey 6a9342166b Use correct value for float HUGH_VAL.
llvm-svn: 31500
2006-11-07 12:25:45 +00:00
Evan Cheng b391e3509a Added target hook for post-indexed memory ops transformation.
llvm-svn: 31499
2006-11-07 09:04:16 +00:00
Evan Cheng 60c6846d21 Add post-indexed load / store transformations.
llvm-svn: 31498
2006-11-07 09:03:05 +00:00
Reid Spencer eb5bbd1ac8 Make some corrections to this test case.
llvm-svn: 31497
2006-11-07 07:58:02 +00:00
Reid Spencer 17ea4ec127 Ignore the Output dir.
llvm-svn: 31496
2006-11-07 07:34:56 +00:00
Reid Spencer 3b1d1b5262 Add a test case for making sure gdb can get a stack trace with our debug
information.

llvm-svn: 31495
2006-11-07 07:31:37 +00:00
Chris Lattner 01d039cc44 Add a new llcbeta option. This speeds up viterbi from 12.34 to 8.76s on
X86.  If happy, I'll enable this by default.

llvm-svn: 31493
2006-11-07 07:18:40 +00:00
Reid Spencer 78c84a0328 Unbreak X86/ELF Debugging. Somehow this line got lost in Jim's cleanup.
llvm-svn: 31492
2006-11-07 06:36:36 +00:00
Tanya Lattner 2bf78ba87d Bumping version number
llvm-svn: 31491
2006-11-07 05:31:00 +00:00
Chris Lattner 5a2bc5c71b wrong bug #
llvm-svn: 31488
2006-11-07 04:12:03 +00:00
Chris Lattner 94c231f453 Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.
The low part goes in the first operand of expandop, not the second one.

llvm-svn: 31487
2006-11-07 04:11:44 +00:00
Chris Lattner e553746e49 new testcase
llvm-svn: 31486
2006-11-07 04:11:14 +00:00
Chris Lattner d94477f6c9 fix encoding of BLR
llvm-svn: 31485
2006-11-07 01:51:50 +00:00
Chris Lattner 5d14eac21d emit TIED_TO correctly
llvm-svn: 31484
2006-11-07 01:27:55 +00:00
Chris Lattner f62138e792 Mark predicate operands as such in operand info.
llvm-svn: 31483
2006-11-06 23:53:31 +00:00
Chris Lattner 8ceabde4cb Add a new operand flag to mark which operand is the first predicate operand
of an M_PREDICATED instruction.

llvm-svn: 31482
2006-11-06 23:53:08 +00:00
Chris Lattner 33f5a51020 simplify the way operand flags and constraints are handled, making it easier
to extend.

llvm-svn: 31481
2006-11-06 23:49:51 +00:00
Chris Lattner 8a9c91de33 recognize ppc's blr instruction as predicated
llvm-svn: 31480
2006-11-06 21:44:54 +00:00
Chris Lattner 27f894f3bf add a flag so that predicated instructions can be recognized by branch
folding

llvm-svn: 31479
2006-11-06 21:44:17 +00:00
Evan Cheng f24d15f969 Remove dead code; added a missing null ptr check.
llvm-svn: 31478
2006-11-06 21:33:46 +00:00
Chris Lattner 7e885005ba add a note
llvm-svn: 31477
2006-11-06 21:26:49 +00:00
Reid Spencer c7ed09bef7 Fix a small bug noticed on code review.
llvm-svn: 31476
2006-11-06 18:47:14 +00:00
Jim Laskey 235aeef9e1 Tab interferes with uniqueness.
NOTE: There doesn't seem to be consistency for whether a leading tab
is present in a section heading.

llvm-svn: 31475
2006-11-06 16:23:59 +00:00
Jim Laskey f39064c2de D'oh - reversed logic.
llvm-svn: 31474
2006-11-06 13:20:29 +00:00
Evan Cheng eb99bd736a Add comment.
llvm-svn: 31473
2006-11-06 08:14:30 +00:00
Chris Lattner 698c900b0c regenerate
llvm-svn: 31472
2006-11-05 23:28:58 +00:00
Chris Lattner 569531ebbd xfail this for the 1.9 release. This is PR984.
llvm-svn: 31471
2006-11-05 23:27:36 +00:00
Jim Laskey e4ccfffcb9 Try again.
llvm-svn: 31470
2006-11-05 21:21:20 +00:00
Jim Laskey ef4ded399e Misfire.
llvm-svn: 31469
2006-11-05 21:20:04 +00:00
Jim Laskey 413521a150 Up to date for 1.9
llvm-svn: 31468
2006-11-05 21:00:54 +00:00
Reid Spencer 4e94f8da33 Get LLVMGCCARCH right regardless of the llvm-gcc version being used.
llvm-svn: 31467
2006-11-05 20:10:16 +00:00
Reid Spencer 5e5a05e753 Fix a problem in the the last patch that subverts error message printing.
llvm-svn: 31466
2006-11-05 19:53:08 +00:00
Jeff Cohen 852ed3dc89 Remove obsolete VS project.
llvm-svn: 31465
2006-11-05 19:38:20 +00:00
Jeff Cohen 7d6f3db3e2 Unbreak VC++ build.
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Reid Spencer 35b927e0d3 Fix a bug in the last patch and convert to && instead of & for logical expr.
llvm-svn: 31463
2006-11-05 19:26:37 +00:00
Reid Spencer 6088f8af16 Implement the -enabled-cbe-printf-a feature.
llvm-svn: 31462
2006-11-05 17:09:41 +00:00
Reid Spencer d549edc2cc Add a -disable-cbe-printf-a option so that the output of the C Backend
stands a chance of being compiled with a non C99 C compiler. The default
is enabled so you must specifically disable this feature if you want the
CBE output compiled with an older C compiler.

llvm-svn: 31461
2006-11-05 17:08:18 +00:00
Nick Lewycky 67bad5adbc Remove commented line from earlier debugging.
llvm-svn: 31460
2006-11-05 14:19:40 +00:00
Evan Cheng 33157700d9 Added pre-indexed store support.
llvm-svn: 31459
2006-11-05 09:31:14 +00:00
Evan Cheng 1a1e23eff7 Added getIndexedStore.
llvm-svn: 31458
2006-11-05 09:30:09 +00:00
Reid Spencer 0f43e646f8 Don't check variables before they are set.
Be careful about blanks when checking LLVMGCC variable.

llvm-svn: 31455
2006-11-05 03:58:44 +00:00
Jim Laskey 01c55a50b1 Live local variables are being dropped because the begin or end labels marking
their scope are being deleted.  Workaround is to widen scope to full function.

llvm-svn: 31454
2006-11-04 10:48:07 +00:00
Evan Cheng fd2c5dd806 Changes to use operand constraints to process two-address instructions.
llvm-svn: 31453
2006-11-04 09:44:31 +00:00
Evan Cheng 1bc4e8a26a Move to operand constraints for two-address instructions.
llvm-svn: 31452
2006-11-04 09:42:53 +00:00
Evan Cheng 3cb5bf721c Clean up some code.
llvm-svn: 31451
2006-11-04 09:40:23 +00:00
Chris Lattner 2959789c92 encode BLR predicate info for the JIT
llvm-svn: 31450
2006-11-04 05:42:48 +00:00
Chris Lattner 6be726048e Go through all kinds of trouble to mark 'blr' as having a predicate operand
that takes a register and condition code.  Print these pieces of BLR the
right way, even though it is currently set to 'always'.

Next up: get the JIT encoding right, then enhance branch folding to produce
predicated blr for simple examples.

llvm-svn: 31449
2006-11-04 05:27:39 +00:00
Chris Lattner ed07f23c52 Parse PredicateOperand's. When an instruction takes one, have the generated
isel fill in the instruction operands with the 'execute always' value
automatically.

llvm-svn: 31448
2006-11-04 05:12:02 +00:00
Chris Lattner 1faa9097c7 First steps to getting PredicateOperand's to work. This handles instruction
and pat pattern definitions.  Codegen is not right for them yet.

llvm-svn: 31444
2006-11-04 01:35:50 +00:00
Reid Spencer de6bce9e02 Okay, need a pattern before and after the cast pattern.
llvm-svn: 31443
2006-11-04 01:11:19 +00:00
Reid Spencer 260a93abc2 Allow the regular expression to be extended by a parameter.
llvm-svn: 31442
2006-11-04 00:58:39 +00:00
Reid Spencer c533824a9e For PR950:
A little script to return 1 if it encounters any of the cast instructions
on the stdin.

llvm-svn: 31441
2006-11-04 00:49:52 +00:00
Reid Spencer 6291ddca16 Add a note about warnings from the GNU ld 2.16.X linker.
llvm-svn: 31440
2006-11-04 00:33:42 +00:00
Evan Cheng 51733ed4a3 Fixed some spiller bugs exposed by the recent two-address code changes. Now
there may be other def(s) apart from the use&def two-address operand. We need
to check if the register reuse for a use&def operand may conflicts with another
def. Provide a mean to recover from the conflict if it is detected when the
defs are processed later.

llvm-svn: 31439
2006-11-04 00:21:55 +00:00
Chris Lattner c8a68d08c3 Describe PPC predicates, which are a pair of CR# and condition.
llvm-svn: 31438
2006-11-03 23:53:25 +00:00
Chris Lattner 4905d2c5b4 initial steps to getting the predicate on PPC::BLR right.
llvm-svn: 31437
2006-11-03 23:52:18 +00:00
Chris Lattner 4fcc04a32a remove dead var
llvm-svn: 31436
2006-11-03 23:50:15 +00:00
Chris Lattner 9ac6442db6 remove dead/redundant vars
llvm-svn: 31435
2006-11-03 23:48:56 +00:00
Chris Lattner eb7128465d remove redundant/dead vars
llvm-svn: 31434
2006-11-03 23:47:20 +00:00
Chris Lattner 895d199348 remove dead vars
llvm-svn: 31433
2006-11-03 23:46:45 +00:00
Chris Lattner 7982de167f eliminate need for the NumMIOperands field in Operand.
llvm-svn: 31432
2006-11-03 23:45:17 +00:00
Andrew Lenharth 0ebb0b03e6 The wrong parameter was being tested to deturmine i32 vs i64
llvm-svn: 31431
2006-11-03 22:45:50 +00:00
Andrew Lenharth 95a1c854d3 add a regression for memmove
llvm-svn: 31430
2006-11-03 22:45:09 +00:00
Chris Lattner 2048373e71 add a note
llvm-svn: 31429
2006-11-03 22:27:39 +00:00
Chris Lattner 2d242aba18 this started failing due to Reid's changes in the bc format. insulate it
from future changes.

llvm-svn: 31428
2006-11-03 22:01:15 +00:00
Chris Lattner ea2abe2384 Fix BasicAA/2006-11-03-BasicAAVectorCrash.ll by handling out-of-range
vector accesses like we handle out-of-range array accesses.

llvm-svn: 31427
2006-11-03 21:58:48 +00:00
Chris Lattner 67af941db1 new testcase
llvm-svn: 31426
2006-11-03 21:58:14 +00:00
Reid Spencer 7b7ab9c59a Make the huge_val test run a C++ program not C
llvm-svn: 31422
2006-11-03 19:49:16 +00:00
Chris Lattner bb3ea2a437 this will work better
llvm-svn: 31419
2006-11-03 19:15:55 +00:00
Chris Lattner a35f8c16c4 Fix the build on xcode < 2.4
llvm-svn: 31417
2006-11-03 19:13:59 +00:00
Reid Spencer 128ae10611 Add a check to see if HUGE_VAL is sane or not.
llvm-svn: 31416
2006-11-03 18:04:08 +00:00
Andrew Lenharth 01a4a5d07e Split the External and Intrinsic handling into seperate functions. This
improves readability of the call handling code significantly, as well as
makes it clear which parts are hacky (externals) and which parts are good
(call handling).

No functionality change.

llvm-svn: 31415
2006-11-03 17:43:19 +00:00
Evan Cheng 9456dd8b81 Fix comments.
llvm-svn: 31414
2006-11-03 07:31:32 +00:00
Evan Cheng 1dfd26a151 Rename
llvm-svn: 31413
2006-11-03 07:21:16 +00:00
Reid Spencer 52f958741a Remove dead variable. Fix 80 column violations.
llvm-svn: 31412
2006-11-03 03:30:34 +00:00
Rafael Espindola 4ece5c04f4 revert previous patch
llvm-svn: 31411
2006-11-03 03:08:28 +00:00
Evan Cheng 357017f4a9 Added DAG combiner transformation to generate pre-indexed loads.
llvm-svn: 31410
2006-11-03 03:06:21 +00:00
Evan Cheng c176f038b9 Added isPredecessor.
llvm-svn: 31409
2006-11-03 03:05:24 +00:00
Evan Cheng 299022d514 Proper check for two-addressness.
llvm-svn: 31408
2006-11-03 03:04:46 +00:00
Evan Cheng 76326b0540 Added a target specific hook to check whether / how a node can be transformed
into a pair of base / offset nodes for pre-indexed load / store ops.

llvm-svn: 31407
2006-11-03 03:04:06 +00:00
Evan Cheng fe70c79e67 Add isPredecessor to check whether a node is another's predecessor.
llvm-svn: 31406
2006-11-03 03:02:18 +00:00
Evan Cheng 94b29e9e91 Dead code.
llvm-svn: 31405
2006-11-03 02:08:41 +00:00
Reid Spencer 3056ebeb22 Remove unused variable.
llvm-svn: 31404
2006-11-03 01:58:30 +00:00
Reid Spencer 03c6038226 Remove an unused variable.
llvm-svn: 31403
2006-11-03 01:48:30 +00:00
Chris Lattner 16e05c378d silence warning
llvm-svn: 31402
2006-11-03 01:45:13 +00:00
Reid Spencer 6b1fe928b1 Remove some dead code.
llvm-svn: 31401
2006-11-03 01:44:51 +00:00
Rafael Espindola 38b162c1d2 add createCFGSimplificationPass to ARMTargetMachine::addInstSelector
llvm-svn: 31400
2006-11-03 01:39:25 +00:00
Rafael Espindola f16dbf697a assert.h -> cassert
llvm-svn: 31399
2006-11-03 01:38:14 +00:00
Chris Lattner 62e2cad6b8 remove dead code
llvm-svn: 31398
2006-11-03 01:34:58 +00:00
Chris Lattner cd7b92251d silence warning
llvm-svn: 31397
2006-11-03 01:28:29 +00:00
Reid Spencer 5314f04de5 Don't write out variables that are never used.
llvm-svn: 31396
2006-11-03 01:28:12 +00:00
Chris Lattner 799b96be08 silence warning
llvm-svn: 31395
2006-11-03 01:19:31 +00:00
Chris Lattner b974b0a3e1 silence warnings.
llvm-svn: 31394
2006-11-03 01:18:29 +00:00
Chris Lattner de2f0906e4 silence warning
llvm-svn: 31393
2006-11-03 01:13:15 +00:00
Chris Lattner 71f55131d4 silence warnings
llvm-svn: 31392
2006-11-03 01:11:05 +00:00
Reid Spencer b795c434e5 Make sample project -pedantic clean.
llvm-svn: 31391
2006-11-03 00:09:53 +00:00
Reid Spencer c4e5de55a2 Make Stacker Runtime -pedantic clean.
llvm-svn: 31390
2006-11-03 00:08:08 +00:00
Reid Spencer 8bfe22d08d Make llvm2cpp -pedantic clean.
llvm-svn: 31389
2006-11-03 00:05:16 +00:00
Reid Spencer c0b1dec892 Make CBackend -pedantic clean.
llvm-svn: 31388
2006-11-03 00:00:57 +00:00
Reid Spencer cb67d99001 Make CodeGen libs -pedantic clean.
llvm-svn: 31387
2006-11-02 23:56:21 +00:00
Rafael Espindola a1fde82b6b #include <assert.h>
llvm-svn: 31386
2006-11-02 23:48:53 +00:00
Chris Lattner 2de0910a1b fix a bug reid noticed
llvm-svn: 31385
2006-11-02 23:39:53 +00:00
Jim Laskey 15d166ba8f 1. Hash not quite right for DIEValues.
2. Not going to use Usage (no significant benefit.)

llvm-svn: 31384
2006-11-02 21:48:18 +00:00
Reid Spencer 6152ad000c Revert last patch which causes tblgen to segfault (why, I'm not sure).
llvm-svn: 31383
2006-11-02 21:07:40 +00:00
Reid Spencer 9ec8a7555b Remove unused variable.
llvm-svn: 31382
2006-11-02 20:55:40 +00:00
Reid Spencer 2a82686563 For PR786:
Remove unused variables.

llvm-svn: 31381
2006-11-02 20:46:16 +00:00
Reid Spencer de46e48420 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00