mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user