Commit Graph

27180 Commits

Author SHA1 Message Date
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
Dale Johannesen
e8d7230f48 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 23:05:02 +00:00
Dale Johannesen
e72c5964d5 And one more file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:55:48 +00:00
Dale Johannesen
de06470330 Remove more non-DebugLoc versions of getNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:50:26 +00:00
Bill Wendling
ac06d004a0 Record debug location information in the Dwarf writer.
A simple test program shows that debugging works. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:45:08 +00:00
Bill Wendling
8fcf170a66 Clear out the CurDebugLoc info when doing a 'clear' on the SDL object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:36:23 +00:00
Dan Gohman
21afcda544 Split the locking out of JIT::runJITOnFunction so that callers
that already hold the lock can call an entry point that doesn't
re-acquire the lock.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:25:08 +00:00
Dan Gohman
9036d80d7b Use .size and .type on ELF systems; this helps tools that map
addresses to symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 21:15:52 +00:00
Dale Johannesen
f5f5dce897 Eliminate remaining non-DebugLoc version of getTargetNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63951 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 19:16:40 +00:00
Dan Gohman
0a3776dc6f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 18:26:51 +00:00
Sanjiv Gupta
a2d8b06272 Print globl directive for variables with external linkage (global variables).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 18:24:59 +00:00
Dan Gohman
56774d2b0d Delete an unused member function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 18:19:52 +00:00
Evan Cheng
770bcc7b15 Move getPointerRegClass from TargetInstrInfo to TargetRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 17:43:24 +00:00
Dan Gohman
84fbac5809 Move ScheduleDAGSDNodes.h to be a private header. Front-ends
that previously included this header should include
SchedulerRegistry.h instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 17:22:58 +00:00
Evan Cheng
4350eb86a7 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 17:17:30 +00:00
Dan Gohman
6dc75fe527 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63934 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 17:12:10 +00:00
Devang Patel
d96c60df3f Ignore DbgInfoIntrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 06:19:06 +00:00
Chris Lattner
e991ced7cb fix PR3489, use bits instead of bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 04:34:07 +00:00
Dale Johannesen
f90b2a7742 get rid of some non-DebugLoc getTargetNode variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 02:08:06 +00:00
Dale Johannesen
ed2eee63a6 Get rid of one more non-DebugLoc getNode and
its corresponding getTargetNode.  Lots of
caller changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:31:28 +00:00
Owen Anderson
d9289a54cd Fix a crasher: we need to check that the function is non-null before using it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 00:13:43 +00:00
Owen Anderson
e79422096e Refactor my previous change to maintain the distinction between AliasAnalysis and BasicAliasAnalysis. This involves some wider changes because it
folds away some never-used methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 23:36:27 +00:00
Devang Patel
32d9701d68 Ignore dbg intrinsics while propagating conditional expression info. Take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 23:32:52 +00:00