Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 177d040

Browse files
author
Krzysztof Parzyszek
committed
[Hexagon] Fix the return value from HexagonGenInsert::runOnMachineFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253705 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 89c83dc commit 177d040

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/Target/Hexagon/HexagonGenInsert.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ bool HexagonGenInsert::runOnMachineFunction(MachineFunction &MF) {
14951495
// version of DCE that preserves lifetime markers. Without it, merging
14961496
// of stack objects can fail to recognize and merge disjoint objects
14971497
// leading to unnecessary stack growth.
1498-
removeDeadCode(MDT->getRootNode());
1498+
Changed = removeDeadCode(MDT->getRootNode());
14991499

15001500
const HexagonEvaluator HE(*HRI, *MRI, *HII, MF);
15011501
BitTracker BTLoc(HE, MF);
@@ -1533,7 +1533,7 @@ bool HexagonGenInsert::runOnMachineFunction(MachineFunction &MF) {
15331533
}
15341534

15351535
if (IFMap.empty())
1536-
return false;
1536+
return Changed;
15371537

15381538
{
15391539
NamedRegionTimer _T("pruning", "hexinsert", TimingDetail);
@@ -1546,7 +1546,7 @@ bool HexagonGenInsert::runOnMachineFunction(MachineFunction &MF) {
15461546
}
15471547

15481548
if (IFMap.empty())
1549-
return false;
1549+
return Changed;
15501550

15511551
{
15521552
NamedRegionTimer _T("selection", "hexinsert", TimingDetail);
@@ -1571,13 +1571,15 @@ bool HexagonGenInsert::runOnMachineFunction(MachineFunction &MF) {
15711571
for (unsigned i = 0, n = Out.size(); i < n; ++i)
15721572
IFMap.erase(Out[i]);
15731573
}
1574+
if (IFMap.empty())
1575+
return Changed;
15741576

15751577
{
15761578
NamedRegionTimer _T("generation", "hexinsert", TimingDetail);
1577-
Changed = generateInserts();
1579+
generateInserts();
15781580
}
15791581

1580-
return Changed;
1582+
return true;
15811583
}
15821584

15831585

0 commit comments

Comments
 (0)