1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

39203 Commits

Author SHA1 Message Date
Bill Wendling
b56bc61cf4 Add a flag to indicate that an instruction is as cheap (or cheaper) than a move
instruction to execute. This can be used for transformations (like two-address
conversion) to remat an instruction instead of generating a "move"
instruction. The idea is to decrease the live ranges and register pressure and
all that jazz.

llvm-svn: 51660
2008-05-28 22:54:52 +00:00
Bill Wendling
5011b8d77d Check the "isSafeToMove" predicate, which has a series of tests to make sure
that it's safe to remat an instruction.

llvm-svn: 51659
2008-05-28 22:52:47 +00:00
Owen Anderson
219ecc1ff1 Remap VNInfo data as well when doing renumbering.
llvm-svn: 51658
2008-05-28 22:40:08 +00:00
Owen Anderson
705b97141c Factor the numbering computation into a separate method, and add the slightest attempt at some renumbering logic, which is currently unused.
llvm-svn: 51652
2008-05-28 20:54:50 +00:00
Evan Cheng
cd45b11bc1 Fix PR2289: vr defined by multiple implicit_def as result of coalescing.
llvm-svn: 51648
2008-05-28 17:40:10 +00:00
Evan Cheng
591b57edd6 Teach local register allocator to deal with landing pad MBB's.
llvm-svn: 51647
2008-05-28 17:22:32 +00:00
Nate Begeman
e0d283668e Update some comments noticed in a recent checkin
llvm-svn: 51644
2008-05-28 16:31:36 +00:00
Chris Lattner
fd26913f74 Update text to point people at the right version of the tutorial for
their release.

llvm-svn: 51638
2008-05-28 06:16:08 +00:00
Chris Lattner
7a7da4f9c3 Implement PR2370: memmove(x,x,size) -> noop.
llvm-svn: 51636
2008-05-28 05:30:41 +00:00
Chris Lattner
857e1e9cab Add chain inputs for loads.
llvm-svn: 51635
2008-05-28 04:25:57 +00:00
Chris Lattner
93047192f3 Fix CodeGen/Generic/2005-10-21-longlonggtu.ll on ia64.
llvm-svn: 51634
2008-05-28 04:14:30 +00:00
Chris Lattner
294b436abf loads should get chains. THis helps but does not solve CodeGen/Generic/2003-05-27-phifcmpd.ll
on ia64.

llvm-svn: 51633
2008-05-28 04:06:52 +00:00
Chris Lattner
d33dececf3 Fix 2006-04-28-Sign-extend-bool.ll for ia64.
llvm-svn: 51632
2008-05-28 04:00:06 +00:00
Chris Lattner
569e867c01 reindent.
llvm-svn: 51631
2008-05-28 03:59:32 +00:00
Dan Gohman
a5549a2f9c Fix the encoding for two more "rm" instructions that were using MRMSrcReg.
llvm-svn: 51630
2008-05-28 01:50:19 +00:00
Mon P Wang
8e37b2d13e Fixed X86 encoding error CVTPS2PD and CVTPD2PS when the source operand
is a memory location

llvm-svn: 51626
2008-05-28 00:42:27 +00:00
Nate Begeman
23dd264da6 Don't attempt to create VZEXT_LOAD out of an extload. This an issue where the
code generator would do something like this:

f64 = load f32 <anyext>, f32mem
v2f64 = insertelt undef, %0, 0
v2f64 = insertelt %1, 0.0, 1

into 

v2f64 = vzext_load f32mem

which on x86 is movsd, when you really wanted a cvtss2sd/movsd pair.

llvm-svn: 51624
2008-05-28 00:24:25 +00:00
Nick Kledzik
50804655b3 use space insted of tabs
llvm-svn: 51623
2008-05-28 00:06:14 +00:00
Nick Kledzik
8f4cd26727 fix infinite recursion if a global's initializer references the global
llvm-svn: 51617
2008-05-27 22:07:08 +00:00
Gabor Greif
e2dcdc92ac Make Use::init() private, it breaks invariants, clients should assign or use set().
llvm-svn: 51615
2008-05-27 21:29:38 +00:00
Dan Gohman
4b11213552 Use Function::getEntryBlock instead of Function::begin, for clarity.
llvm-svn: 51613
2008-05-27 20:55:29 +00:00
Dan Gohman
327d2c6167 Print debug output when any edge becomes executable, including
the first visited edge.

llvm-svn: 51612
2008-05-27 20:47:30 +00:00
Devang Patel
ee44ba5c4b Add instcombine after global optimizations.
llvm-svn: 51611
2008-05-27 20:42:44 +00:00
Dan Gohman
29f4f83a1c Fix a word-o and add an explicit keyword.
llvm-svn: 51610
2008-05-27 20:41:18 +00:00
Bill Wendling
e5d738e779 Incorporated feedback: Check that the implicitly defined operands aren't used
before deleting the instruction.

llvm-svn: 51609
2008-05-27 20:40:52 +00:00
Dan Gohman
92d5dff525 Tidy up whitespace in ConstantRange::print output.
llvm-svn: 51606
2008-05-27 20:29:07 +00:00
Devang Patel
17e36d815e Use IPSCCPPass instead of IPConstantPropagationPass.
llvm-svn: 51605
2008-05-27 20:18:45 +00:00
Dan Gohman
568685ffa7 Specify a target so that this tests tests what it's intended to test.
llvm-svn: 51600
2008-05-27 17:55:57 +00:00
Dan Gohman
3ba9d77adb Make this test independent of the target-triple; the stack alignment
is specifically what this test depends on.

llvm-svn: 51599
2008-05-27 17:44:23 +00:00
Gabor Greif
2abf6ec2e5 back out last commit: The .cpp file for a module should include its corresponding header first, even if redundant.
llvm-svn: 51598
2008-05-27 17:26:02 +00:00
Matthijs Kooijman
2a23a4e495 Use an explicit llvm:: prefix in the STATISTIC macro, so STATISTIC can still be
used when "using namespace llvm" is not in effect.

llvm-svn: 51592
2008-05-27 12:41:24 +00:00
Duncan Sands
4757a8dd76 Fix some constructs that gcc-4.4 warns about.
llvm-svn: 51591
2008-05-27 11:50:51 +00:00
Gabor Greif
0b9cf0d491 prune unneeded #includes
llvm-svn: 51590
2008-05-27 11:06:03 +00:00
Gabor Greif
0fb81af839 remove unneeded reinterpret_casts
llvm-svn: 51589
2008-05-27 11:03:29 +00:00
Gabor Greif
b93cb3dc6f We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary.
llvm-svn: 51588
2008-05-27 10:48:39 +00:00
Owen Anderson
9a9030f206 Remove ADCE from the optimization pipeline.
llvm-svn: 51581
2008-05-27 04:27:27 +00:00
Nick Lewycky
230db50d91 InequalityGraph::node() can create new nodes, invalidating iterators across
the set of nodes. Fix makeEqual to handle this by creating the new node first
then iterating across them second.

llvm-svn: 51573
2008-05-27 00:59:05 +00:00
Nick Lewycky
bc54ac9d10 Grammaro.
llvm-svn: 51572
2008-05-26 22:49:36 +00:00
Gabor Greif
e052a42a62 eliminate calls to deprecated Use::init() interface
llvm-svn: 51570
2008-05-26 21:33:52 +00:00
Nick Lewycky
0ba4adf4ef Whoops -- forgot PR reference on this test.
llvm-svn: 51569
2008-05-26 20:23:33 +00:00
Nick Lewycky
c096899392 The Linux ABI emits an extra "movl %esp, %ebp" in function prologue and
sometimes a "mov %ebp, %esp" in the epilogue.

Force these tests that rely on counting 'mov' to use i686-apple-darwin8.8.0
where they were written.

llvm-svn: 51568
2008-05-26 20:18:56 +00:00
Duncan Sands
fa995d7cc5 Factor code to copy global value attributes like
the section or the visibility from one global
value to another: copyAttributesFrom.  This is
particularly useful for duplicating functions:
previously this was done by explicitly copying
each attribute in turn at each place where a
new function was created out of an old one, with
the result that obscure attributes were regularly
forgotten (like the collector or the section).
Hopefully now everything is uniform and nothing
is forgotten.

llvm-svn: 51567
2008-05-26 19:58:59 +00:00
Owen Anderson
15d473d75a Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.
llvm-svn: 51565
2008-05-26 10:07:43 +00:00
Bill Wendling
87ca2e8a41 The enabling of remat in 2-address conversion breaks this test:
Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |&  grep {1 .*folded into instructions}
child process exited abnormally

Make this conditional for now.

llvm-svn: 51563
2008-05-26 05:49:49 +00:00
Bill Wendling
62fae6aeee A problem that's exposed when machine LICM is enabled. Consider this code:
LBB1_3:   # bb
...
        xorl    %ebp, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Whe using machine LICM, LLVM converts it into:

        xorl %esi, %esi
LBB1_3: # bb
...
        movl    %esi, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Two address conversion inserts the copy instruction. However, it's cheaper to
rematerialize it, and remat helps reduce register pressure.

llvm-svn: 51562
2008-05-26 05:18:34 +00:00
Nick Lewycky
7116ad5a18 Use {} instead of "" in RUN lines.
llvm-svn: 51561
2008-05-26 01:27:08 +00:00
Nick Lewycky
f24743a6bb Don't treat values as signed when looking at loop steppings in HowForToNonZero.
llvm-svn: 51560
2008-05-25 23:43:32 +00:00
Nick Lewycky
744dad8004 "ret (constexpr)" can't be folded into a Constant. Add a method to
Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it
to try to use targetdata to fold constant expressions on void instructions.

Also extend the icmp(inttoptr, inttoptr) folding to handle the case where
int size != ptr size.

llvm-svn: 51559
2008-05-25 20:56:15 +00:00
Owen Anderson
72cb477348 Create archives with the same permissions are ar.
Patch by Mikael Lepistö.

llvm-svn: 51540
2008-05-24 05:42:29 +00:00
Chris Lattner
bfab90ca12 Fix win32 when no bison is around, PR2331, patch by 'hume'.
llvm-svn: 51539
2008-05-24 05:11:48 +00:00