summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAG.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-23 12:35:30 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-23 12:35:30 +0000
commit5c22c8074404797f1313b1334757254fb5c6487a (patch)
tree260d72ae531150b21b4274c090fd7c98694cb71d /include/llvm/CodeGen/SelectionDAG.h
parent948e95a381bf6771639703643ef75e0115b35f53 (diff)
downloadllvm-5c22c8074404797f1313b1334757254fb5c6487a.tar.gz
llvm-5c22c8074404797f1313b1334757254fb5c6487a.tar.bz2
llvm-5c22c8074404797f1313b1334757254fb5c6487a.tar.xz
Add a new step to legalization to legalize vector math operations. This
will allow simplifying LegalizeDAG to eliminate type legalization. (I have a patch to do that, but it's not quite finished; I'll commit it once it's finished and I've fixed any review comments for this patch.) See the comment at the beginning of lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp for more details on the motivation for this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAG.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index 5fbda87765..ec2d1d7d07 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -220,6 +220,19 @@ public:
/// the graph.
void Legalize(bool TypesNeedLegalizing, CodeGenOpt::Level OptLevel);
+ /// LegalizeVectors - This transforms the SelectionDAG into a SelectionDAG
+ /// that only uses vector math operations supported by the target. This is
+ /// necessary as a separate step from Legalize because unrolling a vector
+ /// operation can introduce illegal types, which requires running
+ /// LegalizeTypes again.
+ ///
+ /// This returns true if it made any changes; in that case, LegalizeTypes
+ /// is called again before Legalize.
+ ///
+ /// Note that this is an involved process that may invalidate pointers into
+ /// the graph.
+ bool LegalizeVectors();
+
/// RemoveDeadNodes - This method deletes all unreachable nodes in the
/// SelectionDAG.
void RemoveDeadNodes();