oota-llvm.git
17 years agoUndo removal of the runtime libraries. While this may have been a bit
Reid Spencer [Fri, 17 Nov 2006 03:32:33 +0000 (03:32 +0000)]
Undo removal of the runtime libraries. While this may have been a bit
premature, these libraries will be going away for the 2.0 release. Other
arrangements for profiling, gc, etc. should be made in the next few months.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31807 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMore removal of std::cerr and DEBUG, replacing with DOUT instead.
Bill Wendling [Fri, 17 Nov 2006 02:09:07 +0000 (02:09 +0000)]
More removal of std::cerr and DEBUG, replacing with DOUT instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31806 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement a todo: change a map into a vector
Chris Lattner [Fri, 17 Nov 2006 01:52:23 +0000 (01:52 +0000)]
implement a todo: change a map into a vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31805 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd opcode to TargetInstrDescriptor.
Evan Cheng [Fri, 17 Nov 2006 01:46:27 +0000 (01:46 +0000)]
Add opcode to TargetInstrDescriptor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31804 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago#ifndef NDEBUG the "if (Stream) ..." stuff.
Bill Wendling [Fri, 17 Nov 2006 01:43:48 +0000 (01:43 +0000)]
#ifndef NDEBUG the "if (Stream) ..." stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31803 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd opcode to TargetInstrDescriptor.
Evan Cheng [Fri, 17 Nov 2006 01:36:01 +0000 (01:36 +0000)]
Add opcode to TargetInstrDescriptor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31802 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdjusted the // comments so that doxygen picks them up.
Bill Wendling [Fri, 17 Nov 2006 01:13:12 +0000 (01:13 +0000)]
Adjusted the // comments so that doxygen picks them up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31801 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReplace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
Bill Wendling [Fri, 17 Nov 2006 00:50:36 +0000 (00:50 +0000)]
Replace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
a #include of iostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31800 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix typo
Chris Lattner [Fri, 17 Nov 2006 00:49:36 +0000 (00:49 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31799 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded "DOUT" macro. This is used as a replacement for the std::cerr
Bill Wendling [Fri, 17 Nov 2006 00:49:12 +0000 (00:49 +0000)]
Added "DOUT" macro. This is used as a replacement for the std::cerr
stream. It centralizes the use of std::cerr so that static c'tor/d'tors
aren't scattered around all over the place. The way to use it is like this:

       DOUT << "This is a status line: " << Var << "\n";

If "-debug" is specified, it will print. Otherwise, it'll not print. If
NDEBUG is defined, the DOUT does nothing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31798 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplicit_def_vrrc doesn't generate code.
Chris Lattner [Thu, 16 Nov 2006 23:49:52 +0000 (23:49 +0000)]
implicit_def_vrrc doesn't generate code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31797 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew test case.
Evan Cheng [Thu, 16 Nov 2006 23:38:21 +0000 (23:38 +0000)]
New test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31796 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrect instructions for moving data between GR64 and SSE registers; also correct...
Evan Cheng [Thu, 16 Nov 2006 23:33:25 +0000 (23:33 +0000)]
Correct instructions for moving data between GR64 and SSE registers; also correct load i64 / store i64 from v2i64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31795 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a potential bug: MOVPDI2DI, etc. are not copy instructions.
Evan Cheng [Thu, 16 Nov 2006 23:22:26 +0000 (23:22 +0000)]
Fix a potential bug: MOVPDI2DI, etc. are not copy instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31794 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIn LLVM 2.0 we won't use the runtime libraries as llvm-gcc3 support will
Reid Spencer [Thu, 16 Nov 2006 23:17:27 +0000 (23:17 +0000)]
In LLVM 2.0 we won't use the runtime libraries as llvm-gcc3 support will
be dropped. This patch pertains to removing the runtime directory from LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31793 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis is a general clean up of the PowerPC ABI. Address several problems and
Jim Laskey [Thu, 16 Nov 2006 22:43:37 +0000 (22:43 +0000)]
This is a general clean up of the PowerPC ABI.  Address several problems and
bugs including making sure that the TOS links back to the previous frame,
that the maximum call frame size is not included twice when using frame
pointers, no longer growing the frame on calls, double storing of SP and
a cleaner/faster dynamic alloca.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31792 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix a regression that I introduced. stdu should scale the offset by 4
Chris Lattner [Thu, 16 Nov 2006 21:45:30 +0000 (21:45 +0000)]
fix a regression that I introduced.  stdu should scale the offset by 4
before printing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31791 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAlign stubs on 4 byte boundary. This fixes 447.dealII.
Evan Cheng [Thu, 16 Nov 2006 20:13:34 +0000 (20:13 +0000)]
Align stubs on 4 byte boundary. This fixes 447.dealII.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31790 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago*** empty log message ***
Bill Wendling [Thu, 16 Nov 2006 20:11:33 +0000 (20:11 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31789 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow target to specify alignment for function stub.
Evan Cheng [Thu, 16 Nov 2006 20:04:54 +0000 (20:04 +0000)]
Allow target to specify alignment for function stub.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31788 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMatch MachineCodeEmitter changes.
Evan Cheng [Thu, 16 Nov 2006 20:04:04 +0000 (20:04 +0000)]
Match MachineCodeEmitter changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31787 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse a release version of bugpoint, if found. Include gccld passes.
Reid Spencer [Thu, 16 Nov 2006 18:32:47 +0000 (18:32 +0000)]
Use a release version of bugpoint, if found. Include gccld passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31786 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a statistic
Chris Lattner [Thu, 16 Nov 2006 18:13:49 +0000 (18:13 +0000)]
add a statistic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31785 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCleaned up the document. Added "doc_code" divisions for code examples.
Bill Wendling [Thu, 16 Nov 2006 09:31:19 +0000 (09:31 +0000)]
Cleaned up the document. Added "doc_code" divisions for code examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31784 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDon't recompute getNumOperands for each iteration.
Bill Wendling [Thu, 16 Nov 2006 07:35:18 +0000 (07:35 +0000)]
Don't recompute getNumOperands for each iteration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31783 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded "removeRange", which takes and removes an entire LiveRange.
Bill Wendling [Thu, 16 Nov 2006 02:43:32 +0000 (02:43 +0000)]
Added "removeRange", which takes and removes an entire LiveRange.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31781 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded a new method "CreateNewLiveInterval" which, given a list of
Bill Wendling [Thu, 16 Nov 2006 02:41:50 +0000 (02:41 +0000)]
Added a new method "CreateNewLiveInterval" which, given a list of
LiveRanges, creates a new LiveInterval from them. The LiveRanges should
have existed already in another LiveInterval, but removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31780 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake this harder
Chris Lattner [Thu, 16 Nov 2006 01:22:52 +0000 (01:22 +0000)]
make this harder

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31779 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix broken encoding
Chris Lattner [Thu, 16 Nov 2006 01:01:28 +0000 (01:01 +0000)]
fix broken encoding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31778 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoenable the branch folding pass for the JIT.
Chris Lattner [Thu, 16 Nov 2006 01:00:07 +0000 (01:00 +0000)]
enable the branch folding pass for the JIT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31777 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd ppc64 r+i stores with update.
Chris Lattner [Thu, 16 Nov 2006 00:57:19 +0000 (00:57 +0000)]
add ppc64 r+i stores with update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31776 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd patterns for ppc32 preinc stores. ppc64 next.
Chris Lattner [Thu, 16 Nov 2006 00:41:37 +0000 (00:41 +0000)]
add patterns for ppc32 preinc stores.  ppc64 next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31775 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch these back to the 'bad old way'
Chris Lattner [Thu, 16 Nov 2006 00:33:34 +0000 (00:33 +0000)]
switch these back to the 'bad old way'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31774 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix an incorrectly inverted condition.
Evan Cheng [Thu, 16 Nov 2006 00:08:20 +0000 (00:08 +0000)]
Fix an incorrectly inverted condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31773 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChangeToRegister should clear IsImp bit.
Evan Cheng [Wed, 15 Nov 2006 23:55:03 +0000 (23:55 +0000)]
ChangeToRegister should clear IsImp bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31772 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix ppc64 epilog bug.
Chris Lattner [Wed, 15 Nov 2006 23:35:30 +0000 (23:35 +0000)]
Fix ppc64 epilog bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31771 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoStop using isTwoAddress, switching to operand constraints instead.
Chris Lattner [Wed, 15 Nov 2006 23:24:18 +0000 (23:24 +0000)]
Stop using isTwoAddress, switching to operand constraints instead.

Tell the codegen emitter that specific operands are not to be encoded, fixing
JIT regressions w.r.t. pre-inc loads and stores (e.g. lwzu, which we generate
even when general preinc loads are not enabled).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31770 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove the isTwoAddress property from the CodeGenInstruction class. It should
Chris Lattner [Wed, 15 Nov 2006 23:23:02 +0000 (23:23 +0000)]
Remove the isTwoAddress property from the CodeGenInstruction class.  It should
not be used for anything other than backwards compat constraint handling.

Add support for a new DisableEncoding property which contains a list of
registers that should not be encoded by the generated code emitter.  Convert
the codeemitter generator to use this, fixing some PPC JIT regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31769 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a new field needed by the code emitter generator.
Chris Lattner [Wed, 15 Nov 2006 22:55:04 +0000 (22:55 +0000)]
add a new field needed by the code emitter generator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31768 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix typo pointed out by Bryan Adams
Chris Lattner [Wed, 15 Nov 2006 21:04:15 +0000 (21:04 +0000)]
Fix typo pointed out by Bryan Adams

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31766 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProperly transfer kill / dead info.
Evan Cheng [Wed, 15 Nov 2006 20:58:11 +0000 (20:58 +0000)]
Properly transfer kill / dead info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31765 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoKill / dead info has been moved to MI's.
Evan Cheng [Wed, 15 Nov 2006 20:56:39 +0000 (20:56 +0000)]
Kill / dead info has been moved to MI's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31764 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocommuteInstruction should propagate kill / dead info.
Evan Cheng [Wed, 15 Nov 2006 20:56:03 +0000 (20:56 +0000)]
commuteInstruction should propagate kill / dead info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31763 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMatch live variable changes.
Evan Cheng [Wed, 15 Nov 2006 20:55:15 +0000 (20:55 +0000)]
Match live variable changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31762 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMinor updates.
Evan Cheng [Wed, 15 Nov 2006 20:54:29 +0000 (20:54 +0000)]
Minor updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31761 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoA register def can be partially dead when the whole register has use(s) but a subreg...
Evan Cheng [Wed, 15 Nov 2006 20:54:11 +0000 (20:54 +0000)]
A register def can be partially dead when the whole register has use(s) but a subreg does not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31760 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDo away with kill / dead maps. Move kill / dead info onto MI's.
Evan Cheng [Wed, 15 Nov 2006 20:51:59 +0000 (20:51 +0000)]
Do away with kill / dead maps. Move kill / dead info onto MI's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31759 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd copyKillDeadInfo to copy kill / dead info; other minor updates.
Evan Cheng [Wed, 15 Nov 2006 20:48:17 +0000 (20:48 +0000)]
Add copyKillDeadInfo to copy kill / dead info; other minor updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31758 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix ldu/stu jit encoding. Swith 64-bit preinc load instrs to use memri
Chris Lattner [Wed, 15 Nov 2006 19:55:13 +0000 (19:55 +0000)]
fix ldu/stu jit encoding. Swith 64-bit preinc load instrs to use memri
addrmodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31757 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd run(Function &F) support in FunctionPassManager_New
Devang Patel [Wed, 15 Nov 2006 19:39:54 +0000 (19:39 +0000)]
Add run(Function &F) support in FunctionPassManager_New

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31756 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSimplify IntrinsicLowering and clarify that it is only for use by the
Chris Lattner [Wed, 15 Nov 2006 18:00:10 +0000 (18:00 +0000)]
Simplify IntrinsicLowering and clarify that it is only for use by the
CBE and interpreter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31755 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove unneeded forward decls
Chris Lattner [Wed, 15 Nov 2006 17:53:13 +0000 (17:53 +0000)]
Remove unneeded forward decls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31754 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove dead #include
Chris Lattner [Wed, 15 Nov 2006 17:51:15 +0000 (17:51 +0000)]
remove dead #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31753 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix the PPC regressions last night
Chris Lattner [Wed, 15 Nov 2006 17:40:51 +0000 (17:40 +0000)]
Fix the PPC regressions last night

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31752 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a gcc 4.2 warning.
Chris Lattner [Wed, 15 Nov 2006 04:53:24 +0000 (04:53 +0000)]
Fix a gcc 4.2 warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31751 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a method to get the bit width of a packed type.
Reid Spencer [Wed, 15 Nov 2006 03:02:41 +0000 (03:02 +0000)]
Add a method to get the bit width of a packed type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31750 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSwitch loads over to use memri as the operand instead of a reg/imm operand
Chris Lattner [Wed, 15 Nov 2006 02:43:19 +0000 (02:43 +0000)]
Switch loads over to use memri as the operand instead of a reg/imm operand
pair for cleanliness.  Add instructions for PPC32 preinc-stores with commented
out patterns.  More improvement is needed to enable the patterns, but we're
getting close.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31749 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoADd support for adding constraints to suboperands
Chris Lattner [Wed, 15 Nov 2006 02:38:17 +0000 (02:38 +0000)]
ADd support for adding constraints to suboperands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31748 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd doInitialization and doFinalization support in FunctionManager_New.
Devang Patel [Wed, 15 Nov 2006 02:07:25 +0000 (02:07 +0000)]
Add doInitialization and doFinalization support in FunctionManager_New.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31747 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTidy up marking of last analysis user pass.
Devang Patel [Wed, 15 Nov 2006 01:48:14 +0000 (01:48 +0000)]
Tidy up marking of last analysis user pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31746 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd doInitialization and doFinalization support in FunctionManager_New.
Devang Patel [Wed, 15 Nov 2006 01:27:05 +0000 (01:27 +0000)]
Add doInitialization and doFinalization support in FunctionManager_New.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31745 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDo not derive CommonPassManagerImpl from Pass.
Devang Patel [Wed, 15 Nov 2006 01:11:27 +0000 (01:11 +0000)]
Do not derive CommonPassManagerImpl from Pass.
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31744 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorestore some 'magic' code that I removed: it is needed. Add comments explaining
Chris Lattner [Tue, 14 Nov 2006 22:17:10 +0000 (22:17 +0000)]
restore some 'magic' code that I removed: it is needed.  Add comments explaining
why.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31743 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agominimal hack to get patterns whose result type is iPTR to be selected.
Chris Lattner [Tue, 14 Nov 2006 21:50:27 +0000 (21:50 +0000)]
minimal hack to get patterns whose result type is iPTR to be selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31742 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCopy initializeAnalysisImpl() implementation from PassManagerT.
Devang Patel [Tue, 14 Nov 2006 21:49:36 +0000 (21:49 +0000)]
Copy initializeAnalysisImpl() implementation from PassManagerT.
Update LastUser to recursively walk required transitive set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31741 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove some dead code
Chris Lattner [Tue, 14 Nov 2006 21:41:35 +0000 (21:41 +0000)]
remove some dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31740 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd support for nodes that return iPTR.
Chris Lattner [Tue, 14 Nov 2006 21:32:01 +0000 (21:32 +0000)]
Add support for nodes that return iPTR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31739 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agochanges to get ptr_rc to be accepted in patterns. This is needed for ppc preinc
Chris Lattner [Tue, 14 Nov 2006 21:18:40 +0000 (21:18 +0000)]
changes to get ptr_rc to be accepted in patterns.  This is needed for ppc preinc
stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31738 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRevert. This wasn't meant to be checked in.
Evan Cheng [Tue, 14 Nov 2006 19:20:33 +0000 (19:20 +0000)]
Revert. This wasn't meant to be checked in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31737 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agogroup load and store instructions together. No functionality change.
Chris Lattner [Tue, 14 Nov 2006 19:19:53 +0000 (19:19 +0000)]
group load and store instructions together.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31736 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix predicates for unindexed stores so they don't accidentally match indexed
Chris Lattner [Tue, 14 Nov 2006 19:13:39 +0000 (19:13 +0000)]
Fix predicates for unindexed stores so they don't accidentally match indexed
stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31735 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRework PPC64 calls. Now we have a LR8/CTR8 register which the PPC64 calls
Chris Lattner [Tue, 14 Nov 2006 18:44:47 +0000 (18:44 +0000)]
Rework PPC64 calls.  Now we have a LR8/CTR8 register which the PPC64 calls
clobber.  This allows LR8 to be save/restored correctly as a 64-bit quantity,
instead of handling it as a 32-bit quantity.  This unbreaks ppc64 codegen when
the code is actually located above the 4G boundary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31734 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove a ton of custom selection logic no longer needed
Chris Lattner [Tue, 14 Nov 2006 18:43:11 +0000 (18:43 +0000)]
remove a ton of custom selection logic no longer needed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31733 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug handling nodes with variable arguments. The code was fixed to assume
Chris Lattner [Tue, 14 Nov 2006 18:41:38 +0000 (18:41 +0000)]
Fix a bug handling nodes with variable arguments.  The code was fixed to assume
that there were two input operands before the variable operand portion.  This
*happened* to be true for all call instructions, which took a chain and a
destination, but was not true for the PPC BCTRL instruction, whose destination
is implicit.

Making this code more general allows elimination of the custom selection logic
for BCTRL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31732 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoit would be nice of ctlz were lowered to bsf etc.
Chris Lattner [Tue, 14 Nov 2006 08:08:46 +0000 (08:08 +0000)]
it would be nice of ctlz were lowered to bsf etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31730 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement InstCombine/shift-simplify.ll by transforming:
Chris Lattner [Tue, 14 Nov 2006 07:46:50 +0000 (07:46 +0000)]
implement InstCombine/shift-simplify.ll by transforming:
(X >> Z) op (Y >> Z)  -> (X op Y) >> Z

for all shifts and all ops={and/or/xor}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31729 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 14 Nov 2006 07:45:36 +0000 (07:45 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31728 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement InstCombine/and-compare.ll:test1. This compiles:
Chris Lattner [Tue, 14 Nov 2006 06:06:06 +0000 (06:06 +0000)]
implement InstCombine/and-compare.ll:test1.  This compiles:

typedef struct { unsigned prefix : 4; unsigned code : 4; unsigned unsigned_p : 4; } tree_common;
int foo(tree_common *a, tree_common *b) { return a->code == b->code; }

into:

_foo:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl (%eax), %eax
        xorl (%ecx), %eax
        # TRUNCATE movb %al, %al
        shrb $4, %al
        testb %al, %al
        sete %al
        movzbl %al, %eax
        ret

instead of:

_foo:
        movl 8(%esp), %eax
        movb (%eax), %al
        shrb $4, %al
        movl 4(%esp), %ecx
        movb (%ecx), %cl
        shrb $4, %cl
        cmpb %al, %cl
        sete %al
        movzbl %al, %eax
        ret

saving one cycle by eliminating a shift.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31727 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 14 Nov 2006 06:04:35 +0000 (06:04 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31726 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agolower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
Chris Lattner [Tue, 14 Nov 2006 05:28:08 +0000 (05:28 +0000)]
lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
'(shr (ctlz (sub Y, Z)), 5)'.

The use of xor better exposes the operation to bit-twiddling logic in the
dag combiner.  For example, this:

typedef struct {
  unsigned prefix : 4;
  unsigned code : 4;
  unsigned unsigned_p : 4;
} tree_common;

int foo(tree_common *a, tree_common *b) {
  return a->code == b->code;
}

Now compiles to:

_foo:
        lwz r2, 0(r4)
        lwz r3, 0(r3)
        xor r2, r3, r2
        rlwinm r2, r2, 28, 28, 31
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

instead of:

_foo:
        lbz r2, 3(r4)
        lbz r3, 3(r3)
        srwi r2, r2, 4
        srwi r3, r3, 4
        subf r2, r2, r3
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

saving a cycle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31725 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoA shim over other AA impls to catch incorrect uses
Andrew Lenharth [Tue, 14 Nov 2006 05:21:04 +0000 (05:21 +0000)]
A shim over other AA impls to catch incorrect uses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31724 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDiscard code that supported old bytecode formats. This makes the Bytecode
Reid Spencer [Tue, 14 Nov 2006 04:47:22 +0000 (04:47 +0000)]
Discard code that supported old bytecode formats. This makes the Bytecode
Reader code much easier to read and maintain. Backwards compatibility from
version 5 format has been retained. Older formats will produce an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31723 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement removeDeadPasses().
Devang Patel [Tue, 14 Nov 2006 03:05:08 +0000 (03:05 +0000)]
Implement removeDeadPasses().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31722 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoKeep track of Last user of analysis phase.
Devang Patel [Tue, 14 Nov 2006 02:54:23 +0000 (02:54 +0000)]
Keep track of Last user of analysis phase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31721 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse std::map to map AnalysisID and Pass.
Devang Patel [Tue, 14 Nov 2006 01:59:59 +0000 (01:59 +0000)]
Use std::map to map AnalysisID and Pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31720 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Tue, 14 Nov 2006 01:57:53 +0000 (01:57 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31719 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agominor tweaks, reject vector preinc.
Chris Lattner [Tue, 14 Nov 2006 01:38:31 +0000 (01:38 +0000)]
minor tweaks, reject vector preinc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31717 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoManage analysis passes during run.
Devang Patel [Tue, 14 Nov 2006 01:23:29 +0000 (01:23 +0000)]
Manage analysis passes during run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31716 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdating configure script for 2.0
Tanya Lattner [Tue, 14 Nov 2006 00:59:52 +0000 (00:59 +0000)]
Updating configure script for 2.0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31715 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate comments.
Devang Patel [Tue, 14 Nov 2006 00:03:04 +0000 (00:03 +0000)]
Update comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31713 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMatches MachineInstr changes.
Evan Cheng [Mon, 13 Nov 2006 23:36:35 +0000 (23:36 +0000)]
Matches MachineInstr changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31712 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago- Let MachineInstr ctors add implicit def and use operands. Other operands
Evan Cheng [Mon, 13 Nov 2006 23:34:06 +0000 (23:34 +0000)]
- Let MachineInstr ctors add implicit def and use operands. Other operands
  will be inserted before these operands. If the opcode changes (by
  setOpcode), the implicit operands are updated as well.
- Added IsKill, IsDead fields to MachineOperand in preparation for changes
  that move kill / dead info to MachineInstr's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31711 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate PassManagerImpl_New::analysisCurrentlyAvailable to check all
Devang Patel [Mon, 13 Nov 2006 22:53:19 +0000 (22:53 +0000)]
Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
managed passmanagers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31710 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCheck currently available anlysis in active managers.
Devang Patel [Mon, 13 Nov 2006 22:40:09 +0000 (22:40 +0000)]
Check currently available anlysis in active managers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31709 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoteach the g5 hazard recognizer about update loads. This fixes
Chris Lattner [Mon, 13 Nov 2006 20:11:06 +0000 (20:11 +0000)]
teach the g5 hazard recognizer about update loads.  This fixes
Ptrdist/anagram among others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31708 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 18:00:52 +0000 (18:00 +0000)]
For PR950:
Changes for new cast instructions that are backwards compatible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31707 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDon't hard code test names into the test.
Reid Spencer [Mon, 13 Nov 2006 17:55:34 +0000 (17:55 +0000)]
Don't hard code test names into the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31706 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix 80 cols violations.
Reid Spencer [Mon, 13 Nov 2006 16:21:09 +0000 (16:21 +0000)]
Fix 80 cols violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31705 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 16:13:38 +0000 (16:13 +0000)]
For PR950:
Use the notcast script in preparation for 12 casts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31704 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Mon, 13 Nov 2006 16:12:25 +0000 (16:12 +0000)]
For PR950:
Use the notcast script in preparation for 12 cast instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31703 91177308-0d34-0410-b5e6-96231b3b80d8