1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
f0d1bf23eb Replace copyRegToReg with COPY everywhere in lib/CodeGen except for FastISel.
llvm-svn: 108062
2010-07-10 22:42:59 +00:00
Dan Gohman
497e752655 Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
doesn't have to guess.

llvm-svn: 103194
2010-05-06 20:33:48 +00:00
Devang Patel
16c77b14f2 Ignore debug value instructions while analyzing BB for tail duplication.
llvm-svn: 98675
2010-03-16 21:02:07 +00:00
Chris Lattner
de49dbc188 eliminate InvalidateLabel and LabelIDList from MMI and replace
them with a counter.

llvm-svn: 98462
2010-03-14 02:24:55 +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
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
Bob Wilson
a7043345ee Treat indirect branches specially only during pre-regalloc tail duplication,
not during the later post-alloc tail duplication.

llvm-svn: 93600
2010-01-16 00:42:25 +00:00
Jakob Stoklund Olesen
cf4c604899 Simplify logic. Any functional change is unintended.
llvm-svn: 93540
2010-01-15 19:59:57 +00:00
Bob Wilson
b9a6da20e8 Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches.  I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.

llvm-svn: 93505
2010-01-15 06:29:17 +00:00
Jakob Stoklund Olesen
a63aa4e54b Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.

llvm-svn: 92873
2010-01-06 23:47:07 +00:00
David Greene
9f18bb0e40 Change errs() to dbgs().
llvm-svn: 92582
2010-01-05 01:25:15 +00:00
Evan Cheng
d6a991f735 Tail duplication should zap a copy it inserted for SSA update if the copy is the only use of its source.
llvm-svn: 91390
2009-12-15 01:44:10 +00:00
Evan Cheng
72c07bfcad Delete code accidentally left behind.
llvm-svn: 90804
2009-12-07 21:19:33 +00:00
Evan Cheng
79d3b53208 Pre-regalloc tale duplication. Work in progress.
llvm-svn: 90759
2009-12-07 10:15:19 +00:00
Evan Cheng
d587159de8 Handle recursive PHI's.
llvm-svn: 90575
2009-12-04 19:09:10 +00:00
Evan Cheng
0b005cade5 Add a pre-regalloc tail duplication pass.
llvm-svn: 90567
2009-12-04 09:42:45 +00:00
Evan Cheng
d4f8c9fee2 Teach tail duplication to update SSA form. Work in progress.
llvm-svn: 90432
2009-12-03 08:43:53 +00:00
Bob Wilson
adb1889175 Don't count PHI instructions toward the limit for tail duplicating a block.
llvm-svn: 90326
2009-12-02 17:15:24 +00:00
Bob Wilson
a71b008477 Reprioritize tests for tail duplication to be aggressive about indirect
branches even when optimizing for code size.  Unless we find evidence to the
contrary in the future, the special treatment for indirect branches does not
have a significant effect on code size, and performance still matters with -Os.

llvm-svn: 90147
2009-11-30 18:56:45 +00:00
Bob Wilson
b293fe32cb Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low.  The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.

llvm-svn: 90144
2009-11-30 18:35:03 +00:00
Bob Wilson
c029183683 Rename new TailDuplicationPass to avoid name conflict with the old one.
llvm-svn: 89968
2009-11-26 21:38:41 +00:00
Bob Wilson
de012efdba Split tail duplication into a separate pass. This is needed to avoid
running tail duplication when doing branch folding for if-conversion, and
we also want to be able to run tail duplication earlier to fix some
reg alloc problems.  Move the CanFallThrough function from BranchFolding
to MachineBasicBlock so that it can be shared by TailDuplication.

llvm-svn: 89904
2009-11-26 00:32:21 +00:00