oota-llvm.git
16 years agoMVN is addrmode1.
Evan Cheng [Fri, 29 Aug 2008 07:36:24 +0000 (07:36 +0000)]
MVN is addrmode1.

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

16 years agoAdd GlobalValue::{removeFromParent,eraseFromParent}
Daniel Dunbar [Fri, 29 Aug 2008 07:30:15 +0000 (07:30 +0000)]
Add GlobalValue::{removeFromParent,eraseFromParent}

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

16 years agoMore refactoring.
Evan Cheng [Fri, 29 Aug 2008 06:41:12 +0000 (06:41 +0000)]
More refactoring.

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

16 years agoAdd DenseMap::lookup:
Daniel Dunbar [Fri, 29 Aug 2008 00:48:44 +0000 (00:48 +0000)]
Add DenseMap::lookup:
  /// lookup - Return the entry for the specified key, or a default
  /// constructed value if no such entry exists.

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

16 years agoSwap fp comparison operands and change predicate to allow load folding.
Evan Cheng [Thu, 28 Aug 2008 23:48:31 +0000 (23:48 +0000)]
Swap fp comparison operands and change predicate to allow load folding.

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

16 years agoRefactor ARM instruction format definitions into a separate file. No functionality...
Evan Cheng [Thu, 28 Aug 2008 23:39:26 +0000 (23:39 +0000)]
Refactor ARM instruction format definitions into a separate file. No functionality changes.

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

16 years agoAdd a target callback for FastISel.
Dan Gohman [Thu, 28 Aug 2008 23:21:34 +0000 (23:21 +0000)]
Add a target callback for FastISel.

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

16 years agoremove tabs, fix > 80 cols
Gabor Greif [Thu, 28 Aug 2008 23:19:51 +0000 (23:19 +0000)]
remove tabs, fix > 80 cols

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

16 years agoAdd another description to my entry.
Bill Wendling [Thu, 28 Aug 2008 23:16:37 +0000 (23:16 +0000)]
Add another description to my entry.

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

16 years agojust a brain dump for a small tool
Gabor Greif [Thu, 28 Aug 2008 23:15:28 +0000 (23:15 +0000)]
just a brain dump for a small tool
that brings us to 80-col violations
or tabs.

Usage:
  visit-violations <file>

At the moment it outputs editor invocations.

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

16 years agorename destroy -> releaseMemory to properly hook into passmgr.
Chris Lattner [Thu, 28 Aug 2008 22:56:53 +0000 (22:56 +0000)]
rename destroy -> releaseMemory to properly hook into passmgr.

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

16 years agoAdd support for JIT exceptions on Darwin. Since we're dealing with libgcc,
Nicolas Geoffray [Thu, 28 Aug 2008 22:34:49 +0000 (22:34 +0000)]
Add support for JIT exceptions on Darwin. Since we're dealing with libgcc,
whose darwin code was written after the ability to dynamically register frames,
we need to do special hacks to make things work.

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

16 years agofix the output dumbness I have introduced some time ago
Gabor Greif [Thu, 28 Aug 2008 22:32:39 +0000 (22:32 +0000)]
fix the output dumbness I have introduced some time ago

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

16 years agoerect abstraction boundaries for accessing SDValue members, rename Val -> Node to...
Gabor Greif [Thu, 28 Aug 2008 21:40:38 +0000 (21:40 +0000)]
erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics

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

16 years agoImplement null and undef values for FastISel.
Dan Gohman [Thu, 28 Aug 2008 21:19:07 +0000 (21:19 +0000)]
Implement null and undef values for FastISel.

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

16 years agoIn lowering SELECT_CC, removed cases where we can't flip the true and false when...
Mon P Wang [Thu, 28 Aug 2008 21:04:05 +0000 (21:04 +0000)]
In lowering SELECT_CC, removed cases where we can't flip the true and false when the compare value has a NaN

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

16 years agoOptimize DAGCombiner's worklist processing. Previously it started
Dan Gohman [Thu, 28 Aug 2008 21:01:56 +0000 (21:01 +0000)]
Optimize DAGCombiner's worklist processing. Previously it started
its work by putting all nodes in the worklist, requiring a big
dynamic allocation. Now, DAGCombiner just iterates over the AllNodes
list and maintains a worklist for nodes that are newly created or
need to be revisited. This allows the worklist to stay small in most
cases, so it can be a SmallVector.

This has the side effect of making DAGCombine not miss a folding
opportunity in alloca-align-rounding.ll.

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

16 years agoMove CaseBlock, JumpTable, and BitTestBlock to be members of
Dan Gohman [Thu, 28 Aug 2008 20:38:18 +0000 (20:38 +0000)]
Move CaseBlock, JumpTable, and BitTestBlock to be members of
SelectionDAGLowering instead of being in an anonymous namespace.
This fixes warnings about SelectionDAGLowering having fields
using anonymous namespaces.

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

16 years agoFix a FastISel bug where the instructions from lowering the arguments
Dan Gohman [Thu, 28 Aug 2008 20:28:56 +0000 (20:28 +0000)]
Fix a FastISel bug where the instructions from lowering the arguments
were being emitted after the first instructions of the entry block.

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

16 years agoUse resize instead of reserve. Reserve doesn't change size().
Rafael Espindola [Thu, 28 Aug 2008 18:32:53 +0000 (18:32 +0000)]
Use resize instead of reserve. Reserve doesn't change size().

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

16 years agoReduce the size of the Parts vector.
Rafael Espindola [Thu, 28 Aug 2008 18:29:58 +0000 (18:29 +0000)]
Reduce the size of the Parts vector.

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

16 years agoHook up support for fast-isel of trunc instructions, using the newly working support...
Owen Anderson [Thu, 28 Aug 2008 18:26:01 +0000 (18:26 +0000)]
Hook up support for fast-isel of trunc instructions, using the newly working support for EXTRACT_SUBREG.

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

16 years agoAdd support for fast-isel of opcodes that require use of extract_subreg. Because...
Owen Anderson [Thu, 28 Aug 2008 18:06:12 +0000 (18:06 +0000)]
Add support for fast-isel of opcodes that require use of extract_subreg.  Because of how extract_subreg is treated, it requires special case handling.

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

16 years agoImplement partial-word binary atomics on ppc.
Dale Johannesen [Thu, 28 Aug 2008 17:53:09 +0000 (17:53 +0000)]
Implement partial-word binary atomics on ppc.

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

16 years agoFastEmitInst_extractsubreg doesn't need to be passed the register class. It can...
Owen Anderson [Thu, 28 Aug 2008 17:47:37 +0000 (17:47 +0000)]
FastEmitInst_extractsubreg doesn't need to be passed the register class.  It can get it from MachineRegisterInfo instead.

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

16 years agoRevert r55467; it causes regressions in UnitTests/Vector/divides,
Dan Gohman [Thu, 28 Aug 2008 17:22:54 +0000 (17:22 +0000)]
Revert r55467; it causes regressions in UnitTests/Vector/divides,
Benchmarks/sim/sim, and others on x86-64.

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

16 years agoCorrectly resize the Parts array.
Rafael Espindola [Thu, 28 Aug 2008 14:24:45 +0000 (14:24 +0000)]
Correctly resize the Parts array.

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

16 years agoIf a copy isn't coalesced, but its src is defined by trivial computation. Re-material...
Evan Cheng [Thu, 28 Aug 2008 07:53:51 +0000 (07:53 +0000)]
If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.

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

16 years agoFsFLD0S{S|D} and V_SETALLONES are as cheap as moves.
Evan Cheng [Thu, 28 Aug 2008 07:52:25 +0000 (07:52 +0000)]
FsFLD0S{S|D} and V_SETALLONES are as cheap as moves.

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

16 years agoMake the verifier reject instructions which have null pointers
Chris Lattner [Thu, 28 Aug 2008 04:02:44 +0000 (04:02 +0000)]
Make the verifier reject instructions which have null pointers
for operands: rdar://6179606.  no testcase, because I can't write
a .ll file that is this broken ;-)

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

16 years agoClear the intervals list in "destroy", patch by
Chris Lattner [Thu, 28 Aug 2008 03:33:03 +0000 (03:33 +0000)]
Clear the intervals list in "destroy", patch by
Prakash Prabhu!

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

16 years agoSplit the ATOMIC NodeType's to include the size, e.g.
Dale Johannesen [Thu, 28 Aug 2008 02:44:49 +0000 (02:44 +0000)]
Split the ATOMIC NodeType's to include the size, e.g.
ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD.
Increased the Hardcoded Constant OpActionsCapacity to match.
Large but boring; no functional change.

This is to support partial-word atomics on ppc; i8 is
not a valid type there, so by the time we get to lowering, the
ATOMIC_LOAD nodes looks the same whether the type was i8 or i32.
The information can be added to the AtomicSDNode, but that is the
largest SDNode; I don't fully understand the SDNode allocation,
but it is sensitive to the largest node size, so increasing
that must be bad.  This is the alternative.

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

16 years agoThis test crashes on non-x86 host; make SSE explicit.
Dale Johannesen [Thu, 28 Aug 2008 01:51:09 +0000 (01:51 +0000)]
This test crashes on non-x86 host; make SSE explicit.
Feel free to fix a better way!

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

16 years agoFix a missing #include. Patch by Andrew John Hughes.
Dan Gohman [Thu, 28 Aug 2008 00:20:07 +0000 (00:20 +0000)]
Fix a missing #include. Patch by Andrew John Hughes.

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

16 years agoReorganize the lifetimes of the major objects SelectionDAGISel
Dan Gohman [Wed, 27 Aug 2008 23:52:12 +0000 (23:52 +0000)]
Reorganize the lifetimes of the major objects SelectionDAGISel
works with.

SelectionDAG, FunctionLoweringInfo, and SelectionDAGLowering
objects now get created once per SelectionDAGISel instance, and
can be reused across blocks and across functions. Previously,
they were created and destroyed each time they were needed.

This reorganization simplifies the handling of PHI nodes, and
also SwitchCases, JumpTables, and BitTestBlocks. This
simplification has the side effect of fixing a bug in FastISel
where successor PHI nodes weren't being updated correctly.

This is also a step towards making the transition from FastISel
into and out of SelectionDAG faster, and also making
plain SelectionDAG faster on code with lots of little blocks.

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

16 years agoAdd a helper method that will be used to support EXTRACT_SUBREG for selecting trunc...
Owen Anderson [Wed, 27 Aug 2008 22:30:02 +0000 (22:30 +0000)]
Add a helper method that will be used to support EXTRACT_SUBREG for selecting trunc's in fast-isel.

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

16 years agoMake "movdq2q" and "movq2dq" dependent upon having SSE2 because they use the
Bill Wendling [Wed, 27 Aug 2008 21:32:04 +0000 (21:32 +0000)]
Make "movdq2q" and "movq2dq" dependent upon having SSE2 because they use the
SSE2 registers as well as the MMX registers.

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

16 years agoPut file scoped constants in an anonymous namespace. Use the "using namespace
Bill Wendling [Wed, 27 Aug 2008 21:10:13 +0000 (21:10 +0000)]
Put file scoped constants in an anonymous namespace. Use the "using namespace
llvm" for consistency.

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

16 years agoMove the check whether it's worth remating to caller.
Evan Cheng [Wed, 27 Aug 2008 20:58:54 +0000 (20:58 +0000)]
Move the check whether it's worth remating to caller.

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

16 years agoDo not apply the transformation if the target does not support DestTy natively.
Devang Patel [Wed, 27 Aug 2008 20:55:23 +0000 (20:55 +0000)]
Do not apply the transformation if the target does not support DestTy natively.

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

16 years agoBackout 55429
Devang Patel [Wed, 27 Aug 2008 20:51:49 +0000 (20:51 +0000)]
Backout 55429

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

16 years agoFix FastISel's bitcast code for the case where getRegForValue fails.
Dan Gohman [Wed, 27 Aug 2008 20:41:38 +0000 (20:41 +0000)]
Fix FastISel's bitcast code for the case where getRegForValue fails.

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

16 years agoRefactor isSafeToReMat out of 2addr pass.
Evan Cheng [Wed, 27 Aug 2008 20:33:50 +0000 (20:33 +0000)]
Refactor isSafeToReMat out of 2addr pass.

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

16 years agoAdd facility to create a target.
Devang Patel [Wed, 27 Aug 2008 20:00:27 +0000 (20:00 +0000)]
Add facility to create a target.

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

16 years agoUse TargetLowering to get the types in fast isel, which handles pointer types correct...
Owen Anderson [Wed, 27 Aug 2008 18:58:30 +0000 (18:58 +0000)]
Use TargetLowering to get the types in fast isel, which handles pointer types correctly for our purposes.

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

16 years agoDon't check TLI.getOperationAction. The FastISel way is to
Dan Gohman [Wed, 27 Aug 2008 18:15:05 +0000 (18:15 +0000)]
Don't check TLI.getOperationAction. The FastISel way is to
just try to do the action and let the tablegen-generated code
determine if there is target-support for an operation.

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

16 years agoAdd a new FastISel method, getRegForValue, which takes care of
Dan Gohman [Wed, 27 Aug 2008 18:10:19 +0000 (18:10 +0000)]
Add a new FastISel method, getRegForValue, which takes care of
the details of materializing constants and other values into
registers, and make use of it in several places.

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

16 years agoAdd a comment about the current floating-point constant code in FastISel.
Dan Gohman [Wed, 27 Aug 2008 18:01:42 +0000 (18:01 +0000)]
Add a comment about the current floating-point constant code in FastISel.

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

16 years agoFix typos and whitespaces. Other cosmetic changes based on feedback.
Devang Patel [Wed, 27 Aug 2008 17:50:18 +0000 (17:50 +0000)]
Fix typos and whitespaces. Other cosmetic changes based on feedback.

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

16 years agoMinor cleanup.
Chris Lattner [Wed, 27 Aug 2008 17:36:58 +0000 (17:36 +0000)]
Minor cleanup.

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

16 years agoReinstate the x86-64 portion of r55190. When doing extloads into
Dan Gohman [Wed, 27 Aug 2008 17:33:15 +0000 (17:33 +0000)]
Reinstate the x86-64 portion of r55190. When doing extloads into
64-bit registers from 16-bit and smaller memory locations, prefer
instructions that define the entire 64-bit register, to avoid
partial-register updates.

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

16 years agoOptimize ScheduleDAGRRList's topological sort to use one pass instead
Dan Gohman [Wed, 27 Aug 2008 16:29:48 +0000 (16:29 +0000)]
Optimize ScheduleDAGRRList's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, compute the ordering
immediately in the result array, instead of in another scratch std::vector
that is copied to the result array.

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

16 years agoOptimize ScheduleDAG's ComputeDepths and ComputeHeights to not need
Dan Gohman [Wed, 27 Aug 2008 16:27:25 +0000 (16:27 +0000)]
Optimize ScheduleDAG's ComputeDepths and ComputeHeights to not need
a scratch std::vector.

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

16 years agoRemove the std::ostream form of PseudoSourceValue's print,
Dan Gohman [Wed, 27 Aug 2008 16:19:44 +0000 (16:19 +0000)]
Remove the std::ostream form of PseudoSourceValue's print,
which isn't needed anymore.

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

16 years agoUpdate a comment to reflect recent changes.
Dan Gohman [Wed, 27 Aug 2008 16:18:22 +0000 (16:18 +0000)]
Update a comment to reflect recent changes.

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

16 years agoUnbreak PseudoSourceValue::print. This fixes -print-machine-instrs
Dan Gohman [Wed, 27 Aug 2008 15:24:43 +0000 (15:24 +0000)]
Unbreak PseudoSourceValue::print. This fixes -print-machine-instrs
and various other things.

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

16 years agoDiagnose uses of unsized types with the byval attribute in the
Dan Gohman [Wed, 27 Aug 2008 14:48:06 +0000 (14:48 +0000)]
Diagnose uses of unsized types with the byval attribute in the
verifier. See PR2711 for details.

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

16 years agoUpdate wording, as aggregates are now first-class.
Dan Gohman [Wed, 27 Aug 2008 14:44:57 +0000 (14:44 +0000)]
Update wording, as aggregates are now first-class.

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

16 years agoAdd DebugInfoBuilder. Patch by Talin!
Evan Cheng [Wed, 27 Aug 2008 06:51:14 +0000 (06:51 +0000)]
Add DebugInfoBuilder. Patch by Talin!

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

16 years agoBasic FastISel support for floating-point constants.
Dan Gohman [Wed, 27 Aug 2008 01:09:54 +0000 (01:09 +0000)]
Basic FastISel support for floating-point constants.

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

16 years agoFix handling of inttoptr and ptrtoint when unhandled operands are present.
Owen Anderson [Wed, 27 Aug 2008 00:35:37 +0000 (00:35 +0000)]
Fix handling of inttoptr and ptrtoint when unhandled operands are present.

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

16 years agoAdd support for fast isel of inttoptr and ptrtoint in the cases where truncation...
Owen Anderson [Wed, 27 Aug 2008 00:31:01 +0000 (00:31 +0000)]
Add support for fast isel of inttoptr and ptrtoint in the cases where truncation is not needed.

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

16 years agoFactor out a large amoutn of the cast handling code in fast isel into helper methods.
Owen Anderson [Tue, 26 Aug 2008 23:46:32 +0000 (23:46 +0000)]
Factor out a large amoutn of the cast handling code in fast isel into helper methods.
This simultaneously makes the code simpler and adds support for sext as well.

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

16 years agoAdd a MachineInstrBuilder method for adding floating-point
Dan Gohman [Tue, 26 Aug 2008 23:19:23 +0000 (23:19 +0000)]
Add a MachineInstrBuilder method for adding floating-point
immediate operands.

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

16 years agoAdd support for fast isel of zext.
Owen Anderson [Tue, 26 Aug 2008 23:14:49 +0000 (23:14 +0000)]
Add support for fast isel of zext.

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

16 years agodisallow direct access to SDValue::ResNo, provide a getter instead
Gabor Greif [Tue, 26 Aug 2008 22:36:50 +0000 (22:36 +0000)]
disallow direct access to SDValue::ResNo, provide a getter instead

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

16 years agoAdd support for fptosi of constants in fast isel.
Owen Anderson [Tue, 26 Aug 2008 22:34:28 +0000 (22:34 +0000)]
Add support for fptosi of constants in fast isel.

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

16 years agoPut a heuristic in place to prevent GVN from falling into bad cases with massively...
Owen Anderson [Tue, 26 Aug 2008 22:07:42 +0000 (22:07 +0000)]
Put a heuristic in place to prevent GVN from falling into bad cases with massively complicated CFGs.
This speeds up a particular testcase from 12+ hours to 5 seconds with little perceptible loss of quality.

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

16 years agoOptimize SelectionDAG's topological sort to use one pass instead
Dan Gohman [Tue, 26 Aug 2008 21:42:18 +0000 (21:42 +0000)]
Optimize SelectionDAG's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, use the
SelectionDAG's topological sort in LegalizeDAG instead of having
a separate implementation.

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

16 years agoRefactor the bitcast code into its own function.
Dan Gohman [Tue, 26 Aug 2008 21:28:54 +0000 (21:28 +0000)]
Refactor the bitcast code into its own function.

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

16 years agoRefactor a bunch of FastISelEmitter code into a helper class, and
Dan Gohman [Tue, 26 Aug 2008 21:21:20 +0000 (21:21 +0000)]
Refactor a bunch of FastISelEmitter code into a helper class, and
put each major step in a separate function. This makes the high
level sequence of events easier to follow.

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

16 years agoMake FastISel use the correct argument type when casting GEP indices.
Dan Gohman [Tue, 26 Aug 2008 20:57:08 +0000 (20:57 +0000)]
Make FastISel use the correct argument type when casting GEP indices.

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

16 years agoDon't select binary instructions with illegal types.
Dan Gohman [Tue, 26 Aug 2008 20:52:40 +0000 (20:52 +0000)]
Don't select binary instructions with illegal types.

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

16 years agoAdd support for fast isel of sitofp, and remove some unnecessary and imprecise legali...
Owen Anderson [Tue, 26 Aug 2008 20:37:00 +0000 (20:37 +0000)]
Add support for fast isel of sitofp, and remove some unnecessary and imprecise legality checks.

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

16 years ago- small bug corrected: incorrect iterator type.
Cedric Venet [Tue, 26 Aug 2008 19:49:04 +0000 (19:49 +0000)]
- small bug corrected: incorrect iterator type.
- fix to please VS: add a return after an assert.

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

16 years agoUse a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel of bitcasts,
Owen Anderson [Tue, 26 Aug 2008 18:51:24 +0000 (18:51 +0000)]
Use a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel of bitcasts,
allowing it to support the full range of conversions people might ask for in a correct manner.

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

16 years agoThese assertions should be return false's instead, allowing the client to detect...
Owen Anderson [Tue, 26 Aug 2008 18:50:40 +0000 (18:50 +0000)]
These assertions should be return false's instead, allowing the client to detect the failure.

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

16 years agoWe need to check that the return type is correct, even in cases where we don't
Owen Anderson [Tue, 26 Aug 2008 18:50:00 +0000 (18:50 +0000)]
We need to check that the return type is correct, even in cases where we don't
have a return type that differs from the operand types.

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

16 years agoMake TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
Owen Anderson [Tue, 26 Aug 2008 18:03:31 +0000 (18:03 +0000)]
Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
was inserted or not.  This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.

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

16 years agoIf IV is used in a int-to-float cast inside the loop then try to eliminate the cast...
Devang Patel [Tue, 26 Aug 2008 17:57:54 +0000 (17:57 +0000)]
If IV is used in a int-to-float cast inside the loop then try to eliminate the cast operation.

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

16 years agoAdd support for fast isel of non-constant fptosi instructions.
Owen Anderson [Tue, 26 Aug 2008 17:44:42 +0000 (17:44 +0000)]
Add support for fast isel of non-constant fptosi instructions.

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

16 years agofix doxygen comment
Gabor Greif [Tue, 26 Aug 2008 17:44:40 +0000 (17:44 +0000)]
fix doxygen comment

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

16 years agoGrammar fix.
Ted Kremenek [Tue, 26 Aug 2008 16:41:15 +0000 (16:41 +0000)]
Grammar fix.

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

16 years agoAdded "str()" method to raw_string_ostream.
Ted Kremenek [Tue, 26 Aug 2008 16:34:01 +0000 (16:34 +0000)]
Added "str()" method to raw_string_ostream.
str() mirrors the same method in std::ostringstream.
str() flushes the buffered stream contents to string and returns a reference to the string.

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

16 years agocode simplification, no functionality change.
Chris Lattner [Tue, 26 Aug 2008 07:01:28 +0000 (07:01 +0000)]
code simplification, no functionality change.

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

16 years agostabilize more printing, this doesn't cause a problem
Chris Lattner [Tue, 26 Aug 2008 06:50:46 +0000 (06:50 +0000)]
stabilize more printing, this doesn't cause a problem
in the example attached to PR2590, but is a problem in general.

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

16 years agostablize SubRegsSet printing, part of PR2590
Chris Lattner [Tue, 26 Aug 2008 06:49:06 +0000 (06:49 +0000)]
stablize SubRegsSet printing, part of PR2590

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

16 years agoStabilize 'getDwarfRegNumFull' output to not depend on random memory
Chris Lattner [Tue, 26 Aug 2008 06:43:25 +0000 (06:43 +0000)]
Stabilize 'getDwarfRegNumFull' output to not depend on random memory
orders, part of PR2590

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

16 years agoIf an xmm register is referenced explicitly in an inline asm, make sure to
Chris Lattner [Tue, 26 Aug 2008 06:19:02 +0000 (06:19 +0000)]
If an xmm register is referenced explicitly in an inline asm, make sure to
assign it to a version of the xmm register with the regclass that matches its
type.  This fixes PR2715, a bug handling some crazy xpcom case in mozilla.

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

16 years agotypo fix.
Chris Lattner [Tue, 26 Aug 2008 06:07:47 +0000 (06:07 +0000)]
typo fix.

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

16 years agoActually recycle SDNode allocations. SelectionDAG is using
Dan Gohman [Tue, 26 Aug 2008 01:44:34 +0000 (01:44 +0000)]
Actually recycle SDNode allocations. SelectionDAG is using
RecyclingAllocator, but this change is needed for the nodes
to actually be recycled. This cuts SelectionDAG's memory
usage high-water-mark in half in some cases.

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

16 years agoAvoid a warning about isTargetNullPtr being unused in release builds.
Dan Gohman [Tue, 26 Aug 2008 01:38:29 +0000 (01:38 +0000)]
Avoid a warning about isTargetNullPtr being unused in release builds.

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

16 years agoThrow the switch to allow FastISel to emit instructions whose return types different...
Owen Anderson [Tue, 26 Aug 2008 01:22:59 +0000 (01:22 +0000)]
Throw the switch to allow FastISel to emit instructions whose return types different from their inputs.  Next step: adding lowering pattens in FastISel that actually use these newly available opcodes.

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

16 years agoThis is done.
Evan Cheng [Tue, 26 Aug 2008 01:13:44 +0000 (01:13 +0000)]
This is done.

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

16 years agoEnhance TableGen to emit code for FastISel of opcodes with variadic return types...
Owen Anderson [Tue, 26 Aug 2008 00:42:26 +0000 (00:42 +0000)]
Enhance TableGen to emit code for FastISel of opcodes with variadic return types without slowing down opcodes that are not variadic.  No such opcodes are currently generated, but in theory it should be a matter of just hitting the switch.

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

16 years agoAdd a RetVT parameter to emitted FastISel methods, so that we will be able to pass...
Owen Anderson [Mon, 25 Aug 2008 23:58:18 +0000 (23:58 +0000)]
Add a RetVT parameter to emitted FastISel methods, so that we will be able to pass the desired return
type down.  This is not currently used.

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

16 years agoDeepen the map structure tablegen uses to compute FastISel patterns, in preparation...
Owen Anderson [Mon, 25 Aug 2008 23:43:09 +0000 (23:43 +0000)]
Deepen the map structure tablegen uses to compute FastISel patterns, in preparation for having patterns
with return types that differ from their input types.  This is not yet used.

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

16 years agoImplement 32 & 64 bit versions of PPC atomic
Dale Johannesen [Mon, 25 Aug 2008 22:34:37 +0000 (22:34 +0000)]
Implement 32 & 64 bit versions of PPC atomic
binary primitives.

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

16 years agoUnbreak build.
Evan Cheng [Mon, 25 Aug 2008 22:20:39 +0000 (22:20 +0000)]
Unbreak build.

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

16 years ago80 col. violations.
Evan Cheng [Mon, 25 Aug 2008 21:58:43 +0000 (21:58 +0000)]
80 col. violations.

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