1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

9867 Commits

Author SHA1 Message Date
Alkis Evlogimenos
9594d0b861 Silence gcc-4.0.0 warnings.
llvm-svn: 21453
2005-04-22 17:56:01 +00:00
Misha Brukman
66d3c6e020 Convert tabs to spaces
llvm-svn: 21452
2005-04-22 17:54:37 +00:00
Reid Spencer
868f3fb2e0 Implement the --enable-targets= feature of the configure script. The make
variable TARGETS_TO_BUILD is used to determine which targets in lib/Target
are built and which libraries are linked into llc. This effectively
implements the feature. One item remains: disabling targets in the dejagnu
test suite.

llvm-svn: 21450
2005-04-22 17:20:11 +00:00
Andrew Lenharth
25a03c00c7 keep track of max depth stats
llvm-svn: 21446
2005-04-22 13:35:18 +00:00
Tanya Lattner
3f4d35ca74 Updated dependence analyzer. Fixed numerous bugs. Same stage scheduling, etc.
llvm-svn: 21444
2005-04-22 06:32:48 +00:00
Chris Lattner
c638ca05a0 Malloc/Free have mod/ref effects. Do not allow CSE of function calls that
call malloc/free.  This fixes PR555.

llvm-svn: 21443
2005-04-22 05:36:59 +00:00
Misha Brukman
3ef1d71bfa Convert tabs to spaces
llvm-svn: 21440
2005-04-22 04:08:30 +00:00
Misha Brukman
a9a1982a44 Convert tabs to spaces
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Misha Brukman
bf3f6181fd * Remove trailing whitespace
* Convert tabs to spaces

llvm-svn: 21426
2005-04-21 23:38:14 +00:00
Misha Brukman
1fef885677 Remove trailing whitespace
llvm-svn: 21425
2005-04-21 23:30:14 +00:00
Misha Brukman
1fdf39f2ea Remove trailing whitespace
llvm-svn: 21424
2005-04-21 23:13:11 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Misha Brukman
dda9dce10f * Remove trailing whitespace
* Convert tabs to spaces

llvm-svn: 21421
2005-04-21 22:43:08 +00:00
Misha Brukman
774e55c446 Remove trailing whitespace
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Misha Brukman
aec3b563b0 * Remove trailing whitespace
* Convert tabs to spaces

llvm-svn: 21418
2005-04-21 21:48:46 +00:00
Misha Brukman
e69deb7eec Remove trailing whitespace
llvm-svn: 21417
2005-04-21 21:44:41 +00:00
Misha Brukman
122d682689 Remove trailing whitespace
llvm-svn: 21416
2005-04-21 21:13:18 +00:00
Misha Brukman
564c9b6580 * Remove trailing whitespace
* Convert tabs to spaces

llvm-svn: 21415
2005-04-21 21:10:11 +00:00
Chris Lattner
208da25af0 Match another form of eqv
llvm-svn: 21413
2005-04-21 21:09:11 +00:00
Chris Lattner
8d813a7d51 Handle stores of global address as stores of immediates. Instead of:
test1:
        movl $N, %eax
        movl %eax, G
        ret

emit:

test1:
        movl $N, G
        ret

llvm-svn: 21407
2005-04-21 19:11:03 +00:00
Chris Lattner
706775467b Handle (store &GV -> mem) as a store immediate. This often occurs for
printf format strings and other stuff.  Instead of generating this:

        movl $l1__2E_str_1, %eax
        movl %eax, (%esp)

we now emit:

        movl $l1__2E_str_1, (%esp)

llvm-svn: 21406
2005-04-21 19:03:24 +00:00
Reid Spencer
19f70e2fa2 Use the actual uid/gid for defaulting the fields in the archive.
llvm-svn: 21405
2005-04-21 17:49:57 +00:00
Chris Lattner
357bbf90af Fix a bug where we would not promote calls to invokes if they occured in
the same block as the setjmp.  Thanks to Greg Pettyjohn for noticing this!

llvm-svn: 21403
2005-04-21 16:46:46 +00:00
Reid Spencer
970739e48a Eliminate calls to system dependent function getuid by using
the newly implemented sys::Process::GetCurrentUserId function. Replace
similarly for getgid.

llvm-svn: 21402
2005-04-21 16:15:19 +00:00
Reid Spencer
044ec874d5 Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
methods that were recently added to the interface.

llvm-svn: 21401
2005-04-21 16:12:57 +00:00
Chris Lattner
9d2c6a3981 add support for taking and resolving the address of free.
llvm-svn: 21396
2005-04-21 16:09:43 +00:00
Chris Lattner
2f96b346b4 Improve doxygen, from part of Evan's patch that didn't apply.
llvm-svn: 21394
2005-04-21 16:06:03 +00:00
Chris Lattner
472c891d23 Improve doxygen documentation, patch contributed by Evan Jones!
llvm-svn: 21393
2005-04-21 16:04:49 +00:00
Chris Lattner
87fbc1c554 Improve and elimination. On PPC, for:
bool %test(int %X) {
        %Y = and int %X, 8
        %Z = setne int %Y, 0
        ret bool %Z
}

we now generate this:

        rlwinm r2, r3, 0, 28, 28
        srwi r3, r2, 3

instead of this:

        rlwinm r2, r3, 0, 28, 28
        srwi r2, r2, 3
        rlwinm r3, r2, 0, 31, 31

I'll leave it to Nate to get it down to one instruction. :)

---------------------------------------------------------------------

llvm-svn: 21391
2005-04-21 06:28:15 +00:00
Chris Lattner
d0a2fda2c6 Fold (x & 8) != 0 and (x & 8) == 8 into (x & 8) >> 3.
This turns this PPC code:

        rlwinm r2, r3, 0, 28, 28
        cmpwi cr7, r2, 8
        mfcr r2
        rlwinm r3, r2, 31, 31, 31

into this:

        rlwinm r2, r3, 0, 28, 28
        srwi r2, r2, 3
        rlwinm r3, r2, 0, 31, 31

Next up, nuking the extra and.

llvm-svn: 21390
2005-04-21 06:12:41 +00:00
Chris Lattner
5ad1e1ebec Instcombine this:
%shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4             ; <bool> [#uses=1]
        %tmp.6 = cast bool %shortcirc_val to int                ; <int> [#uses=1]

into this:

        %shortcirc_val = or bool %tmp.1, %tmp.4         ; <bool> [#uses=1]
        %tmp.6 = cast bool %shortcirc_val to int                ; <int> [#uses=1]

not this:

        %tmp.4.cast = cast bool %tmp.4 to int           ; <int> [#uses=1]
        %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast             ; <int> [#uses=1]

llvm-svn: 21389
2005-04-21 05:43:13 +00:00
Chris Lattner
6ce1b109aa Teach simplifycfg that setcc is cheap and non-trapping, so that it can
convert this:

        %tmp.1 = seteq int %i, 0                ; <bool> [#uses=1]
        br bool %tmp.1, label %shortcirc_done, label %shortcirc_next

shortcirc_next:         ; preds = %entry
        %tmp.4 = seteq int %j, 0                ; <bool> [#uses=1]
        br label %shortcirc_done

shortcirc_done:         ; preds = %shortcirc_next, %entry
        %shortcirc_val = phi bool [ %tmp.4, %shortcirc_next ], [ true, %entry ]         ; <bool> [#uses=1]

to this:
        %tmp.1 = seteq int %i, 0                ; <bool> [#uses=1]
        %tmp.4 = seteq int %j, 0                ; <bool> [#uses=1]
        %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4             ; <bool> [#uses=1]

... which is later simplified by instcombine into an or.

llvm-svn: 21388
2005-04-21 05:31:13 +00:00
Reid Spencer
4478133ab0 For Bug 543:
Standardize the error messages to be in "path: what failed: why" format.
Also attempt to use the correct errno to ThrowErrno in situations where
the errno value is erased by subsequent system calls.

llvm-svn: 21385
2005-04-21 02:50:10 +00:00
Reid Spencer
c3b52b74cd For Bug 543:
Allow the ThrowErrno function to optionally accept an error number
parameter so that callers can specify the error number to be used.

llvm-svn: 21384
2005-04-21 02:30:32 +00:00
Misha Brukman
e096a50cb7 Remove trailing whitespace, patch by Markus Oberhumer.
llvm-svn: 21379
2005-04-20 16:05:03 +00:00
Misha Brukman
7f08d0bc03 Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH may
result in returning executable files that won't be runnable.

llvm-svn: 21378
2005-04-20 15:42:11 +00:00
Misha Brukman
11854af05f Do not mark directories as `executable', we only want program files
Patch by Markus Oberhumer.

llvm-svn: 21377
2005-04-20 15:33:22 +00:00
Misha Brukman
4113ed635d Ignore dangling symlinks in getDirectoryContents()
Thanks to Markus Oberhumer for the patch!

llvm-svn: 21370
2005-04-20 04:04:07 +00:00
Misha Brukman
1e88051ee8 Initialize fields mode, uid, and gid.
Patch by Markus Oberhumer.  Thanks!

llvm-svn: 21369
2005-04-20 03:55:35 +00:00
Misha Brukman
e69c186935 Align comments together for consistency
llvm-svn: 21368
2005-04-20 03:52:59 +00:00
Chris Lattner
145f1ec0a4 Wrap some long lines.
Make IPSCCP strip off dead constant exprs that are using functions, making
them appear as though their address is taken.  This allows us to propagate
some more pool descriptors, lowering the overhead of pool alloc.

llvm-svn: 21363
2005-04-19 19:16:19 +00:00
Chris Lattner
64b466c8b1 fix PR549
llvm-svn: 21360
2005-04-19 15:27:29 +00:00
Chris Lattner
6b0132b48b Eliminate a broken transformation, fixing PR548
llvm-svn: 21354
2005-04-19 06:04:18 +00:00
Chris Lattner
3d4612c54c Add completely untested support for mtcrf/mfcrf encoding
llvm-svn: 21353
2005-04-19 05:41:52 +00:00
Chris Lattner
e6f861f92c switch over the rest of the formats that use RC to use isDOT
llvm-svn: 21352
2005-04-19 05:21:30 +00:00
Chris Lattner
082ca8fcab Convert the XForm instrs and XSForm instruction over to use isDOT
llvm-svn: 21351
2005-04-19 05:15:18 +00:00
Chris Lattner
3fdfd4e009 Now that the ppc64 and vmx operands of I are always 0, forward substitute
them away.

llvm-svn: 21350
2005-04-19 05:05:22 +00:00
Chris Lattner
e6f7713f03 convert over bform and iform instructions
llvm-svn: 21349
2005-04-19 05:00:59 +00:00
Chris Lattner
3ae0832381 Convert over DForm and DSForm instructions
llvm-svn: 21348
2005-04-19 04:59:28 +00:00