llvm-exegesis - fix shadow variable warnings. NFCI.

This commit is contained in:
Simon Pilgrim 2019-11-09 13:43:09 +00:00
parent 56a725ae5e
commit aedb528d43
2 changed files with 5 additions and 5 deletions

View File

@ -70,7 +70,7 @@ static bool addPass(PassManagerBase &PM, StringRef PassName,
return false; return false;
} }
MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionID, MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionName,
Module *Module, Module *Module,
MachineModuleInfo *MMI) { MachineModuleInfo *MMI) {
Type *const ReturnType = Type::getInt32Ty(Module->getContext()); Type *const ReturnType = Type::getInt32Ty(Module->getContext());
@ -79,7 +79,7 @@ MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionID,
FunctionType *FunctionType = FunctionType *FunctionType =
FunctionType::get(ReturnType, {MemParamType}, false); FunctionType::get(ReturnType, {MemParamType}, false);
Function *const F = Function::Create( Function *const F = Function::Create(
FunctionType, GlobalValue::InternalLinkage, FunctionID, Module); FunctionType, GlobalValue::InternalLinkage, FunctionName, Module);
// Making sure we can create a MachineFunction out of this Function even if it // Making sure we can create a MachineFunction out of this Function even if it
// contains no IR. // contains no IR.
F->setIsMaterializable(true); F->setIsMaterializable(true);

View File

@ -217,11 +217,11 @@ generateSnippets(const LLVMState &State, unsigned Opcode,
if (InstrDesc.isCall() || InstrDesc.isReturn()) if (InstrDesc.isCall() || InstrDesc.isReturn())
return make_error<Failure>("Unsupported opcode: isCall/isReturn"); return make_error<Failure>("Unsupported opcode: isCall/isReturn");
SnippetGenerator::Options Options; SnippetGenerator::Options SnippetOptions;
Options.MaxConfigsPerOpcode = MaxConfigsPerOpcode; SnippetOptions.MaxConfigsPerOpcode = MaxConfigsPerOpcode;
const std::unique_ptr<SnippetGenerator> Generator = const std::unique_ptr<SnippetGenerator> Generator =
State.getExegesisTarget().createSnippetGenerator(BenchmarkMode, State, State.getExegesisTarget().createSnippetGenerator(BenchmarkMode, State,
Options); SnippetOptions);
if (!Generator) if (!Generator)
report_fatal_error("cannot create snippet generator"); report_fatal_error("cannot create snippet generator");
return Generator->generateConfigurations(Instr, ForbiddenRegs); return Generator->generateConfigurations(Instr, ForbiddenRegs);