mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Critical fix- function inlining was broken
This commit is contained in:
parent
cdabb18d9f
commit
b8437bc67c
1 changed files with 8 additions and 1 deletions
|
@ -106,6 +106,8 @@
|
|||
#include "llvm/Bitcode/BitcodeReader.h"
|
||||
#include "llvm/Bitcode/BitcodeWriterPass.h"
|
||||
#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
|
||||
#include "llvm/Transforms/IPO/AlwaysInliner.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
|
||||
#include "../LLVMUtils.h"
|
||||
|
||||
|
@ -3580,12 +3582,17 @@ static void PopulateModulePassManager(llvm::legacy::PassManagerBase &MPM, const
|
|||
// MPM.add(createPruneEHPass());
|
||||
// MPM.add(createSampleProfileLoaderPass(PGOSampleUse));
|
||||
// }
|
||||
llvm::Pass* Inliner = NULL;
|
||||
llvm::Pass* Inliner;
|
||||
bool prepareForLTO = false;
|
||||
bool prepareForThinLTO = options.mLTOType == BfLTOType_Thin;
|
||||
bool performThinLTO = false;
|
||||
bool enableNonLTOGlobalsModRef = false;
|
||||
|
||||
if (GetOptLevel(options.mOptLevel) > 0)
|
||||
Inliner = llvm::createFunctionInliningPass(GetOptLevel(options.mOptLevel), options.mSizeLevel, false);
|
||||
else
|
||||
Inliner = llvm::createAlwaysInlinerLegacyPass();
|
||||
|
||||
// Allow forcing function attributes as a debugging and tuning aid.
|
||||
MPM.add(llvm::createForceFunctionAttrsLegacyPass());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue