1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

6591 Commits

Author SHA1 Message Date
Dan Gohman
d5561e2f28 Use iterators to iterate through the Preds array instead of
an index. This code is on the hot-path because the current
way SDep edges are uniqued has quadratic complexity.

llvm-svn: 64262
2009-02-11 00:12:28 +00:00
Dan Gohman
0da8292c67 Consider any instruction that modifies the stack pointer to be
a scheduling region boundary.  This isn't necessary for
correctness; it helps with compile time, as it avoids the need
for data- and anti-dependencies from all spills and reloads on
the stack-pointer modification.

llvm-svn: 64255
2009-02-10 23:29:38 +00:00
Dan Gohman
f2b9543ee5 Factor out more code for computing register live-range informationfor
scheduling, and generalize is so that preserves state across
scheduling regions. This fixes incorrect live-range information around
terminators and labels, which are effective region boundaries.

In place of looking for terminators to anchor inter-block dependencies,
introduce special entry and exit scheduling units for this purpose.

llvm-svn: 64254
2009-02-10 23:27:53 +00:00
Evan Cheng
5be1afd928 Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
llvm-svn: 64210
2009-02-10 08:30:11 +00:00
Devang Patel
0cb3e1c047 Validate file id.
llvm-svn: 64204
2009-02-10 06:04:08 +00:00
Evan Cheng
acd0fd545d If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
llvm-svn: 64184
2009-02-09 22:47:36 +00:00
Evan Cheng
773303a763 Simplify code.
llvm-svn: 64164
2009-02-09 21:01:06 +00:00
Evan Cheng
44e58653af Make sure constant subscript is truncated to ptr size if it may not fit.
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Evan Cheng
3f98669da2 Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
llvm-svn: 64126
2009-02-09 08:45:39 +00:00
Evan Cheng
2a6fc3cd40 Fix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case possible since I don't know what to grep for. :-(
llvm-svn: 64125
2009-02-09 08:37:45 +00:00
Evan Cheng
9dc1507838 Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
suprise to some callers, e.g. register coalescer. For now, add an parameter
that tells AnalyzeBranch whether it's safe to modify the mbb. A better
solution is out there, but I don't have time to deal with it right now.

llvm-svn: 64124
2009-02-09 07:14:22 +00:00
Evan Cheng
a7287a61fb Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
llvm-svn: 64082
2009-02-08 11:04:35 +00:00
Evan Cheng
b5792305b3 Strengthen the previous check.
llvm-svn: 64076
2009-02-08 08:24:28 +00:00
Evan Cheng
d5f5c0660b r64073 commit message is lost. Here it is:
Right now if the coalesced copy def is dead and its src is a kill, and that
there are now other uses within the live range, the coalescer would mark the
def of the source register as dead. But it should also check if there are
other kills which means the value has other uses not in the live range.

llvm-svn: 64075
2009-02-08 08:00:36 +00:00
Evan Cheng
7d46312873 (no commit message)
llvm-svn: 64073
2009-02-08 07:48:37 +00:00
Bill Wendling
4ed0306d6f Revert r63999. It was breaking self-hosting builds.
llvm-svn: 64062
2009-02-08 00:58:05 +00:00
Chris Lattner
eb06f05949 Add missing break statements, fixing PR3503.
llvm-svn: 64040
2009-02-07 22:37:06 +00:00
Dale Johannesen
b22cb23f6f Use getDebugLoc forwarder instead of getNode()->getDebugLoc.
No functional change.

llvm-svn: 64026
2009-02-07 19:59:05 +00:00
Dan Gohman
4105a38248 Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
ScheduleDAG's TLI member to use const.

llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Dale Johannesen
4fc8a5c0b5 Make SDNode constructors take a DebugLoc always.
Adjust derived classes to pass UnknownLoc where
a DebugLoc does not make sense.  Pick one of
DebugLoc and non-DebugLoc variants to survive
for all such classes.

llvm-svn: 64000
2009-02-07 02:15:05 +00:00
Evan Cheng
62694a52fe Enable machine sinking pass in non-fast mode.
llvm-svn: 63999
2009-02-07 01:57:46 +00:00
Dale Johannesen
71d758eead Remove now-unused constructors.
llvm-svn: 63995
2009-02-07 01:27:09 +00:00
Evan Cheng
cf71da05b0 Don't sink the instruction if TargetRegisterInfo::isSafeToMoveRegClassDefs doesn't think it's safe. This works around PR1911.
llvm-svn: 63994
2009-02-07 01:21:47 +00:00
Dale Johannesen
a259483aae Get rid of the last non-DebugLoc versions of getNode!
Many targets build placeholder nodes for special operands, e.g.
GlobalBaseReg on X86 and PPC for the PIC base.  There's no
sensible way to associate debug info with these.  I've left
them built with getNode calls with explicit DebugLoc::getUnknownLoc operands. 
I'm not too happy about this but don't see a good improvement;
I considered adding a getPseudoOperand or something, but it
seems to me that'll just make it harder to read.

llvm-svn: 63992
2009-02-07 00:55:49 +00:00
Dale Johannesen
1580ab6b7f Remove more non-DebugLoc getNode variants. Use
getCALLSEQ_{END,START} to permit passing no DebugLoc
there.  UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.

llvm-svn: 63978
2009-02-06 23:05:02 +00:00
Dale Johannesen
f9268f8523 And one more file.
llvm-svn: 63971
2009-02-06 21:55:48 +00:00
Dale Johannesen
c405486235 Remove more non-DebugLoc versions of getNode.
llvm-svn: 63969
2009-02-06 21:50:26 +00:00
Bill Wendling
cd6bb3e248 Clear out the CurDebugLoc info when doing a 'clear' on the SDL object.
llvm-svn: 63967
2009-02-06 21:36:23 +00:00
Dale Johannesen
7099fa18a4 Eliminate remaining non-DebugLoc version of getTargetNode.
llvm-svn: 63951
2009-02-06 19:16:40 +00:00
Dan Gohman
c097f9628e Rename SelectionDAGISel::Schedule to
SelectionDAGISel::CreateScheduler, and make it just create the
scheduler. Leave running the scheduler to the higher-level code.
This makes the higher-level code a little more explicit and
easier to follow, and will help enable some future refactoring.

llvm-svn: 63944
2009-02-06 18:26:51 +00:00
Dan Gohman
2ae1006f93 Delete an unused member function.
llvm-svn: 63941
2009-02-06 18:19:52 +00:00
Evan Cheng
e00df1d39c Move getPointerRegClass from TargetInstrInfo to TargetRegisterInfo.
llvm-svn: 63938
2009-02-06 17:43:24 +00:00
Dan Gohman
5784cf7f6d Move ScheduleDAGSDNodes.h to be a private header. Front-ends
that previously included this header should include
SchedulerRegistry.h instead.

llvm-svn: 63937
2009-02-06 17:22:58 +00:00
Evan Cheng
381b2df5ff Add TargetInstrInfo::isSafeToMoveRegisterClassDefs. It returns true if it's safe to move an instruction which defines a value in the register class. Replace pre-splitting specific IgnoreRegisterClassBarriers with this new hook.
llvm-svn: 63936
2009-02-06 17:17:30 +00:00
Dan Gohman
2d402dd7cd Move ScheduleDAGInstrs.h to be a private header. Front-ends
that used this header to select a scheduling policy should
use SchedulerRegistry.h instead (llvm-gcc and clang were
updated a while ago).

llvm-svn: 63934
2009-02-06 17:12:10 +00:00
Dale Johannesen
cda84103ff get rid of some non-DebugLoc getTargetNode variants.
llvm-svn: 63909
2009-02-06 02:08:06 +00:00
Dale Johannesen
e95c76b65e Get rid of one more non-DebugLoc getNode and
its corresponding getTargetNode.  Lots of
caller changes.

llvm-svn: 63904
2009-02-06 01:31:28 +00:00
Evan Cheng
6a938dd9e7 isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable.
This fixes sse.expandfft and sse.stepfft.

llvm-svn: 63890
2009-02-05 22:24:17 +00:00
Dale Johannesen
c96091a672 Remove a non-DebugLoc version of getNode.
llvm-svn: 63889
2009-02-05 22:07:54 +00:00
Dale Johannesen
b218273a7a Remove 3 non-DebugLoc variants of getNode.
llvm-svn: 63886
2009-02-05 21:20:44 +00:00
Evan Cheng
078ac6071d Machine LICM increases register pressure and it almost always increase code size. For now, disable it for optimizing for size.
llvm-svn: 63856
2009-02-05 08:51:13 +00:00
Evan Cheng
b36e3e34e7 Turn on machine LICM in non-fast mode.
llvm-svn: 63855
2009-02-05 08:46:33 +00:00
Evan Cheng
5087dd8359 Teach machine licm to CSE hoisted instructions.
llvm-svn: 63854
2009-02-05 08:45:46 +00:00
Evan Cheng
7ed9ce65f7 ReMaterializeTrivialDef need to trim the live interval to the last kill if the copy kills the source register. This fixes uint64tof64.ll after ARM::MOVi is marked as isAsCheapAsAMove.
llvm-svn: 63853
2009-02-05 08:45:04 +00:00
Chris Lattner
d8f77bbc07 if we have a large GEP offset on a 32-bit or other target, make
sure to print the value properly sext'd to the right pointer size.
This fixes PR3481.

llvm-svn: 63843
2009-02-05 06:55:21 +00:00
Owen Anderson
902d570061 Pre-alloc splitting needs to be more careful to avoid inserting spills/restores
between call frame setup/restore points.  Unfortunately, this regresses 
code size a bit, but at least it's correct now!

llvm-svn: 63837
2009-02-05 05:58:41 +00:00
Mon P Wang
50369c6847 Fix a bug where we were not emitting a cvt rnd sat node for converting
between a unsigned integer and signed integer.

llvm-svn: 63831
2009-02-05 04:47:42 +00:00
Dale Johannesen
fa28929927 Reapply 63765. Patches for clang and llvm-gcc to follow.
llvm-svn: 63812
2009-02-05 01:49:45 +00:00
Dale Johannesen
c901d013fb Get rid of 3 non-DebugLoc getNode variants.
llvm-svn: 63808
2009-02-05 01:01:16 +00:00
Dale Johannesen
c2896f9310 Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.
llvm-svn: 63800
2009-02-05 00:20:09 +00:00