Commit Graph

11923 Commits

Author SHA1 Message Date
Tanya Lattner
b4b2e9d5a7 Fixed up sched graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:14:24 +00:00
Tanya Lattner
5a75c91951 Registering the ModuloScheduling pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13427 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:14:02 +00:00
Tanya Lattner
e5abfd2c05 Changed CPUResource to allow access to max num users for a resource.
Also added ModuloScheduling as a friend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13426 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:13:26 +00:00
Tanya Lattner
6b160503b5 Changed CPUResource to allow access to maxnum users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:50 +00:00
Tanya Lattner
73e3e2e10f Updating my versions of ModuloScheduling in cvs. Still not complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:10 +00:00
Brian Gaeke
429022bf83 Add support for widening integral casts.
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):

       BB
   cond. branch
     /         /          R1=1    R2=0
     \      /
      \    /
    R=phi(R1,R2)

Other minor edits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 06:36:14 +00:00
Brian Gaeke
59dbff714c Add a bunch more branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 06:08:29 +00:00
Brian Gaeke
9f56482a43 Flesh out GEP support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13421 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 05:27:20 +00:00
Brian Gaeke
6b1d2fa1d1 Add ADD with immediate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13420 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 05:26:55 +00:00
Brian Gaeke
c3e970122a Add forms of CMP, SUBCC, and a few branches, and some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13419 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 04:21:32 +00:00
Brian Gaeke
532e60c403 Add stub support for GEPs.
Add support for branches (based loosely on X86/InstSelectSimple).
Add support for not visiting phi nodes in the first pass.
Add support for loading bools.
Flesh out support for stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13418 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 04:21:17 +00:00
Alkis Evlogimenos
880e8e4b4c Add required header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13417 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
feab248c93 Remove unneeded header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:49:35 +00:00
Chris Lattner
620ce14666 Implement folding of GEP's like:
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5         ; <sbyte*> [#uses=2]
        %tmp.7 = getelementptr sbyte* %tmp.0, int 8             ; <sbyte*> [#uses=1]

together.  This patch actually allows us to simplify and generalize the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13415 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 22:09:22 +00:00
Brian Gaeke
7532e34537 Allow the user to set the LLVMINTERP environment variable as a workaround, for
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.

Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13414 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:47:36 +00:00
Brian Gaeke
e302a7eb43 Add support for copying bool constants to registers.
Disable the code that copies long constants to registers - it looks fishy.
Implement some simple casts: integral, smaller than longs, and equal-width
 or narrowing only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:39:30 +00:00
Chris Lattner
e7a31c98db Codegen floating point stores of constants into integer instructions. This
allows us to compile:

store float 10.0, float* %P

into:
        mov DWORD PTR [%EAX], 1092616192

instead of:

.CPItest_0:                                     # float 0x4024000000000000
.long   1092616192      # float 10
...
        fld DWORD PTR [.CPItest_0]
        fstp DWORD PTR [%EAX]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13409 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:18:15 +00:00
Brian Gaeke
2c9a94cd4f Add more casts. You can never have enough casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13408 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:10:28 +00:00
Chris Lattner
260195d2b1 Make comparisons against the null pointer as efficient as integer comparisons
against zero.  In particular, don't emit:

        mov %ESI, 0
        cmp %ECX, %ESI

instead, emit:

       test %ECX, %ECX


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 19:55:55 +00:00
Chris Lattner
add68af031 PR implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 19:23:05 +00:00
Chris Lattner
581dc80fd0 Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13403 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 18:40:38 +00:00
Chris Lattner
da4230e41d New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13402 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 18:38:59 +00:00
Chris Lattner
13b29f6844 New testcase for PR336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13401 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 15:38:50 +00:00
Chris Lattner
546516c3c0 Fix PR336: The instcombine pass asserts when visiting load instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13400 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 15:35:56 +00:00
John Criswell
3a386d4929 Regression test for PR#330.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13399 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 13:57:19 +00:00
Chris Lattner
2944bcaaed Add the enum corresponding to the source change I made earlier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 02:27:32 +00:00
John Criswell
4d8d49f1bb Bug fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13392 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:23:24 +00:00
John Criswell
8cb23dad20 Don't call getForwardedType() twice, as recommended by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:15:47 +00:00
Chris Lattner
60083e2fc0 Use the new commandline flag to allow us to call bugpoint like this:
bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo

So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:05:35 +00:00
Chris Lattner
bf455c2360 Implement the new cl::PositionalEatsArgs flag, refactor code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13388 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:04:31 +00:00
Chris Lattner
be801bf248 Add a new cl::PositionalEatsArgs flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13387 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:03:59 +00:00
John Criswell
7775c1f136 Fix for PR#330.
When looking at getelementptr instructions, make sure to use a forwarded
type.  We want to do this because a DerivedType may drop its uses and then
refine its users, who may then use another user who hasn't been refined yet.
By getting the forwarded type, we always ensure that we're looking at a
Type that isn't in a halfway refined state.

Now, I should be able to put this stuff in PATypeHandle, but it doesn't work
for some reason.  This should do for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 21:18:08 +00:00
Chris Lattner
817d8d3046 Remove a really old comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13385 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 19:29:58 +00:00
Reid Spencer
857ceab504 Just testing the "Reid has CVS commit access" system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13384 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 18:06:18 +00:00
Misha Brukman
b7206e74fc Give props to Vladimir Prus for the inst_iterator patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 16:53:18 +00:00
Chris Lattner
a19eedeb7a numeric_limits::infinity() apparently does not work on all systems. As a
workaround, use the C HUGE_VAL macro instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 16:25:59 +00:00
Alkis Evlogimenos
ad5c296792 Fix for gcc3.4: invalid use of forward delacred class on line 93
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13370 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 02:07:42 +00:00
Brian Gaeke
6178085cfd Move the stuff that fixes the size, orientation & fonts of graphs to
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-05 06:10:06 +00:00
Brian Gaeke
48b008db57 Apply simplification suggested by Chris: why assign() when operator = will do?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13364 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 22:02:41 +00:00
John Criswell
4a9c90446d Fixed inconsistent indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13363 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:46:05 +00:00
Brian Gaeke
7ca6712f81 Missing piece of fix for Bug 333
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13362 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:41:45 +00:00
Brian Gaeke
43be311215 Bugs fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:22:57 +00:00
Brian Gaeke
cbc796e75d update command guide to have --tool-args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:13:35 +00:00
Brian Gaeke
636df3d7ec Add --tool-args flag which lets you pass arguments to llc or lli.
This is intended to address Bug 40.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13358 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:16 +00:00
Brian Gaeke
7e4375365e Correctly mangle function names when they are used as part of a
constant pool member's name.
This is intended to address Bug 333.

Also, fix an anachronistic usage of "M" as a parameter of type Function *.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13357 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:02 +00:00
Brian Gaeke
d11577b68b Add "Args" optional argument to AbstractInterpreter factory methods, which
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.

Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:01 +00:00
Chris Lattner
bbc130d110 Remove unneeded check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 19:35:11 +00:00
Chris Lattner
c8af02c403 Improve signed division by power of 2 *dramatically* from this:
div:
        mov %EDX, DWORD PTR [%ESP + 4]
        mov %ECX, 64
        mov %EAX, %EDX
        sar %EDX, 31
        idiv %ECX
        ret

to this:

div:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, %EAX
        sar %ECX, 5
        shr %ECX, 26
        mov %EDX, %EAX
        add %EDX, %ECX
        sar %EAX, 6
        ret

Note that the intel compiler is currently making this:

div:
        movl      4(%esp), %edx                                 #3.5
        movl      %edx, %eax                                    #4.14
        sarl      $5, %eax                                      #4.14
        shrl      $26, %eax                                     #4.14
        addl      %edx, %eax                                    #4.14
        sarl      $6, %eax                                      #4.14
        ret                                                     #4.14

Which has one less register->register copy.  (hint hint alkis :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 19:33:58 +00:00
Misha Brukman
2dd5c96866 Provide visit(Module&) and visitModule(Module&) functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 18:30:38 +00:00
Brian Gaeke
b171d7949d Add stub support for reading BBTraces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:11:14 +00:00