[PATCH] D33144: [RegisterBankInfo] Remove overly-agressive asserts
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 03:05:59 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303043: [RegisterBankInfo] Remove overly-agressive asserts (authored by tstellar).
Changed prior to commit:
https://reviews.llvm.org/D33144?vs=98819&id=98968#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33144
Files:
llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
Index: llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -204,12 +204,8 @@
// TODO: use a dedicated constant for ImpossibleCost.
if (Cost != UINT_MAX)
return Cost;
- assert(!TPC->isGlobalISelAbortEnabled() &&
- "Legalization not available yet");
// Return the legalization cost of that repairing.
}
- assert(!TPC->isGlobalISelAbortEnabled() &&
- "Complex repairing not implemented yet");
return UINT_MAX;
}
@@ -452,6 +448,11 @@
// Sums up the repairing cost of MO at each insertion point.
uint64_t RepairCost = getRepairCost(MO, ValMapping);
+
+ // This is an impossible to repair cost.
+ if (RepairCost == UINT_MAX)
+ continue;
+
// Bias used for splitting: 5%.
const uint64_t PercentageForBias = 5;
uint64_t Bias = (RepairCost * PercentageForBias + 99) / 100;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33144.98968.patch
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170515/94b54704/attachment.bin>
More information about the llvm-commits
mailing list