oota-llvm.git
15 years agoFix the build with gcc 4.3 as the host, patch by Zhongxing Xu!
Chris Lattner [Thu, 21 Aug 2008 06:25:28 +0000 (06:25 +0000)]
Fix the build with gcc 4.3 as the host, patch by Zhongxing Xu!

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

15 years agoImplement operator<< in terms of basic types rather than [u]int*_t, which is better...
Owen Anderson [Thu, 21 Aug 2008 06:20:47 +0000 (06:20 +0000)]
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability.  There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.

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

15 years agoRevert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
Nick Lewycky [Thu, 21 Aug 2008 05:56:10 +0000 (05:56 +0000)]
Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
slowdown in bzip2.

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

15 years agounbreak the CBE on treeadd an many others.
Chris Lattner [Thu, 21 Aug 2008 05:51:43 +0000 (05:51 +0000)]
unbreak the CBE on treeadd an many others.

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

15 years agoFix build on GCC 4.3.
Nick Lewycky [Thu, 21 Aug 2008 05:36:03 +0000 (05:36 +0000)]
Fix build on GCC 4.3.

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

15 years agoRemove size_t operator; this unbreaks the build on Linux. Committing on
Eli Friedman [Thu, 21 Aug 2008 04:28:31 +0000 (04:28 +0000)]
Remove size_t operator; this unbreaks the build on Linux.  Committing on
the suggestion of resistor.

If this breaks some other platform, please go ahead and back this out.

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

15 years agorecommit bcreader, handling packed structs correctly. Apparently
Chris Lattner [Thu, 21 Aug 2008 02:34:16 +0000 (02:34 +0000)]
recommit bcreader, handling packed structs correctly.  Apparently
people want fast *and* correct.  Sheesh.

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

15 years agoRevert 55090, regressions in:
Daniel Dunbar [Thu, 21 Aug 2008 01:54:58 +0000 (01:54 +0000)]
Revert 55090, regressions in:
 - Postgres
 - llvm-test/SingleSource/UnitTests/{2006-01-23-InitializedBitField,
   2004-11-28-GlobalBoolLayout, 2003-05-02-DependentPHI}

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

15 years agoBasic fast-isel support for instructions with constant int operands.
Dan Gohman [Thu, 21 Aug 2008 01:41:07 +0000 (01:41 +0000)]
Basic fast-isel support for instructions with constant int operands.

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

15 years agoType of first GEP operand is always the same as the target pointer type.
Evan Cheng [Thu, 21 Aug 2008 01:19:11 +0000 (01:19 +0000)]
Type of first GEP operand is always the same as the target pointer type.

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

15 years agoRemove the code that limited FastISel to certain fixed signatures.
Dan Gohman [Thu, 21 Aug 2008 00:35:26 +0000 (00:35 +0000)]
Remove the code that limited FastISel to certain fixed signatures.

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

15 years agoImprove the doxygen comment for SelectInstructions::SelectInstructions.
Dan Gohman [Thu, 21 Aug 2008 00:19:43 +0000 (00:19 +0000)]
Improve the doxygen comment for SelectInstructions::SelectInstructions.

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

15 years agoBegin making more use of the FastISelEmitter class.
Dan Gohman [Thu, 21 Aug 2008 00:19:05 +0000 (00:19 +0000)]
Begin making more use of the FastISelEmitter class.

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

15 years agoUse raw_ostream throughout the AsmPrinter.
Owen Anderson [Thu, 21 Aug 2008 00:14:44 +0000 (00:14 +0000)]
Use raw_ostream throughout the AsmPrinter.

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

15 years agoFix an N^2 issue handling constant resolution due to RAUW in large arrays
Chris Lattner [Thu, 21 Aug 2008 00:11:50 +0000 (00:11 +0000)]
Fix an N^2 issue handling constant resolution due to RAUW in large arrays
this speeds up the bcreader from 6.67s to 0.12s on a testcase Daniel
provided.  rdar://6158117

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

15 years agoFix unused variable warnings.
Dan Gohman [Wed, 20 Aug 2008 23:53:10 +0000 (23:53 +0000)]
Fix unused variable warnings.

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

15 years agoSilence a compiler warning.
Evan Cheng [Wed, 20 Aug 2008 23:36:48 +0000 (23:36 +0000)]
Silence a compiler warning.

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

15 years agoFirst cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
Evan Cheng [Wed, 20 Aug 2008 22:45:34 +0000 (22:45 +0000)]
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.

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

15 years agoAdd a new ConstantExpr::getWithOperands that takes any array of operands
Chris Lattner [Wed, 20 Aug 2008 22:27:40 +0000 (22:27 +0000)]
Add a new ConstantExpr::getWithOperands that takes any array of operands
instead of requiring an std::vector.

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

15 years agoRemove an obsolete todo comment.
Dan Gohman [Wed, 20 Aug 2008 21:47:28 +0000 (21:47 +0000)]
Remove an obsolete todo comment.

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

15 years agoFactor the code for determining the target-specific instruction
Dan Gohman [Wed, 20 Aug 2008 21:45:57 +0000 (21:45 +0000)]
Factor the code for determining the target-specific instruction
namespace out of the isel emitters and into common code.

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

15 years agoMove the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATE
Dan Gohman [Wed, 20 Aug 2008 21:27:32 +0000 (21:27 +0000)]
Move the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATE
out of X86ISelDAGToDAG.cpp C++ code and into tablegen code.
Among other things, using tablegen for these things makes them
friendlier to FastISel.

Tablegen can handle the case of i8 subregs on x86-32, but currently
the C++ code for that case uses MVT::Flag in a tricky way, and it
happens to schedule better in some cases. So for now, leave the
C++ code in place to handle the i8 case on x86-32.

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

15 years agoSimplify the BuildMI calls even more.
Dan Gohman [Wed, 20 Aug 2008 21:10:53 +0000 (21:10 +0000)]
Simplify the BuildMI calls even more.

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

15 years agoSimplify FastISel's constructor argument list, make the FastISel
Dan Gohman [Wed, 20 Aug 2008 21:05:57 +0000 (21:05 +0000)]
Simplify FastISel's constructor argument list, make the FastISel
class hold a MachineRegisterInfo member, and make the
MachineBasicBlock be passed in to SelectInstructions rather
than the FastISel constructor.

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

15 years agoDump the instruction that foiled ISel even when -debug is not used.
Dan Gohman [Wed, 20 Aug 2008 20:47:32 +0000 (20:47 +0000)]
Dump the instruction that foiled ISel even when -debug is not used.

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

15 years agoDon't hoist instructions that define a physical register.
Bill Wendling [Wed, 20 Aug 2008 20:32:05 +0000 (20:32 +0000)]
Don't hoist instructions that define a physical register.

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

15 years agoMake more use of the BuildMI API.
Dan Gohman [Wed, 20 Aug 2008 18:16:32 +0000 (18:16 +0000)]
Make more use of the BuildMI API.

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

15 years agoMinor code reorganization.
Dan Gohman [Wed, 20 Aug 2008 18:10:48 +0000 (18:10 +0000)]
Minor code reorganization.

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

15 years agoMinor whitespace cleanup.
Dan Gohman [Wed, 20 Aug 2008 18:09:38 +0000 (18:09 +0000)]
Minor whitespace cleanup.

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

15 years agoFix 80 column violation.
Dan Gohman [Wed, 20 Aug 2008 18:09:02 +0000 (18:09 +0000)]
Fix 80 column violation.

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

15 years agoKill off SimpleBBISel, it's replaced by FastISel.
Evan Cheng [Wed, 20 Aug 2008 17:50:32 +0000 (17:50 +0000)]
Kill off SimpleBBISel, it's replaced by FastISel.

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

15 years agoMove the fast-path (<=i64) cases of various APInt methods inline
Chris Lattner [Wed, 20 Aug 2008 17:02:31 +0000 (17:02 +0000)]
Move the fast-path (<=i64) cases of various APInt methods inline
and the slow-path cases out of line.  This speeds up instcombine
a bit in real world cases.  Patch contributed by m-s.

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

15 years agoDisable DAGCombine's alignment inference in "fast" codegen mode.
Dan Gohman [Wed, 20 Aug 2008 16:30:28 +0000 (16:30 +0000)]
Disable DAGCombine's alignment inference in "fast" codegen mode.

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

15 years agoChange the FoldingSetNodeID usage for objects which carry
Dan Gohman [Wed, 20 Aug 2008 15:58:01 +0000 (15:58 +0000)]
Change the FoldingSetNodeID usage for objects which carry
alignment and volatility information, such as loads and
stores, to reduce the number of integer values added to
the FoldingSetNodeID.

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

15 years agoClean up a dead return missed in r55055.
Dan Gohman [Wed, 20 Aug 2008 15:54:46 +0000 (15:54 +0000)]
Clean up a dead return missed in r55055.

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

15 years agoTablegen generated code already tests the opcode value, so it's not
Dan Gohman [Wed, 20 Aug 2008 15:24:22 +0000 (15:24 +0000)]
Tablegen generated code already tests the opcode value, so it's not
necessary to use dyn_cast in these predicates.

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

15 years agoUse BitVector instead of std::vector<unsigned char>.
Dan Gohman [Wed, 20 Aug 2008 14:58:41 +0000 (14:58 +0000)]
Use BitVector instead of std::vector<unsigned char>.

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

15 years agoIt's not necessary to check if a value is null before delete[].
Dan Gohman [Wed, 20 Aug 2008 14:55:37 +0000 (14:55 +0000)]
It's not necessary to check if a value is null before delete[].

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

15 years agoUse cast instead of dyn_cast.
Dan Gohman [Wed, 20 Aug 2008 14:50:24 +0000 (14:50 +0000)]
Use cast instead of dyn_cast.

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

15 years agoAvoid an empty-if-body warning in release builds.
Dan Gohman [Wed, 20 Aug 2008 14:00:56 +0000 (14:00 +0000)]
Avoid an empty-if-body warning in release builds.

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

15 years agoFix indentation.
Dan Gohman [Wed, 20 Aug 2008 13:50:12 +0000 (13:50 +0000)]
Fix indentation.

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

15 years agoFix comment spacing.
Dan Gohman [Wed, 20 Aug 2008 13:46:21 +0000 (13:46 +0000)]
Fix comment spacing.

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

15 years agoFixed shuffle optimizations to handle non power of 2 vectors
Mon P Wang [Wed, 20 Aug 2008 02:23:25 +0000 (02:23 +0000)]
Fixed shuffle optimizations to handle non power of 2 vectors

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

15 years agoFix the string for MVT::isVoid.
Dan Gohman [Wed, 20 Aug 2008 01:44:30 +0000 (01:44 +0000)]
Fix the string for MVT::isVoid.

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

15 years agoFix FastISel to recognize that the last block in the function does
Dan Gohman [Wed, 20 Aug 2008 01:17:01 +0000 (01:17 +0000)]
Fix FastISel to recognize that the last block in the function does
not have a fall-through successor.

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

15 years agoFix a leak in the FastISel code that Chris pointed out.
Dan Gohman [Wed, 20 Aug 2008 00:56:17 +0000 (00:56 +0000)]
Fix a leak in the FastISel code that Chris pointed out.

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

15 years agoAdd a -march line for this test, and run it on x86-64 too for fun.
Dan Gohman [Wed, 20 Aug 2008 00:56:07 +0000 (00:56 +0000)]
Add a -march line for this test, and run it on x86-64 too for fun.

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

15 years agoAdd remaining 64-bit atomic patterns for x86-64.
Dale Johannesen [Wed, 20 Aug 2008 00:48:50 +0000 (00:48 +0000)]
Add remaining 64-bit atomic patterns for x86-64.

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

15 years agoAdd support for running SelectionDAG if FastISel fails. This is under
Dan Gohman [Wed, 20 Aug 2008 00:47:54 +0000 (00:47 +0000)]
Add support for running SelectionDAG if FastISel fails. This is under
a command-line option, so that the default behavior is an abort, which
is useful for exposing code that isn't supported yet.

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

15 years agoFix FastISel to recognize unhandled operands, such as constants
Dan Gohman [Wed, 20 Aug 2008 00:35:17 +0000 (00:35 +0000)]
Fix FastISel to recognize unhandled operands, such as constants
that aren't available as virtual registers (for now).

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

15 years agoll printer prints each zeroinit on the same line now, update regex
Chris Lattner [Wed, 20 Aug 2008 00:33:57 +0000 (00:33 +0000)]
ll printer prints each zeroinit on the same line now, update regex

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

15 years agoRevert r55018 and apply the correct "fix" for the 64-bit sub_and_fetch atomic.
Bill Wendling [Wed, 20 Aug 2008 00:28:16 +0000 (00:28 +0000)]
Revert r55018 and apply the correct "fix" for the 64-bit sub_and_fetch atomic.
Just expand it like the other X-bit sub_and_fetches.

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

15 years agoGet rid of a couple of dynamic_cast.
Evan Cheng [Wed, 20 Aug 2008 00:28:12 +0000 (00:28 +0000)]
Get rid of a couple of dynamic_cast.

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

15 years agoAdd FastISel support for floating-point operations.
Dan Gohman [Wed, 20 Aug 2008 00:23:20 +0000 (00:23 +0000)]
Add FastISel support for floating-point operations.

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

15 years agoAdd FastISel support for several more binary operators.
Dan Gohman [Wed, 20 Aug 2008 00:11:48 +0000 (00:11 +0000)]
Add FastISel support for several more binary operators.

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

15 years agoAdd support for the __sync_sub_and_fetch atomics and friends for X86. The code
Bill Wendling [Tue, 19 Aug 2008 23:09:18 +0000 (23:09 +0000)]
Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
was already present, but not hooked up to anything.

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

15 years agoFast-isel is now *minimally* functional. Add a testcase to
Dan Gohman [Tue, 19 Aug 2008 22:37:59 +0000 (22:37 +0000)]
Fast-isel is now *minimally* functional. Add a testcase to
demonstrate the extent of its capabilities. Note that it
only attempts to operate on one of the blocks in this
testcase.

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

15 years agoAdd code to call FastISel, and a command-line option to enable it.
Dan Gohman [Tue, 19 Aug 2008 22:33:34 +0000 (22:33 +0000)]
Add code to call FastISel, and a command-line option to enable it.

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

15 years agoSupport unconditional fall-through branches in FastISel.
Dan Gohman [Tue, 19 Aug 2008 22:31:46 +0000 (22:31 +0000)]
Support unconditional fall-through branches in FastISel.

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

15 years agoAllow the fast-path spilling code to attempt folding, but still leaving out remat...
Owen Anderson [Tue, 19 Aug 2008 22:12:11 +0000 (22:12 +0000)]
Allow the fast-path spilling code to attempt folding, but still leaving  out remat and splitting.

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

15 years agoInstantiate FastISel for X86.
Dan Gohman [Tue, 19 Aug 2008 21:45:35 +0000 (21:45 +0000)]
Instantiate FastISel for X86.

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

15 years agoThe X86 target will soon have an implementation of createFastISel.
Dan Gohman [Tue, 19 Aug 2008 21:32:53 +0000 (21:32 +0000)]
The X86 target will soon have an implementation of createFastISel.

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

15 years agoAdd a TargetLowering hook for creating a FastISel object.
Dan Gohman [Tue, 19 Aug 2008 21:26:29 +0000 (21:26 +0000)]
Add a TargetLowering hook for creating a FastISel object.

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

15 years agoFor now, restrict FastISel to instructions that only involve one
Dan Gohman [Tue, 19 Aug 2008 20:58:14 +0000 (20:58 +0000)]
For now, restrict FastISel to instructions that only involve one
register class.

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

15 years agoFactor out the code to scan an instruction's operands into a
Dan Gohman [Tue, 19 Aug 2008 20:56:30 +0000 (20:56 +0000)]
Factor out the code to scan an instruction's operands into a
helper function.

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

15 years agoUse the BuildMI overload that sets up a destination register
Dan Gohman [Tue, 19 Aug 2008 20:46:54 +0000 (20:46 +0000)]
Use the BuildMI overload that sets up a destination register
instead of the one that doesn't and then adding it manually.

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

15 years agoHandle the case where target-specific fastisel code doesn't have
Dan Gohman [Tue, 19 Aug 2008 20:43:22 +0000 (20:43 +0000)]
Handle the case where target-specific fastisel code doesn't have
a desired opcode.

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

15 years agoAdd more comments.
Dan Gohman [Tue, 19 Aug 2008 20:36:33 +0000 (20:36 +0000)]
Add more comments.

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

15 years agoFix indentation in FastISel tablegen-emitted code.
Dan Gohman [Tue, 19 Aug 2008 20:31:38 +0000 (20:31 +0000)]
Fix indentation in FastISel tablegen-emitted code.

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

15 years agoAdd more checking to filter out more kinds of things that
Dan Gohman [Tue, 19 Aug 2008 20:30:54 +0000 (20:30 +0000)]
Add more checking to filter out more kinds of things that
FastISel doesn't support yet.

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

15 years agoremove reference to really really old tree
Chris Lattner [Tue, 19 Aug 2008 20:17:48 +0000 (20:17 +0000)]
remove reference to really really old tree

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

15 years agoThe fast-path still needs to set kill markers and spill/restore points as appropriate.
Owen Anderson [Tue, 19 Aug 2008 20:09:52 +0000 (20:09 +0000)]
The fast-path still needs to set kill markers and spill/restore points as appropriate.
With this patch, all of MultiSource/Applications and all of SPEC2000/2006 pass with
the SimpleSpiller and this fast-path enabled.

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

15 years agoAdd support for 8 and 16 bit forms of __sync
Dale Johannesen [Tue, 19 Aug 2008 18:47:28 +0000 (18:47 +0000)]
Add support for 8 and 16 bit forms of __sync
builtins on X86.

Change "lock" instructions to be on a separate line.
This is needed to work around a bug in the Darwin
assembler.

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

15 years ago80 columns.
Dan Gohman [Tue, 19 Aug 2008 18:07:49 +0000 (18:07 +0000)]
80 columns.

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

15 years agoAdd a few doxygen comments.
Dan Gohman [Tue, 19 Aug 2008 18:06:12 +0000 (18:06 +0000)]
Add a few doxygen comments.

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

15 years agoRemove an unneeded #include.
Dan Gohman [Tue, 19 Aug 2008 17:53:16 +0000 (17:53 +0000)]
Remove an unneeded #include.

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

15 years agoDelete a dead field.
Gordon Henriksen [Tue, 19 Aug 2008 17:09:26 +0000 (17:09 +0000)]
Delete a dead field.

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

15 years ago[PR2327] Leverage TargetRegisterInfo to compute frame offsets for GC metadata.
Gordon Henriksen [Tue, 19 Aug 2008 17:06:35 +0000 (17:06 +0000)]
[PR2327] Leverage TargetRegisterInfo to compute frame offsets for GC metadata.

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

15 years agoUpdate the JIT exception writer to better mimic the codegen exception writer.
Nicolas Geoffray [Tue, 19 Aug 2008 14:48:14 +0000 (14:48 +0000)]
Update the JIT exception writer to better mimic the codegen exception writer.
Also skip indirect encoding for platforms that ask for one: we direclty
write an address, not a pointer to the address.

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

15 years agoadd a note
Chris Lattner [Tue, 19 Aug 2008 06:22:16 +0000 (06:22 +0000)]
add a note

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

15 years agomore cleanups, random methods shouldn't return ostreams.
Chris Lattner [Tue, 19 Aug 2008 05:26:17 +0000 (05:26 +0000)]
more cleanups, random methods shouldn't return ostreams.

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

15 years agomore cleanup, eliminate getLLVMName when printing out
Chris Lattner [Tue, 19 Aug 2008 05:16:28 +0000 (05:16 +0000)]
more cleanup, eliminate getLLVMName when printing out
type names at the top of the file.

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

15 years agorandom cleanups, factor some printing code for linkage and visibility
Chris Lattner [Tue, 19 Aug 2008 05:06:27 +0000 (05:06 +0000)]
random cleanups, factor some printing code for linkage and visibility

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

15 years agoChange WriteTypeSymbolic/WriteAsOperand to return void instead of
Chris Lattner [Tue, 19 Aug 2008 04:47:09 +0000 (04:47 +0000)]
Change WriteTypeSymbolic/WriteAsOperand to return void instead of
an ostream, which is just weird.

Rename SC_DEBUG -> ST_DEBUG

Remove static indentation strangeness from WriteConstantInt.  This makes it
so that large structs are not broken down and printed on multiple lines.  If
there is demand for this to return, there are better ways to implement this.

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

15 years agowhitespace cleanup
Chris Lattner [Tue, 19 Aug 2008 04:45:47 +0000 (04:45 +0000)]
whitespace cleanup

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

15 years agodon't use the result of WriteAsOperand
Chris Lattner [Tue, 19 Aug 2008 04:45:19 +0000 (04:45 +0000)]
don't use the result of WriteAsOperand

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

15 years agodon't use the result of WriteTypeSymbolic or WriteAsOperand.
Chris Lattner [Tue, 19 Aug 2008 04:44:30 +0000 (04:44 +0000)]
don't use the result of WriteTypeSymbolic or WriteAsOperand.

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

15 years agoDon't use the result of WriteAsOperand or WriteTypeSymbolic.
Chris Lattner [Tue, 19 Aug 2008 04:42:37 +0000 (04:42 +0000)]
Don't use the result of WriteAsOperand or WriteTypeSymbolic.

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

15 years agorearrange code and make more legible.
Chris Lattner [Tue, 19 Aug 2008 04:36:02 +0000 (04:36 +0000)]
rearrange code and make more legible.

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

15 years agoput SlotTracker in an anon namespace since it is private.
Chris Lattner [Tue, 19 Aug 2008 04:28:07 +0000 (04:28 +0000)]
put SlotTracker in an anon namespace since it is private.

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

15 years agoReid had to call this class "slot machine" out of some strange reference
Chris Lattner [Tue, 19 Aug 2008 04:26:57 +0000 (04:26 +0000)]
Reid had to call this class "slot machine" out of some strange reference
to the gambling device.  Name it something more meaningful.

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

15 years agoadd raw_ostream method for emitting an unsigned.
Chris Lattner [Tue, 19 Aug 2008 04:23:02 +0000 (04:23 +0000)]
add raw_ostream method for emitting an unsigned.

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

15 years agoCompress manpages.
Devang Patel [Tue, 19 Aug 2008 01:17:41 +0000 (01:17 +0000)]
Compress manpages.

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

15 years agoMake SimpleSpiller respect subregister indices.
Owen Anderson [Tue, 19 Aug 2008 01:05:33 +0000 (01:05 +0000)]
Make SimpleSpiller respect subregister indices.

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

15 years agoadd a note
Chris Lattner [Tue, 19 Aug 2008 00:41:02 +0000 (00:41 +0000)]
add a note

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

15 years agoAdd a flag to enable the fast spilling path.
Owen Anderson [Tue, 19 Aug 2008 00:17:30 +0000 (00:17 +0000)]
Add a flag to enable the fast spilling path.

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

15 years agoFix the FastISel class' doxygen comment.
Dan Gohman [Mon, 18 Aug 2008 23:41:46 +0000 (23:41 +0000)]
Fix the FastISel class' doxygen comment.

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

15 years agoFix a few more bugs:
Owen Anderson [Mon, 18 Aug 2008 23:41:04 +0000 (23:41 +0000)]
Fix a few more bugs:
  1) Assign stack slots to new temporaries.
  2) Don't insert an interval into the return vector more than once.

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

15 years agoremove empty file
Chris Lattner [Mon, 18 Aug 2008 21:27:19 +0000 (21:27 +0000)]
remove empty file

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

15 years agoFix several bugs in the new fast-path:
Owen Anderson [Mon, 18 Aug 2008 21:20:32 +0000 (21:20 +0000)]
Fix several bugs in the new fast-path:
  1) Remove an incorrect assertion.
  2) Set the stack slot weight properly.
  3) Resize the VirtRegMap when needed.

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