Commit Graph

27202 Commits

Author SHA1 Message Date
Dan Gohman
5cffa6fe27 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 00:12:28 +00:00
Dan Gohman
bed353d016 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 23:29:38 +00:00
Dan Gohman
9e64bbb322 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 23:27:53 +00:00
Devang Patel
0464a1431b Ignore dbg intrinsic while folding unconditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 22:14:17 +00:00
Evan Cheng
1d76864df3 Handle llvm.x86.sse2.maskmov.dqu in 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 22:06:28 +00:00
Evan Cheng
7403eeaa88 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 21:39:44 +00:00
Devang Patel
7afe8fa066 Use early exits. Reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 19:28:07 +00:00
Dan Gohman
d4e1845849 Use const, to support platforms where strrchr returns a const char *.
This fixes PR3535.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64224 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 17:56:28 +00:00
Duncan Sands
35b5107951 Pacify gcc-4.3 (thinks IsConstant may be used
uninitialized).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 16:24:55 +00:00
Evan Cheng
f0e366a929 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 08:30:11 +00:00
Devang Patel
f66d7b5a51 Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 07:48:18 +00:00
Devang Patel
4afc90dacf Enable scalar replacement of AllocaInst whose one of the user is dbg info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 07:00:59 +00:00
Devang Patel
2303df96b0 Validate file id.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64204 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 06:04:08 +00:00
Sanjiv Gupta
2cc753170b Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 04:20:26 +00:00
Evan Cheng
a0eedac226 Implement FpSET_ST1_*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 23:32:07 +00:00
Evan Cheng
4ded02f8bd If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 22:47:36 +00:00
Dale Johannesen
1de17d574c Fix PR 3471, and some cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 22:14:15 +00:00
Evan Cheng
65b52dffe0 Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 21:01:06 +00:00
Evan Cheng
b1032a8a2f Make sure constant subscript is truncated to ptr size if it may not fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 20:54:38 +00:00
Dan Gohman
333014e256 Use doxygen comment syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 18:12:09 +00:00
Dan Gohman
b9070d3f63 Use slightly more correct grammar in error messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 17:41:21 +00:00
Gabor Greif
ccd27fb84b make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 15:45:06 +00:00
Evan Cheng
8f0d99e463 Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 08:45:39 +00:00
Evan Cheng
190424edcd Fix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case possible since I don't know what to grep for. :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 08:37:45 +00:00
Evan Cheng
dc54d317e7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 07:14:22 +00:00
Mikhail Glushenkov
ba041f45fe Add a Sleep() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 22:47:39 +00:00
Mikhail Glushenkov
0cdadd8b9d Add Emacs hints to Alarm.inc.
Also removes some trailing whitespace and fixes one 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 21:10:57 +00:00
Chris Lattner
be685cc72a add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 20:44:19 +00:00
Chris Lattner
4a2f112a5c fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 20:00:15 +00:00
Chris Lattner
b4bd16fc5e reject void pointers with a nice error:
llvm-as: t.ll:2:15: pointers to void are invalid, use i8* instead
%X = type void*
              ^

instead of asserting and dying.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 19:56:22 +00:00
Evan Cheng
0a1fcce092 Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 11:04:35 +00:00
Evan Cheng
86fb9fdb20 Strengthen the previous check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 08:24:28 +00:00
Evan Cheng
f18134a1ae 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 08:00:36 +00:00
Evan Cheng
77fde2cbb1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410-b5e6-96231b3b80d8 2009-02-08 07:48:37 +00:00
Bill Wendling
b805030e02 Mistakenly turned this on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 01:32:00 +00:00
Bill Wendling
7f51fd3ea9 Revert r63999. It was breaking self-hosting builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 00:58:05 +00:00
Chris Lattner
556b4a6385 Add missing break statements, fixing PR3503.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 22:37:06 +00:00
Mon P Wang
6753f959d2 Instrcombine should not change load(cast p) to cast(load p) if the cast
changes the address space of the pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 22:19:29 +00:00
Dale Johannesen
6f38cb61a9 Use getDebugLoc forwarder instead of getNode()->getDebugLoc.
No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 19:59:05 +00:00
Dan Gohman
1fdbc1dd4e Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
ScheduleDAG's TLI member to use const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 16:15:20 +00:00
Nick Lewycky
f996831427 Add an API for strings with possible NULLs in the middle. Refactor the other
two AddString methods to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 04:57:08 +00:00
Mike Stump
f344d83d39 Insert space to avoid warning and make code more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 03:36:02 +00:00
Dale Johannesen
92570c4a1a 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 02:15:05 +00:00
Evan Cheng
c963b638c7 Enable machine sinking pass in non-fast mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 01:57:46 +00:00
Dale Johannesen
edb62c484e Remove now-unused constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 01:27:09 +00:00
Evan Cheng
b6f5417edb Don't sink the instruction if TargetRegisterInfo::isSafeToMoveRegClassDefs doesn't think it's safe. This works around PR1911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 01:21:47 +00:00
Dale Johannesen
0469280776 Needs this file too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 00:56:46 +00:00
Dale Johannesen
b300d2aa3e 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 00:55:49 +00:00
Dan Gohman
2d0a1cc416 Refactor some repeated logic into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 00:43:41 +00:00
Dan Gohman
288b824cef Make a comment a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 00:42:54 +00:00