Commit Graph

11836 Commits

Author SHA1 Message Date
Chris Lattner 60ef22da3d Testcase for PR337, which was reduced by Reid Spencer.
llvm-svn: 13443
2004-05-10 05:11:24 +00:00
Reid Spencer 45e25d8295 Bug 178 Fixed
llvm-svn: 13442
2004-05-09 23:32:39 +00:00
Reid Spencer be4fadf1b8 Changes to make the Stacker Stack use 64 bit values. This *should* get
around the problem with Stacker on Solaris because the Stack can handle
64-bit entries (pointer sized).

llvm-svn: 13441
2004-05-09 23:20:19 +00:00
Chris Lattner a367dd745b Fix some comments, avoid sign extending booleans when zero extend works fine
llvm-svn: 13440
2004-05-09 23:16:33 +00:00
Chris Lattner 1542a98e7b Generate more efficient code for casting booleans to integers (no sign extension required)
llvm-svn: 13439
2004-05-09 22:28:45 +00:00
Chris Lattner f719a52088 syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner 87d036caf2 Do not emit prototypes for setjmp/longjmp, as they are handled specially
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner 17fcb67a20 Fine grainify namespacification
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Chris Lattner 9c29991970 Make the floating point constant pools local to each function, split the
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!

llvm-svn: 13435
2004-05-09 06:20:51 +00:00
Brian Gaeke e3e557e553 Bug fixed.
Rewrite portability intro.

llvm-svn: 13434
2004-05-09 05:28:35 +00:00
Chris Lattner 14d328e2a5 Get this looking more like a function pass.
llvm-svn: 13433
2004-05-09 04:30:20 +00:00
Chris Lattner 254677fe0a Implement the AddPrototypes method
llvm-svn: 13432
2004-05-09 04:29:57 +00:00
Chris Lattner e7cc64f6e7 Add support for inserting all prototypes up-front
llvm-svn: 13431
2004-05-09 04:29:49 +00:00
Chris Lattner 2484a6336f Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
llvm-svn: 13430
2004-05-09 03:42:48 +00:00
Chris Lattner 8ec5f88c79 Fix stupid bug in my checkin yesterday
llvm-svn: 13429
2004-05-08 22:41:42 +00:00
Tanya Lattner 090365b154 Fixed up sched graph.
llvm-svn: 13428
2004-05-08 16:14:24 +00:00
Tanya Lattner f751ca6767 Registering the ModuloScheduling pass.
llvm-svn: 13427
2004-05-08 16:14:02 +00:00
Tanya Lattner 8ad6335dfa Changed CPUResource to allow access to max num users for a resource.
Also added ModuloScheduling as a friend.

llvm-svn: 13426
2004-05-08 16:13:26 +00:00
Tanya Lattner 39bd20d6eb Changed CPUResource to allow access to maxnum users.
llvm-svn: 13425
2004-05-08 16:12:50 +00:00
Tanya Lattner a6820d6704 Updating my versions of ModuloScheduling in cvs. Still not complete.
llvm-svn: 13424
2004-05-08 16:12:10 +00:00
Brian Gaeke 1096ba9422 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.

llvm-svn: 13423
2004-05-08 06:36:14 +00:00
Brian Gaeke 91bf7cb79b Add a bunch more branches
llvm-svn: 13422
2004-05-08 06:08:29 +00:00
Brian Gaeke 7a66e5fff9 Flesh out GEP support
llvm-svn: 13421
2004-05-08 05:27:20 +00:00
Brian Gaeke d18b330605 Add ADD with immediate
llvm-svn: 13420
2004-05-08 05:26:55 +00:00
Brian Gaeke b56f1c9c10 Add forms of CMP, SUBCC, and a few branches, and some comments.
llvm-svn: 13419
2004-05-08 04:21:32 +00:00
Brian Gaeke f3a479f04a 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.

llvm-svn: 13418
2004-05-08 04:21:17 +00:00
Alkis Evlogimenos 2a54b5d3e1 Add required header
llvm-svn: 13417
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos 54a89b7c72 Remove unneeded header
llvm-svn: 13416
2004-05-08 03:49:35 +00:00
Chris Lattner 5f667a6f58 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.

llvm-svn: 13415
2004-05-07 22:09:22 +00:00
Brian Gaeke 9a7b9d07f0 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.)

llvm-svn: 13414
2004-05-07 21:47:36 +00:00
Brian Gaeke 584308b71a 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.

llvm-svn: 13413
2004-05-07 21:39:30 +00:00
Chris Lattner a2dc6bf6e6 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]

llvm-svn: 13409
2004-05-07 21:18:15 +00:00
Brian Gaeke 1edc9637d0 Add more casts. You can never have enough casts.
llvm-svn: 13408
2004-05-07 21:10:28 +00:00
Chris Lattner cecf3f94a4 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

llvm-svn: 13407
2004-05-07 19:55:55 +00:00
Chris Lattner cf5822a2be PR implemented
llvm-svn: 13406
2004-05-07 19:23:05 +00:00
Chris Lattner 3553fe3a5b Bug fixed
llvm-svn: 13403
2004-05-07 18:40:38 +00:00
Chris Lattner 798b5e4a6f New testcase
llvm-svn: 13402
2004-05-07 18:38:59 +00:00
Chris Lattner 0a8ee61c51 New testcase for PR336
llvm-svn: 13401
2004-05-07 15:38:50 +00:00
Chris Lattner d9e5813821 Fix PR336: The instcombine pass asserts when visiting load instruction
llvm-svn: 13400
2004-05-07 15:35:56 +00:00
John Criswell e0727fe00d Regression test for PR#330.
llvm-svn: 13399
2004-05-07 13:57:19 +00:00
Chris Lattner c6fdf8ddb3 Add the enum corresponding to the source change I made earlier
llvm-svn: 13395
2004-05-07 02:27:32 +00:00
John Criswell 6956afa7c5 Bug fixed.
llvm-svn: 13392
2004-05-06 22:23:24 +00:00
John Criswell 2af0fd3ca8 Don't call getForwardedType() twice, as recommended by Chris.
llvm-svn: 13391
2004-05-06 22:15:47 +00:00
Chris Lattner 6aee736d1b 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.

llvm-svn: 13389
2004-05-06 22:05:35 +00:00
Chris Lattner a60f355c87 Implement the new cl::PositionalEatsArgs flag, refactor code a bit
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Chris Lattner b68bd76978 Add a new cl::PositionalEatsArgs flag
llvm-svn: 13387
2004-05-06 22:03:59 +00:00
John Criswell f6709bc579 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.

llvm-svn: 13386
2004-05-06 21:18:08 +00:00
Chris Lattner 8737169a6a Remove a really old comment
llvm-svn: 13385
2004-05-06 19:29:58 +00:00
Reid Spencer 432f53b47f Just testing the "Reid has CVS commit access" system
llvm-svn: 13384
2004-05-06 18:06:18 +00:00
Misha Brukman afdd8a0608 Give props to Vladimir Prus for the inst_iterator patch.
llvm-svn: 13383
2004-05-06 16:53:18 +00:00