This patch corrects commit 165126 by using an integer bit width instead of

a pointer to a type, in order to remove the uses of getGlobalContext().

Patch by Tyler Nowicki.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Preston Gurd
2012-10-04 21:33:40 +00:00
parent 837c28a840
commit 8d662b59f0
5 changed files with 23 additions and 23 deletions

View File

@@ -154,9 +154,10 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
/// This optimization identifies DIV instructions that can be
/// profitably bypassed and carried out with a shorter, faster divide.
if (TLI && TLI->isSlowDivBypassed()) {
const DenseMap<Type*, Type*> &BypassTypeMap = TLI->getBypassSlowDivTypes();
const DenseMap<unsigned int, unsigned int> &BypassWidths =
TLI->getBypassSlowDivWidths();
for (Function::iterator I = F.begin(); I != F.end(); I++)
EverMadeChange |= bypassSlowDivision(F, I, BypassTypeMap);
EverMadeChange |= bypassSlowDivision(F, I, BypassWidths);
}
// Eliminate blocks that contain only PHI nodes and an