mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
While we still have a MallocInst treat it as a call like any other
for inlining. When MallocInst goes away this code will be subsumed as part of calls and work just fine... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a7ba3a81c0
commit
0704300d88
@ -135,6 +135,10 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
|
|||||||
NumInsts += 5;
|
NumInsts += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This, too, is a call.
|
||||||
|
if (isa<MallocInst>(II))
|
||||||
|
NumInsts += 5;
|
||||||
|
|
||||||
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
|
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
|
||||||
if (!AI->isStaticAlloca())
|
if (!AI->isStaticAlloca())
|
||||||
this->usesDynamicAlloca = true;
|
this->usesDynamicAlloca = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user