summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
index d735acf457b..642a8785def 100644
--- a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
@@ -289,7 +289,10 @@ bool HexagonRDFOpt::runOnMachineFunction(MachineFunction &MF) {
HexagonRegisterAliasInfo HAI(HRI);
TargetOperandInfo TOI(HII);
DataFlowGraph G(MF, HII, HRI, *MDT, MDF, HAI, TOI);
- G.build();
+ // Dead phi nodes are necessary for copy propagation: we can add a use
+ // of a register in a block where it would need a phi node, but which
+ // was dead (and removed) during the graph build time.
+ G.build(BuildOptions::KeepDeadPhis);
if (RDFDump)
dbgs() << "Starting copy propagation on: " << MF.getName() << '\n'
OpenPOWER on IntegriCloud