Assert(!funcDef->isDeclaration());
Assert(funcDef->hasExternalLinkage());
- /* don't inline functions marked as noinline */
- if (funcDef->getAttributes().hasFnAttribute(llvm::Attribute::NoInline))
- {
- ilog(DEBUG1, "ineligibile to import %s due to noinline",
- symbolName.data());
- continue;
- }
-
llvm::StringSet<> importVars;
llvm::SmallPtrSet<const llvm::Function *, 8> visitedFunctions;
int running_instcount = 0;
if (F.materialize())
elog(FATAL, "failed to materialize metadata");
+ if (F.getAttributes().hasFnAttribute(llvm::Attribute::NoInline))
+ {
+ ilog(DEBUG1, "ineligibile to import %s due to noinline",
+ F.getName().data());
+ return false;
+ }
+
function_references(F, running_instcount, referencedVars, referencedFunctions);
for (llvm::GlobalVariable* rv: referencedVars)