mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 18:36:06 +00:00
llvm-reduce: Use consistent ReductionFunc types
Some of these were relying on ReducerWorkItem's operator Module&.
This commit is contained in:
parent
60834105d8
commit
23cc36e476
@ -26,6 +26,11 @@ public:
|
||||
|
||||
bool isMIR() const { return MMI != nullptr; }
|
||||
|
||||
LLVMContext &getContext() {
|
||||
return M->getContext();
|
||||
}
|
||||
|
||||
Module &getModule() { return *M; }
|
||||
const Module &getModule() const { return *M; }
|
||||
|
||||
void print(raw_ostream &ROS, void *p = nullptr) const;
|
||||
|
@ -91,7 +91,7 @@ void writeBitcode(const ReducerWorkItem &M, raw_ostream &OutStream) {
|
||||
Index = std::make_unique<ModuleSummaryIndex>(
|
||||
buildModuleSummaryIndex(M, nullptr, &PSI));
|
||||
}
|
||||
WriteBitcodeToFile(M, OutStream, Index.get());
|
||||
WriteBitcodeToFile(M.getModule(), OutStream, Index.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ using namespace llvm;
|
||||
|
||||
/// Removes all aliases aren't inside any of the
|
||||
/// desired Chunks.
|
||||
static void extractAliasesFromModule(Oracle &O, Module &Program) {
|
||||
for (auto &GA : make_early_inc_range(Program.aliases())) {
|
||||
static void extractAliasesFromModule(Oracle &O, ReducerWorkItem &Program) {
|
||||
for (auto &GA : make_early_inc_range(Program.getModule().aliases())) {
|
||||
if (!O.shouldKeep()) {
|
||||
GA.replaceAllUsesWith(GA.getAliasee());
|
||||
GA.eraseFromParent();
|
||||
|
@ -56,7 +56,8 @@ static bool shouldRemoveArguments(const Function &F) {
|
||||
|
||||
/// Removes out-of-chunk arguments from functions, and modifies their calls
|
||||
/// accordingly. It also removes allocations of out-of-chunk arguments.
|
||||
static void extractArgumentsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractArgumentsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
std::vector<Argument *> InitArgsToKeep;
|
||||
std::vector<Function *> Funcs;
|
||||
// Get inside-chunk arguments, as well as their parent function
|
||||
|
@ -146,9 +146,9 @@ public:
|
||||
} // namespace
|
||||
|
||||
/// Removes out-of-chunk attributes from module.
|
||||
static void extractAttributesFromModule(Oracle &O, Module &Program) {
|
||||
AttributeRemapper R(O, Program.getContext());
|
||||
R.visit(Program);
|
||||
static void extractAttributesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
AttributeRemapper R(O, WorkItem.getContext());
|
||||
R.visit(WorkItem.getModule());
|
||||
}
|
||||
|
||||
void llvm::reduceAttributesDeltaPass(TestRunner &Test) {
|
||||
|
@ -132,11 +132,11 @@ removeUninterestingBBsFromSwitch(SwitchInst &SwInst,
|
||||
|
||||
/// Removes out-of-chunk arguments from functions, and modifies their calls
|
||||
/// accordingly. It also removes allocations of out-of-chunk arguments.
|
||||
static void extractBasicBlocksFromModule(Oracle &O, Module &Program) {
|
||||
static void extractBasicBlocksFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
DenseSet<BasicBlock *> BBsToDelete;
|
||||
df_iterator_default_set<BasicBlock *> Reachable;
|
||||
|
||||
for (auto &F : Program) {
|
||||
for (auto &F : WorkItem.getModule()) {
|
||||
if (F.empty())
|
||||
continue;
|
||||
|
||||
@ -183,11 +183,12 @@ void llvm::reduceBasicBlocksDeltaPass(TestRunner &Test) {
|
||||
runDeltaPass(Test, extractBasicBlocksFromModule, "Reducing Basic Blocks");
|
||||
}
|
||||
|
||||
static void removeUnreachableBasicBlocksFromModule(Oracle &O, Module &M) {
|
||||
static void removeUnreachableBasicBlocksFromModule(Oracle &O,
|
||||
ReducerWorkItem &WorkItem) {
|
||||
std::vector<BasicBlock *> DeadBlocks;
|
||||
df_iterator_default_set<BasicBlock *> Reachable;
|
||||
|
||||
for (Function &F : M) {
|
||||
for (Function &F : WorkItem.getModule()) {
|
||||
if (F.empty())
|
||||
continue;
|
||||
|
||||
|
@ -78,7 +78,9 @@ void identifyUninterestingMDNodes(Oracle &O, MDNodeList &MDs) {
|
||||
}
|
||||
}
|
||||
|
||||
static void extractDIMetadataFromModule(Oracle &O, Module &Program) {
|
||||
static void extractDIMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
MDNodeList MDs;
|
||||
// Collect all !dbg metadata attachments.
|
||||
for (const auto &DC : Program.debug_compile_units())
|
||||
|
@ -21,9 +21,10 @@ using namespace llvm;
|
||||
|
||||
/// Removes all the bodies of defined functions that aren't inside any of the
|
||||
/// desired Chunks.
|
||||
static void extractFunctionBodiesFromModule(Oracle &O, Module &Program) {
|
||||
static void extractFunctionBodiesFromModule(Oracle &O,
|
||||
ReducerWorkItem &WorkItem) {
|
||||
// Delete out-of-chunk function bodies
|
||||
for (auto &F : Program) {
|
||||
for (auto &F : WorkItem.getModule()) {
|
||||
if (!F.isDeclaration() && !hasAliasUse(F) && !O.shouldKeep()) {
|
||||
F.deleteBody();
|
||||
F.setComdat(nullptr);
|
||||
@ -36,8 +37,8 @@ void llvm::reduceFunctionBodiesDeltaPass(TestRunner &Test) {
|
||||
"Reducing Function Bodies");
|
||||
}
|
||||
|
||||
static void reduceFunctionData(Oracle &O, Module &M) {
|
||||
for (Function &F : M) {
|
||||
static void reduceFunctionData(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule()) {
|
||||
if (F.hasPersonalityFn()) {
|
||||
if (none_of(F,
|
||||
[](const BasicBlock &BB) {
|
||||
|
@ -25,7 +25,9 @@ using namespace llvm;
|
||||
|
||||
/// Removes all the Defined Functions
|
||||
/// that aren't inside any of the desired Chunks.
|
||||
static void extractFunctionsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractFunctionsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
// Record all out-of-chunk functions.
|
||||
SmallPtrSet<Constant *, 8> FuncsToRemove;
|
||||
for (Function &F : Program.functions()) {
|
||||
|
@ -19,8 +19,8 @@ static bool shouldReduceAlign(GlobalObject &GO) {
|
||||
|
||||
static bool shouldReduceComdat(GlobalObject &GO) { return GO.hasComdat(); }
|
||||
|
||||
static void reduceGOs(Oracle &O, Module &Program) {
|
||||
for (auto &GO : Program.global_objects()) {
|
||||
static void reduceGOs(Oracle &O, ReducerWorkItem &Program) {
|
||||
for (auto &GO : Program.getModule().global_objects()) {
|
||||
if (shouldReduceSection(GO) && !O.shouldKeep())
|
||||
GO.setSection("");
|
||||
if (shouldReduceAlign(GO) && !O.shouldKeep())
|
||||
|
@ -37,8 +37,8 @@ static bool shouldReduceThreadLocal(GlobalValue &GV) {
|
||||
return GV.isThreadLocal();
|
||||
}
|
||||
|
||||
static void reduceGVs(Oracle &O, Module &Program) {
|
||||
for (auto &GV : Program.global_values()) {
|
||||
static void reduceGVs(Oracle &O, ReducerWorkItem &Program) {
|
||||
for (auto &GV : Program.getModule().global_values()) {
|
||||
if (shouldReduceDSOLocal(GV) && !O.shouldKeep())
|
||||
GV.setDSOLocal(false);
|
||||
if (shouldReduceVisibility(GV) && !O.shouldKeep()) {
|
||||
|
@ -18,9 +18,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
/// Removes all the Initialized GVs that aren't inside the desired Chunks.
|
||||
static void extractGVsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
// Drop initializers of out-of-chunk GVs
|
||||
for (auto &GV : Program.globals())
|
||||
for (auto &GV : WorkItem.getModule().globals())
|
||||
if (GV.hasInitializer() && !O.shouldKeep()) {
|
||||
GV.setInitializer(nullptr);
|
||||
GV.setLinkage(GlobalValue::LinkageTypes::ExternalLinkage);
|
||||
|
@ -23,7 +23,9 @@ static bool shouldAlwaysKeep(const GlobalVariable &GV) {
|
||||
}
|
||||
|
||||
/// Removes all the GVs that aren't inside the desired Chunks.
|
||||
static void extractGVsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
// Get GVs inside desired chunks
|
||||
std::vector<Constant *> InitGVsToKeep;
|
||||
for (auto &GV : Program.globals()) {
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Operator.h"
|
||||
|
||||
static void reduceFlagsInModule(Oracle &O, Module &Mod) {
|
||||
for (Function &F : Mod) {
|
||||
static void reduceFlagsInModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule()) {
|
||||
for (Instruction &I : instructions(F)) {
|
||||
if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I)) {
|
||||
if (OBO->hasNoSignedWrap() && !O.shouldKeep())
|
||||
|
@ -28,7 +28,8 @@ static bool shouldAlwaysKeep(const Instruction &I) {
|
||||
|
||||
/// Removes out-of-chunk arguments from functions, and modifies their calls
|
||||
/// accordingly. It also removes allocations of out-of-chunk arguments.
|
||||
static void extractInstrFromModule(Oracle &O, Module &Program) {
|
||||
static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
std::vector<Instruction *> InitInstToKeep;
|
||||
|
||||
for (auto &F : Program)
|
||||
|
@ -27,8 +27,8 @@ static void reduceInvokesInFunction(Oracle &O, Function &F) {
|
||||
// reduction.
|
||||
}
|
||||
|
||||
static void reduceInvokesInModule(Oracle &O, Module &Mod) {
|
||||
for (Function &F : Mod) {
|
||||
static void reduceInvokesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule()) {
|
||||
if (F.hasPersonalityFn())
|
||||
reduceInvokesInFunction(O, F);
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ static void removeVolatileInFunction(Oracle &O, Function &F) {
|
||||
}
|
||||
}
|
||||
|
||||
static void removeVolatileInModule(Oracle &O, Module &Mod) {
|
||||
for (Function &F : Mod)
|
||||
static void removeVolatileInModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule())
|
||||
removeVolatileInFunction(O, F);
|
||||
}
|
||||
|
||||
@ -64,8 +64,9 @@ static void reduceAtomicSyncScopesInFunction(Oracle &O, Function &F) {
|
||||
}
|
||||
}
|
||||
|
||||
static void reduceAtomicSyncScopesInModule(Oracle &O, Module &Mod) {
|
||||
for (Function &F : Mod)
|
||||
static void reduceAtomicSyncScopesInModule(Oracle &O,
|
||||
ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule())
|
||||
reduceAtomicSyncScopesInFunction(O, F);
|
||||
}
|
||||
|
||||
@ -97,8 +98,8 @@ static void reduceAtomicOrderingInFunction(Oracle &O, Function &F) {
|
||||
}
|
||||
}
|
||||
|
||||
static void reduceAtomicOrderingInModule(Oracle &O, Module &Mod) {
|
||||
for (Function &F : Mod)
|
||||
static void reduceAtomicOrderingInModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
for (Function &F : WorkItem.getModule())
|
||||
reduceAtomicOrderingInFunction(O, F);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,9 @@ static constexpr StringLiteral ListNamedMetadata[] = {
|
||||
};
|
||||
|
||||
/// Remove unneeded arguments to named metadata.
|
||||
static void reduceNamedMetadataOperands(Oracle &O, Module &M) {
|
||||
static void reduceNamedMetadataOperands(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &M = WorkItem.getModule();
|
||||
|
||||
for (StringRef MDName : ListNamedMetadata) {
|
||||
NamedMDNode *NamedNode = M.getNamedMetadata(MDName);
|
||||
if (!NamedNode)
|
||||
@ -67,7 +69,9 @@ static void reduceNamedMetadataOperands(Oracle &O, Module &M) {
|
||||
|
||||
/// Removes all the Named and Unnamed Metadata Nodes, as well as any debug
|
||||
/// functions that aren't inside the desired Chunks.
|
||||
static void extractMetadataFromModule(Oracle &O, Module &Program) {
|
||||
static void extractMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
// Get out-of-chunk Named metadata nodes
|
||||
SmallVector<NamedMDNode *> NamedNodesToDelete;
|
||||
for (NamedMDNode &MD : Program.named_metadata())
|
||||
|
@ -14,7 +14,9 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static void clearModuleData(Oracle &O, Module &Program) {
|
||||
static void clearModuleData(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
if (!Program.getModuleIdentifier().empty() && !O.shouldKeep())
|
||||
Program.setModuleIdentifier("");
|
||||
if (!Program.getSourceFileName().empty() && !O.shouldKeep())
|
||||
|
@ -253,7 +253,9 @@ static Value *reduceInstruction(Oracle &O, Module &M, Instruction &I) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void replaceOpcodesInModule(Oracle &O, Module &Mod) {
|
||||
static void replaceOpcodesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Mod = WorkItem.getModule();
|
||||
|
||||
for (Function &F : Mod) {
|
||||
for (BasicBlock &BB : F)
|
||||
for (Instruction &I : make_early_inc_range(BB)) {
|
||||
|
@ -95,7 +95,9 @@ static void maybeRewriteCallWithDifferentBundles(
|
||||
}
|
||||
|
||||
/// Removes out-of-chunk operand bundles from calls.
|
||||
static void extractOperandBundesFromModule(Oracle &O, Module &Program) {
|
||||
static void extractOperandBundesFromModule(Oracle &O,
|
||||
ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
OperandBundleRemapper R(O);
|
||||
R.visit(Program);
|
||||
|
||||
|
@ -18,8 +18,10 @@ using namespace llvm;
|
||||
using namespace PatternMatch;
|
||||
|
||||
static void
|
||||
extractOperandsFromModule(Oracle &O, Module &Program,
|
||||
extractOperandsFromModule(Oracle &O, ReducerWorkItem &WorkItem,
|
||||
function_ref<Value *(Use &)> ReduceValue) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
for (auto &F : Program.functions()) {
|
||||
for (auto &I : instructions(&F)) {
|
||||
if (PHINode *Phi = dyn_cast<PHINode>(&I)) {
|
||||
@ -118,8 +120,8 @@ void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
|
||||
};
|
||||
runDeltaPass(
|
||||
Test,
|
||||
[ReduceValue](Oracle &O, Module &Program) {
|
||||
extractOperandsFromModule(O, Program, ReduceValue);
|
||||
[ReduceValue](Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
extractOperandsFromModule(O, WorkItem, ReduceValue);
|
||||
},
|
||||
"Reducing Operands to one");
|
||||
}
|
||||
@ -137,7 +139,7 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
|
||||
};
|
||||
runDeltaPass(
|
||||
Test,
|
||||
[ReduceValue](Oracle &O, Module &Program) {
|
||||
[ReduceValue](Oracle &O, ReducerWorkItem &Program) {
|
||||
extractOperandsFromModule(O, Program, ReduceValue);
|
||||
},
|
||||
"Reducing Operands to zero");
|
||||
@ -165,7 +167,7 @@ void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
|
||||
};
|
||||
runDeltaPass(
|
||||
Test,
|
||||
[ReduceValue](Oracle &O, Module &Program) {
|
||||
[ReduceValue](Oracle &O, ReducerWorkItem &Program) {
|
||||
extractOperandsFromModule(O, Program, ReduceValue);
|
||||
},
|
||||
"Reducing Operands to NaN");
|
||||
|
@ -187,7 +187,9 @@ opportunities(Function &F,
|
||||
}
|
||||
}
|
||||
|
||||
static void extractOperandsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractOperandsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
for (Function &F : Program.functions()) {
|
||||
SmallVector<std::pair<Use *, Value *>> Replacements;
|
||||
opportunities(F, [&](Use &Op, ArrayRef<Value *> Candidates) {
|
||||
|
@ -173,7 +173,9 @@ static void substituteOperandWithArgument(Function *OldF,
|
||||
NewF->setName(FName);
|
||||
}
|
||||
|
||||
static void reduceOperandsToArgs(Oracle &O, Module &Program) {
|
||||
static void reduceOperandsToArgs(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
SmallVector<Use *> OperandsToReduce;
|
||||
for (Function &F : make_early_inc_range(Program.functions())) {
|
||||
if (!canReplaceFunction(&F))
|
||||
|
@ -27,7 +27,10 @@ static StringRef SpecialGlobalNames[] = {"llvm.used", "llvm.compiler.used"};
|
||||
|
||||
/// Removes all special globals aren't inside any of the
|
||||
/// desired Chunks.
|
||||
static void extractSpecialGlobalsFromModule(Oracle &O, Module &Program) {
|
||||
static void extractSpecialGlobalsFromModule(Oracle &O,
|
||||
ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
|
||||
for (StringRef Name : SpecialGlobalNames) {
|
||||
if (auto *Used = Program.getNamedGlobal(Name)) {
|
||||
Used->replaceAllUsesWith(getDefaultValue(Used->getType()));
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static void reduceUsingSimplifyCFG(Oracle &O, Module &Program) {
|
||||
static void reduceUsingSimplifyCFG(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
SmallVector<BasicBlock *, 16> ToSimplify;
|
||||
for (auto &F : Program)
|
||||
for (auto &BB : F)
|
||||
@ -33,7 +34,9 @@ static void reduceUsingSimplifyCFG(Oracle &O, Module &Program) {
|
||||
void llvm::reduceUsingSimplifyCFGDeltaPass(TestRunner &Test) {
|
||||
runDeltaPass(Test, reduceUsingSimplifyCFG, "Reducing using SimplifyCFG");
|
||||
}
|
||||
static void reduceConditionals(Oracle &O, Module &M, bool Direction) {
|
||||
static void reduceConditionals(Oracle &O, ReducerWorkItem &WorkItem,
|
||||
bool Direction) {
|
||||
Module &M = WorkItem.getModule();
|
||||
SmallVector<BasicBlock *, 16> ToSimplify;
|
||||
|
||||
for (auto &F : M) {
|
||||
@ -58,12 +61,18 @@ static void reduceConditionals(Oracle &O, Module &M, bool Direction) {
|
||||
|
||||
void llvm::reduceConditionalsTrueDeltaPass(TestRunner &Test) {
|
||||
runDeltaPass(
|
||||
Test, [](Oracle &O, Module &M) { reduceConditionals(O, M, true); },
|
||||
Test,
|
||||
[](Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
reduceConditionals(O, WorkItem, true);
|
||||
},
|
||||
"Reducing conditional branches to true");
|
||||
}
|
||||
|
||||
void llvm::reduceConditionalsFalseDeltaPass(TestRunner &Test) {
|
||||
runDeltaPass(
|
||||
Test, [](Oracle &O, Module &M) { reduceConditionals(O, M, false); },
|
||||
Test,
|
||||
[](Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
reduceConditionals(O, WorkItem, false);
|
||||
},
|
||||
"Reducing conditional branches to false");
|
||||
}
|
||||
|
@ -23,7 +23,8 @@ static cl::opt<std::string> PassPipeline(
|
||||
cl::init("function(sroa,instcombine,gvn,simplifycfg,infer-address-spaces)"),
|
||||
cl::cat(LLVMReduceOptions));
|
||||
|
||||
static void runPasses(Oracle &O, Module &Program) {
|
||||
static void runPasses(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
LoopAnalysisManager LAM;
|
||||
FunctionAnalysisManager FAM;
|
||||
CGSCCAnalysisManager CGAM;
|
||||
|
@ -19,9 +19,10 @@ using namespace llvm;
|
||||
|
||||
/// Calls simplifyInstruction in each instruction in functions, and replaces
|
||||
/// their values.
|
||||
static void extractInstrFromModule(Oracle &O, Module &Program) {
|
||||
static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
std::vector<Instruction *> InstsToDelete;
|
||||
|
||||
Module &Program = WorkItem.getModule();
|
||||
const DataLayout &DL = Program.getDataLayout();
|
||||
|
||||
std::vector<Instruction *> InstToDelete;
|
||||
|
@ -15,7 +15,8 @@ using namespace llvm;
|
||||
|
||||
/// Removes all aliases aren't inside any of the
|
||||
/// desired Chunks.
|
||||
static void stripDebugInfoImpl(Oracle &O, Module &Program) {
|
||||
static void stripDebugInfoImpl(Oracle &O, ReducerWorkItem &WorkItem) {
|
||||
Module &Program = WorkItem.getModule();
|
||||
bool HasDebugInfo = any_of(Program.named_metadata(), [](NamedMDNode &NMD) {
|
||||
return NMD.getName().startswith("llvm.dbg.");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user