Improve naming of llvm Instructions created.
We now try harder to keep the names of instructions related to the initial names of variables they're derived from and so forth. This is useful for making both LLVM IR as well as generated C++ code easier to correlate back to the original ispc source code. Issue #244.
This commit is contained in:
@@ -4402,7 +4402,8 @@ SmearCleanupPass::runOnBasicBlock(llvm::BasicBlock &bb) {
|
||||
Value *args[1] = { toMatch };
|
||||
ArrayRef<llvm::Value *> argArray(&args[0], &args[1]);
|
||||
Instruction *smearCall =
|
||||
CallInst::Create(smearFunc, argArray, "smear", (Instruction *)NULL);
|
||||
CallInst::Create(smearFunc, argArray, LLVMGetName(toMatch, "_smear"),
|
||||
(Instruction *)NULL);
|
||||
|
||||
ReplaceInstWithInst(iter, smearCall);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user