Commit Graph

3498 Commits

Author SHA1 Message Date
Anton Korobeynikov
d0b82b301d Refactoring of formal parameter flags. Enable properly use of
zext/sext/aext stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 16:25:09 +00:00
Anton Korobeynikov
6a143590b3 Cleanup: make SetCounter an instance variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 08:25:02 +00:00
Evan Cheng
83060c544b Avoid combining indexed load further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35005 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 08:07:03 +00:00
Anton Korobeynikov
a6199c87c2 Fix DWARF debugging information on x86/Linux and (hopefully)
Mingw32/Cygwin targets. This fixes PR978


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 02:47:57 +00:00
Evan Cheng
caddd590f7 Minor bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 21:58:15 +00:00
Devang Patel
0f54dcbf07 Now LoopStrengthReduce is a LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 21:14:09 +00:00
Chris Lattner
edf2e8da25 big endian 32-bit systems (e.g. ppc32) want to return the high reg first, not
the lo-reg first.  This is fallout from my ppc calling conv change yesterday,
it fixes test/ExecutionEngine/2003-05-06-LivenessClobber.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 20:01:06 +00:00
Anton Korobeynikov
fb269cf3e7 Small eye-candy: use asciz directive everywhere, where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 19:25:02 +00:00
Evan Cheng
87f8bf65dd If target decides to create an emergency spill slot, make sure it's closest to SP or frame pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 10:02:38 +00:00
Evan Cheng
b74a3e6fda Register scavenger is now capable of scavenging. It spills a register whose use of furthest away to make it available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34964 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 10:01:25 +00:00
Anton Korobeynikov
0db79d86de Enumerate SDISel formal parameter attributes. Make use of new
enumeration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 06:10:33 +00:00
Jeff Cohen
ca5183d445 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:00:42 +00:00
Chris Lattner
b654176cb4 fold away addc nodes when we know there cannot be a carry-out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:40:38 +00:00
Chris Lattner
bcf2484450 generalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34910 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:08:45 +00:00
Chris Lattner
91153686f0 canonicalize constants to the RHS of addc/adde. If nothing uses the carry out of
addc, turn it into add.

This allows us to compile:

long long test(long long A, unsigned B) {
  return (A + ((long long)B << 32)) & 123;
}

into:

_test:
        movl $123, %eax
        andl 4(%esp), %eax
        xorl %edx, %edx
        ret

instead of:
_test:
        xorl %edx, %edx
        movl %edx, %eax
        addl 4(%esp), %eax   ;; add of zero
        andl $123, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:03:15 +00:00
Chris Lattner
175415e116 eliminate some ops if they have an undef RHS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:01:46 +00:00
Reid Spencer
d7f3de655b Remove unneeded header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34903 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:41:04 +00:00
Chris Lattner
8b2d42c949 Fix CodeGen/Generic/fpowi-promote.ll and PR1239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 23:43:21 +00:00
Chris Lattner
a9569f10de Add an expand action for ISD label which just deletes the label.
This "fixes" PR1238.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34890 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 19:21:38 +00:00
Evan Cheng
a7288df62d Only propagate IsKill if the last use is a kill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 06:32:37 +00:00
Nate Begeman
af80638869 http://llvm.org/bugs/show_bug.cgi?id=1237
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 06:18:18 +00:00
Evan Cheng
a16d4429e4 Watch out for cases like this:
entry (0x8b056f0, LLVM BB @0x8b01b30, ID#0):
Live Ins: %r0 %r1 %r2 %r3
        %reg1032 = tMOVrr %r3<kill>
        %reg1033 = tMOVri8 1
        %reg1034 = tMOVri8 0
        tCMPi8 %reg1029<kill>, 0
        tBcc mbb<entry,0x8b06a10>, 0
    Successors according to CFG: 0x8b06980 0x8b06a10

entry (0x8b06980, LLVM BB @0x8b01b30, ID#12):
    Predecessors according to CFG: 0x8b056f0
        %reg1036 = tMOVrr %reg1034<kill>
    Successors according to CFG: 0x8b06a10

entry (0x8b06a10, LLVM BB @0x8b01b30, ID#13):
    Predecessors according to CFG: 0x8b056f0 0x8b06980
        %reg1024<dead> = tMOVrr %reg1030<kill>
        ...

reg1030 and r1 have already been joined. When reg1024 and reg1030 are joined,
r1 live range from function entry to the tMOVrr instruction are dead. Eliminate
r1 from the livein set of the entry BB, not the BB where the copy is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 02:18:00 +00:00
Evan Cheng
5de3b7f351 Mark dead def as unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 10:43:16 +00:00
Evan Cheng
7b466d0481 Dead live-in detection bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 10:41:15 +00:00
Evan Cheng
6b448092bf - Keep track all def and uses of stack slot available in register.
- Available value use may be deleted (e.g. noop move).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 08:52:00 +00:00
Evan Cheng
c3dd314b78 Invalidate last use of a reused register if the use is a deleted noop copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34839 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 05:41:42 +00:00
Jim Laskey
0102ca8f5a Emit eh filter info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34805 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 20:26:43 +00:00
Jim Laskey
59e8434a85 Collect eh filter info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34804 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 20:25:32 +00:00
Jim Laskey
0b4711bd94 Lower eh filter intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34802 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 20:24:30 +00:00
Evan Cheng
a81a5ab357 Delete register scavenger when done with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34786 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 10:23:33 +00:00
Evan Cheng
5196b3680c Add a version of FindUnusedReg that restrict search to a specific set of registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 08:56:24 +00:00
Evan Cheng
c0ba1bc49b A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 02:27:30 +00:00
Evan Cheng
23322d1427 Interface clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 02:25:51 +00:00
Evan Cheng
a3756ee7fe Interface clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34770 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 02:19:39 +00:00
Evan Cheng
8e92b4bae2 Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 02:05:35 +00:00
Evan Cheng
88d1f587d2 Track all joined registers and eliminate unneeded kills after all joining are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34767 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 02:03:03 +00:00
Jim Laskey
8782d481a3 Chain is on second operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34759 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 20:43:58 +00:00
Jim Laskey
3f09fc2ff8 Handle mix of personalities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:38:31 +00:00
Jim Laskey
63f3e3fa1d Provide a more meaningful name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:37:50 +00:00
Jim Laskey
64ce0ca90d MERGE_VALUES unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34750 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:37:04 +00:00
Nate Begeman
a0a6278c7c Fix a typo, thanks Bill!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 09:16:38 +00:00
Nate Begeman
fec910c3b9 More Mach-O writer improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34740 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 07:40:50 +00:00
Chris Lattner
66baf26fe0 add methods for analysis of call results and return nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 07:09:40 +00:00
Chris Lattner
fb39f99fa4 add methods to analyze calls and formals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34736 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:56:37 +00:00
Chris Lattner
e5876ce21a add a newline at end of file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:42:11 +00:00
Evan Cheng
36230cdda4 Make requiresRegisterScavenging determination on a per MachineFunction basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:59:19 +00:00
Evan Cheng
37f15a6d48 MRegisterInfo disowns RegScavenger. It's immutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34706 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:17:36 +00:00
Evan Cheng
898218cc5e Some more code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34700 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 22:58:43 +00:00
Evan Cheng
8cab162e03 Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34698 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 22:10:52 +00:00
Evan Cheng
3f6fd87473 Let MRegisterInfo now owns RegScavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34691 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 21:10:33 +00:00