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

8879 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
da3bd912ec Revert functional change. This broke a bunch of tests.
llvm-svn: 95921
2010-02-11 21:19:44 +00:00
Jakob Stoklund Olesen
8b992fb512 It is always good to do a cross-class join when the large register has a tiny interval.
Also avoid division by zero.

llvm-svn: 95917
2010-02-11 20:58:45 +00:00
Dale Johannesen
810ebb35c9 Allow for more than one DBG_VALUE targeting the
same dead instruction.

llvm-svn: 95890
2010-02-11 18:23:23 +00:00
Dale Johannesen
406fad0bad Don't allow DBG_VALUE to affect codegen.
llvm-svn: 95889
2010-02-11 18:22:31 +00:00
Jakob Stoklund Olesen
3aca1b0249 Use array_pod_sort instead of std::sort for improved code size.
Use SmallVector instead of std::vector for better speed when indirectbr has
few successors.

llvm-svn: 95879
2010-02-11 18:06:56 +00:00
Bill Wendling
6e7cc490d4 Use .empty() instead of .size().
llvm-svn: 95871
2010-02-11 10:37:57 +00:00
Bill Wendling
2aa666c419 Fix to get it to compile.
llvm-svn: 95840
2010-02-11 01:15:27 +00:00
Bill Wendling
123c791ff5 Don't print out a default newline when emitting the section offset. There are
almost always comments afterwards that need printing.

llvm-svn: 95839
2010-02-11 01:13:02 +00:00
Jakob Stoklund Olesen
3b5abdefc3 Reuse operand location when updating PHI instructions.
Calling RemoveOperand is very expensive on huge PHI instructions. This makes
early tail duplication run twice as fast on the Firefox JavaScript
interpreter.

llvm-svn: 95832
2010-02-11 00:34:33 +00:00
Jakob Stoklund Olesen
215d9f3898 Remove duplicate successors from indirectbr instructions before building the machine CFG.
This makes early tail duplication run 60 times faster when compiling the Firefox
JavaScript interpreter, see PR6186.

llvm-svn: 95831
2010-02-11 00:34:18 +00:00
Mon P Wang
c17e781f35 The previous fix of widening divides that trap was too fragile as it depends on custom
lowering and requires that certain types exist in ValueTypes.h.  Modified widening to
check if an op can trap and if so, the widening algorithm will apply only the op on
the defined elements.  It is safer to do this in widening because the optimizer can't
guarantee removing unused ops in some cases.

llvm-svn: 95823
2010-02-10 23:37:45 +00:00
Dale Johannesen
5f337b582f Ignore debug info one more place during coalescing.
llvm-svn: 95819
2010-02-10 23:04:09 +00:00
Bob Wilson
82d5534acc Delete dead PHI machine instructions. These can be created due to type
legalization even when the IR-level optimizer has removed dead phis, such
as when the high half of an i64 value is unused on a 32-bit target.
I had to adjust a few test cases that had dead phis.
This is a partial fix for Radar 7627077.

llvm-svn: 95816
2010-02-10 22:58:57 +00:00
Dale Johannesen
9d9478a53a Skip debug info in a couple of places.
llvm-svn: 95814
2010-02-10 21:47:48 +00:00
Bill Wendling
b288ec36ae Use an index instead of pointers into the vector. If the vector resizes, then
the pointer values could be invalid.

llvm-svn: 95813
2010-02-10 21:41:57 +00:00
Dale Johannesen
99090c9fe0 When I rewrote this loop per Chris' preference I
changed its behavior.  Oops.

llvm-svn: 95811
2010-02-10 21:41:41 +00:00
Dan Gohman
efb42fa7c7 Fix several comments which had previously been "the the" where a
different word was intended.

llvm-svn: 95795
2010-02-10 20:04:19 +00:00
Dan Gohman
92b6122204 Fix "the the" and similar typos.
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Evan Cheng
8bee7fb61d Now that ShrinkDemandedOps() is separated out from DAG combine. It sometimes leave some obvious nops which dag combine used to clean up afterwards e.g. (trunk (ext n)) -> n. Look for them and squash them.
llvm-svn: 95757
2010-02-10 02:17:34 +00:00
Dale Johannesen
12262a957f Rewrite loop to suit Chris' preference.
llvm-svn: 95749
2010-02-10 01:31:26 +00:00
Chris Lattner
72156036b9 fix a layering violation: VirtRegRewriter.cpp shouldn't use AsmPrinter.h.
llvm-svn: 95748
2010-02-10 01:23:18 +00:00
Evan Cheng
e0e620c006 Remove duplicated #include.
llvm-svn: 95747
2010-02-10 01:22:57 +00:00
Evan Cheng
8c2662f96a Emit an error for illegal inline asm constraint (which uses illegal type) rather than asserting.
llvm-svn: 95746
2010-02-10 01:21:02 +00:00
Chris Lattner
750bf54fc6 fix missing #includes.
llvm-svn: 95745
2010-02-10 01:17:36 +00:00
Bill Wendling
270a5c4426 Improve comments a even more.
llvm-svn: 95740
2010-02-10 00:59:47 +00:00
Dale Johannesen
9b0d228b5f Skip DBG_VALUE many places in live intervals and
register coalescing.  This fixes many crashes and
places where debug info affects codegen (when
dbg.value is lowered to machine instructions, which
it isn't yet in TOT).

llvm-svn: 95739
2010-02-10 00:55:42 +00:00
Chris Lattner
db4b4d819d Move verbose asm instruction comments to using MCStreamer.
The major win of this is that the code is simpler and they 
print on the same line as the instruction again:

        movl    %eax, 96(%esp)          ## 4-byte Spill
        movl    96(%esp), %eax          ## 4-byte Reload
        cmpl    92(%esp), %eax          ## 4-byte Folded Reload
        jl      LBB7_86

llvm-svn: 95738
2010-02-10 00:47:53 +00:00
Bill Wendling
076bf7e91c Improve comments a bit more.
llvm-svn: 95737
2010-02-10 00:45:28 +00:00
Dale Johannesen
da728faa59 more comment updates
llvm-svn: 95736
2010-02-10 00:44:23 +00:00
Dale Johannesen
59679b7966 Add isDebug argument to ChangeToRegister; this prevents
the field from being used uninitialized later in some cases.

llvm-svn: 95735
2010-02-10 00:41:49 +00:00
Chris Lattner
6d7856867a print all the newlines at the end of instructions with
OutStreamer.AddBlankLine instead of textually.

llvm-svn: 95734
2010-02-10 00:36:00 +00:00
Dale Johannesen
c9f253214e Fix comments to reflect renaming elsewhere.
llvm-svn: 95730
2010-02-10 00:11:11 +00:00
David Greene
d2c34ce826 Only dump output in debug mode.
llvm-svn: 95711
2010-02-09 23:03:05 +00:00
Bill Wendling
fe743bc4d0 Improve comments in the LSDA somewhat. They can be improved much more.
llvm-svn: 95707
2010-02-09 22:49:16 +00:00
Chris Lattner
7acf9be6c4 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.

llvm-svn: 95687
2010-02-09 19:54:29 +00:00
Jakob Stoklund Olesen
70aa88d977 Remember to update live-in lists when coalescing physregs.
Patch by M Wahab!

llvm-svn: 95668
2010-02-09 17:20:11 +00:00
Dale Johannesen
cfb0894dba Skip DEBUG_VALUE in some places where it was affecting codegen.
llvm-svn: 95647
2010-02-09 02:01:46 +00:00
Devang Patel
d381c20ee7 Add declaration attribute to a variable DIE, if there is a separate DIE for the definition.
llvm-svn: 95646
2010-02-09 01:58:33 +00:00
Lang Hames
796e4c2b4a Fixed a bug in the PBQP allocator's findCoalesces method.
Previously spill registers, whose def indexes are not defined, would sometimes be improperly marked as coalescable with conflicting registers. The new findCoalesces routine conservatively assumes that any register with at least one undefined def is not coalescable with any register it interferes with.

llvm-svn: 95636
2010-02-09 00:50:27 +00:00
Lang Hames
47fb92c5e7 Added copy sensible construction & assignment to PBQP graphs and fixed a memory access bug in the heuristic solver.
llvm-svn: 95633
2010-02-09 00:45:48 +00:00
Dan Gohman
d19999d757 Implement AsmPrinter support for several more operators which have
direct MCExpr equivalents. Don't use MCExpr::Shr because it isn't
consistent between targets.

llvm-svn: 95620
2010-02-09 00:02:37 +00:00
Chris Lattner
32fa6adff6 now that @GOTOFF is no longer represented as a suffix on a
MCSymbol, we can remove the 'suffix' argument of 
GetBlockAddressSymbol.  Do so.

llvm-svn: 95601
2010-02-08 23:10:08 +00:00
Dan Gohman
8b46c6a6cb ConstantFoldConstantExpression can theoretically return the original
expression; don't go into an infinite loop if it does.

llvm-svn: 95591
2010-02-08 22:19:11 +00:00
Dan Gohman
56b9ea088b When CodeGen'ing unoptimized code, there may be unfolded constant expressions
in global initializers. Instead of aborting, attempt to fold them on the
spot. If folding succeeds, emit the folded expression instead.

This fixes PR6255.

llvm-svn: 95583
2010-02-08 22:02:38 +00:00
Dale Johannesen
5ddd318b03 Apply the 95471 fix to SelectionDAGBuilder as well;
we can get in here if FastISel gives up in a block.
(Actually the two copies of this need to be unified.  Later.)

llvm-svn: 95579
2010-02-08 21:53:27 +00:00
Dan Gohman
f113e5466c In guaranteed tailcall mode, don't decline the tailcall optimization
for blocks ending in "unreachable".

llvm-svn: 95565
2010-02-08 20:34:14 +00:00
Duncan Sands
ea225349b0 Give DwarfPrinter a protected (but not virtual) destructor. Cppcheck
warns about this base class not having a virtual destructor, but since
this class has no virtual methods and neither it or the types derived
from it has a destructor, a protected trivial destructor will do (and
shuts cppcheck up) the trick without the cost of introducing a vtable.

llvm-svn: 95526
2010-02-07 21:09:22 +00:00
Evan Cheng
5541068ad3 Run codegen dce pass for all targets at all optimization levels. Previously it's
only run for x86 with fastisel. I've found it being very effective in
eliminating some obvious dead code as result of formal parameter lowering
especially when tail call optimization eliminated the need for some of the loads
from fixed frame objects. It also shrinks a number of the tests. A couple of
tests no longer make sense and are now eliminated.

llvm-svn: 95493
2010-02-06 09:07:11 +00:00
Bob Wilson
61a15581e7 Fix an uninitialized value. Radar 7609421.
llvm-svn: 95488
2010-02-06 05:55:20 +00:00
Dale Johannesen
83f31d3511 After Victor's latest commits I am seeing null
addresses in dbg.declare; ignore this for the
moment to prevent things from breaking.

llvm-svn: 95471
2010-02-06 02:26:02 +00:00