Commit Graph

5464 Commits

Author SHA1 Message Date
Dan Gohman
0ce4b8eda3 Allow DOUT to be used outside of the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37753 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 14:09:38 +00:00
Evan Cheng
c33aa47130 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 21:19:07 +00:00
Evan Cheng
4efe74129f Properly handle kills of a physical register which has sub-registers that are read by later instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 21:03:35 +00:00
Evan Cheng
c4f2fe0694 Add immediate sub-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 20:59:16 +00:00
Dan Gohman
4d2a0f5bd6 Replace ?: with if statements, for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 16:19:08 +00:00
Dan Gohman
25aceacb29 Simplify the expression for MVT::isExtendedValueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37733 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 15:20:04 +00:00
Dan Gohman
71d7794856 Simplify the expression for TargetLowering::isTypeLegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37732 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 15:16:27 +00:00
Dan Gohman
798cb2ab82 Renumber the SimpleValueType values to fill in the hole left by
removing MVT::Vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 14:28:59 +00:00
Dan Gohman
d45eddd214 Revert the earlier change that removed the M_REMATERIALIZABLE machine
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:48:07 +00:00
Dan Gohman
bc9d89e6a2 Add a convenince member function for appending strings to a module's
module-level asm string data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:38:49 +00:00
Dan Gohman
7f32156bb9 Generalize MVT::ValueType and associated functions to be able to represent
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.

This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 16:23:39 +00:00
Dan Gohman
ea859be53c Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37704 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-22 14:59:07 +00:00
Duraid Madina
a8c7682939 check in the BigBlock local register allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37703 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-22 08:27:12 +00:00
Owen Anderson
d3fb671480 Have internal df_iterator's use SmallPtrSet instead of std::set. This provides compile time speedups to any pass using df_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 21:25:36 +00:00
Devang Patel
0e7f728ad1 Move code to update dominator information after basic block is split
from LoopSimplify.cpp to Dominator.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37689 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 17:23:45 +00:00
Dan Gohman
b9f1019696 Rename TargetLowering::getNumElements and friends to
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37687 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 14:42:22 +00:00
Tanya Lattner
9933e4bd7d Move inliner pass header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 22:29:02 +00:00
Dan Gohman
5cec4db6ae Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 14:28:31 +00:00
Dan Gohman
82a87a0172 Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:48:05 +00:00
Evan Cheng
4e6b1e1d99 Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:21:41 +00:00
Chris Lattner
f9521355c4 add isvararg tracking to CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:10:25 +00:00
Evan Cheng
2bdb7d0cc8 Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37633 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-18 22:43:58 +00:00
Tanya Lattner
eff2cdfca7 Modify annotate intrinsic to take 2 additional args: file and line number.
Fix up Annotate attribute test case.
Fix DebugFilename.c test case to look for right file name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-18 22:23:39 +00:00
Chris Lattner
66250e97ef add helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37631 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-18 21:50:49 +00:00
Dan Gohman
ec82dc9a7c Add keyword explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37624 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-18 14:11:31 +00:00
Evan Cheng
61a2598ebe Added CanBeDuplicated(). It returns true if an instruction can be safely duplicated (e.g. during ifcvt).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37605 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 21:13:54 +00:00
Tanya Lattner
6d806e93ce Add local var annotation intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37603 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 20:50:54 +00:00
Evan Cheng
2d7a47a5db No longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37598 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 19:05:13 +00:00
Dan Gohman
d19534add9 Add a SCEV class and supporting code for sign-extend expressions.
This created an ambiguity for expandInTy to decide when to use
sign-extension or zero-extension, but it turns out that most of its callers
don't actually need a type conversion, now that LLVM types don't have
explicit signedness. Drop expandInTy in favor of plain expand, and change
the few places that actually need a type conversion to do it themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37591 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 14:38:12 +00:00
Chris Lattner
b0760c80b3 m_not should match vector not
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 06:13:47 +00:00
Chris Lattner
cef4b53a3e add a Constant::getAllOnesValue helper function, which works on integers
AND vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37586 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 06:10:53 +00:00
Dan Gohman
51eaa86758 Rename MVT::getVectorBaseType to MVT::getVectorElementType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-14 22:58:02 +00:00
Dale Johannesen
318093b6f8 Do not treat FP_REG_KILL as terminator in branch analysis (X86).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37578 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-14 22:03:45 +00:00
Dan Gohman
c101e95cb6 Add a target hook to allow loads from constant pools to be rematerialized, and an
implementation for x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-14 20:50:44 +00:00
Dan Gohman
af67ea7318 Eliminate some redundant newlines in asm output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37574 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-14 15:00:27 +00:00
Christopher Lamb
a321125e8b Add support to tablegen for specifying subregister classes on a per register class basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-13 22:20:15 +00:00
Dan Gohman
6595635175 Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and
VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.

This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37569 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-13 15:12:02 +00:00
Devang Patel
6857e366f5 Protect updateDFSNumbers()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37560 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 17:30:56 +00:00
Devang Patel
9c7ee6b19f Make DFS number manipulation methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37553 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 05:49:31 +00:00
Devang Patel
4d42dea253 Break DominatorTree from ETNode.
Remove unused PostETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:54:38 +00:00
Devang Patel
3726b82a55 Maintain DFS number in DomTreeNode itself.
This means now ETNodes are not useful anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:14:41 +00:00
Devang Patel
fe7d4e50b8 Add and use DominatorTreeBase::findNearestCommonDominator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 23:31:22 +00:00
Evan Cheng
bfd2ec4a8e Add a utility routine to check for unpredicated terminator instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37528 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 21:59:56 +00:00
Devang Patel
b5ef06c509 Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 17:59:02 +00:00
David Greene
2513330de8 Factor live variable analysis so it does not do register coalescing
simultaneously.  Move that pass to SimpleRegisterCoalescing.

This makes it easier to implement alternative register allocation and
coalescing strategies while maintaining reuse of the existing live
interval analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 17:18:56 +00:00
Devang Patel
dba2413b2e Update LoopSimplify to require and preserve DominatorTree only.
Now LoopSimplify does not require nor preserve ETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:50:32 +00:00
Devang Patel
0ab301c5fa Add new method - nearestCommonDominator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:21:17 +00:00
Devang Patel
53c279b194 Use DominatorTree instead of ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37507 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:17:13 +00:00
Devang Patel
f86a73cbef Do not preserve ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:02:08 +00:00
Devang Patel
e029b2c369 Add instruction level dominates(A,B) interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 23:52:40 +00:00