summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/RDFGraph.h
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-04-28 20:17:06 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-04-28 20:17:06 +0000
commit55874cf02b40eaaf6b14ed1baec2fac9fe89390e (patch)
tree499aaef5bfd550cefd80e589f4c09d7140eeab87 /llvm/lib/Target/Hexagon/RDFGraph.h
parent6cd5364556bad206ef922f1fe7ed84101ef44159 (diff)
downloadbcm5719-llvm-55874cf02b40eaaf6b14ed1baec2fac9fe89390e.tar.gz
bcm5719-llvm-55874cf02b40eaaf6b14ed1baec2fac9fe89390e.zip
[RDF] Add option to keep dead phi nodes in DFG
Dead phi nodes are needed for code motion (such as copy propagation), where a new use would be placed in a location that would be dominated by a dead phi. Such a transformation is not legal for copy propagation, and the existence of the phi would prevent it, but if the phi is not there, it may appear to be valid. llvm-svn: 267932
Diffstat (limited to 'llvm/lib/Target/Hexagon/RDFGraph.h')
-rw-r--r--llvm/lib/Target/Hexagon/RDFGraph.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/RDFGraph.h b/llvm/lib/Target/Hexagon/RDFGraph.h
index 1de50d7d987..43eeb483173 100644
--- a/llvm/lib/Target/Hexagon/RDFGraph.h
+++ b/llvm/lib/Target/Hexagon/RDFGraph.h
@@ -287,6 +287,13 @@ namespace rdf {
}
};
+ struct BuildOptions {
+ enum : unsigned {
+ None = 0x00,
+ KeepDeadPhis = 0x01, // Do not remove dead phis during build.
+ };
+ };
+
template <typename T> struct NodeAddr {
NodeAddr() : Addr(nullptr), Id(0) {}
NodeAddr(T A, NodeId I) : Addr(A), Id(I) {}
@@ -677,7 +684,7 @@ namespace rdf {
typedef std::map<RegisterRef,DefStack> DefStackMap;
- void build();
+ void build(unsigned Options = BuildOptions::None);
void pushDefs(NodeAddr<InstrNode*> IA, DefStackMap &DM);
void markBlock(NodeId B, DefStackMap &DefM);
void releaseBlock(NodeId B, DefStackMap &DefM);
OpenPOWER on IntegriCloud