Commit Graph

15937 Commits

Author SHA1 Message Date
Chris Lattner
c9dcf28955 teach the g5 hazard recognizer about update loads. This fixes
Ptrdist/anagram among others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31708 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 20:11:06 +00:00
Chris Lattner
c2e6801cc7 remove redundant code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 01:10:12 +00:00
Nick Lewycky
bf63734a1b Cute example from Chris Lattner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 00:23:28 +00:00
Bill Wendling
b39a55a2e7 Initialize some pointers to quiet the compiler (when doing build_gcc
builds).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-12 11:10:39 +00:00
Jim Laskey
dfc55885e2 Make sure stack link is set in 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 22:22:07 +00:00
Reid Spencer
0288d18bb6 Remvoe a do-nothing else block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 20:27:49 +00:00
Reid Spencer
a07d5b9164 Make an assert comment match the tested assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 20:07:59 +00:00
Chris Lattner
a94a203f34 implement proper PPC64 prolog/epilog codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 19:05:28 +00:00
Reid Spencer
4952143236 For PR998:
Fix an infinite loop in the Linker and a few other assorted link problems.

Patch contributed by Scott Michel. Thanks, Scott!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 11:54:25 +00:00
Jim Laskey
4bfd1e9b43 Running with frame pointers prevented debugging, external probes and
potentially some system calls/exception handling from working.  TOS must always
link to previous frame.  This is a short term workaround until alloca scheme is
reworked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 10:21:58 +00:00
Evan Cheng
5cd3e9f4b7 Add implicit use / def operands to created MI's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 10:21:44 +00:00
Evan Cheng
3ba433a7e8 Add methods to add implicit def use operands to a MI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 10:20:02 +00:00
Evan Cheng
490ce1ea6f Add all implicit defs to FP_REG_KILL mi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 07:19:36 +00:00
Chris Lattner
5b3bbc7cd7 allow the offset of a preinc'd load to be the low-part of a global. This
produces this clever code:

_millisecs:
        lis r2, ha16(_Time.1182)
        lwzu r3, lo16(_Time.1182)(r2)
        lwz r2, 4(r2)
        addic r4, r2, 1
        addze r3, r3
        blr

instead of this:

_millisecs:
        lis r2, ha16(_Time.1182)
        la r3, lo16(_Time.1182)(r2)
        lwz r2, lo16(_Time.1182)(r2)
        lwz r3, 4(r3)
        addic r4, r3, 1
        addze r3, r2
        blr

for:

long %millisecs() {
        %tmp = load long* %Time.1182            ; <long> [#uses=1]
        %tmp1 = add long %tmp, 1                ; <long> [#uses=1]
        ret long %tmp1
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 04:53:30 +00:00
Chris Lattner
d181c0120c Mark operands as symbol lo instead of imm32 so that they print lo(x) around
globals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 04:51:36 +00:00
Devang Patel
f8af6f0ec1 Implement schedulePasses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:22:31 +00:00
Devang Patel
fcb2d940a0 Implement PassManagerImpl_New::add().
Just add pass into the pass manager queue without processing analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:06:21 +00:00
Devang Patel
893a5a6815 While adding pass into the manager, process Analysis only if it is
required to do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:04:19 +00:00
Devang Patel
f13dc1b9e8 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:56:39 +00:00
Devang Patel
e253385b10 Code refactoring. Move common code into CommonPassManagerImpl :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:51:02 +00:00
Devang Patel
85d344b0c6 Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:31:05 +00:00
Devang Patel
14d6581a73 Remove analysis that is not preserved by the pass from AvailableAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:24:55 +00:00
Devang Patel
b852616255 Keep track if analysis made available by the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:10:19 +00:00
Chris Lattner
41e53fd39b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:00:15 +00:00
Chris Lattner
9f1794ea58 reduce indentation by using early exits. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 00:56:29 +00:00
Devang Patel
a363a0bdef 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 00:42:16 +00:00
Chris Lattner
448f219fed move big chunks of code out-of-line, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31658 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 00:39:41 +00:00
Chris Lattner
f6edf4dcf0 ppc64 doesn't have lwau, don't attempt to form it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 00:08:42 +00:00
Chris Lattner
94e509caea implement preinc support for r+i loads on ppc64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 23:58:45 +00:00
Chris Lattner
de2b6605ba Fix InstCombine/2006-11-10-ashr-miscompile.ll a miscompilation introduced
by the shr -> [al]shr patch.  This was reduced from 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 23:38:52 +00:00
Evan Cheng
484c7a1295 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 22:09:17 +00:00
Evan Cheng
a8d39be75b These are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31649 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 22:03:35 +00:00
Evan Cheng
8ca29326e1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 21:43:37 +00:00
Chris Lattner
734c91d250 Fix a dag combiner bug exposed by my recent instcombine patch. This fixes
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31644 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 21:37:15 +00:00
Devang Patel
37a84c7d8b s/PassManagerAnalysisHelper/CommonPassManagerImpl
Inherit CommonPassManagerImpl from Pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 21:33:13 +00:00
Evan Cheng
d6373bcd82 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 21:23:04 +00:00
Chris Lattner
6a944e2592 dform 8/9 are identical to dform 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31637 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 17:51:02 +00:00
Evan Cheng
50b3b50cd0 Fix a potential bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 09:13:37 +00:00
Evan Cheng
438f7bc67c Add implicit def / use operands to MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 08:43:01 +00:00
Evan Cheng
a7ff64d608 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31631 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 08:28:11 +00:00
Chris Lattner
1e7aa5c209 commentate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31627 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 04:41:34 +00:00
Chris Lattner
4eab71497d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 02:08:47 +00:00
Chris Lattner
26ddb506ec add note about ugly codegen with preinc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 01:33:53 +00:00
Evan Cheng
171d09ea53 Use TargetInstrInfo::getNumOperands() instead of MachineInstr::getNumOperands(). In preparation for implicit reg def/use changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 01:28:43 +00:00
Anton Korobeynikov
df78611726 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 00:48:11 +00:00
Chris Lattner
578d2df84b add a note about viterbi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31612 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 00:23:26 +00:00
Chris Lattner
08ff1480ff second patch to fix PR992/993.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 23:36:08 +00:00
Chris Lattner
a9d709d51a Minimal patch to fix PR992/PR993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 23:17:45 +00:00
Chris Lattner
9cab56d59e if lazy compilation is disabled, print an error message and abort if
lazy compilation is ever attempted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31602 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 19:32:13 +00:00
Chris Lattner
3d6e33d2a3 init ivar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 19:31:15 +00:00