File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -358,23 +358,14 @@ void VPTransformState::addNewMetadata(Instruction *To,
358
358
LVer->annotateInstWithNoAlias (To, Orig);
359
359
}
360
360
361
- void VPTransformState::addMetadata (Instruction *To, Instruction *From) {
361
+ void VPTransformState::addMetadata (Value *To, Instruction *From) {
362
362
// No source instruction to transfer metadata from?
363
363
if (!From)
364
364
return ;
365
365
366
- propagateMetadata (To, From);
367
- addNewMetadata (To, From);
368
- }
369
-
370
- void VPTransformState::addMetadata (ArrayRef<Value *> To, Instruction *From) {
371
- // No source instruction to transfer metadata from?
372
- if (!From)
373
- return ;
374
-
375
- for (Value *V : To) {
376
- if (Instruction *I = dyn_cast<Instruction>(V))
377
- addMetadata (I, From);
366
+ if (Instruction *ToI = dyn_cast<Instruction>(To)) {
367
+ propagateMetadata (ToI, From);
368
+ addNewMetadata (ToI, From);
378
369
}
379
370
}
380
371
Original file line number Diff line number Diff line change @@ -346,11 +346,7 @@ struct VPTransformState {
346
346
// / This includes both the original MDs from \p From and additional ones (\see
347
347
// / addNewMetadata). Use this for *newly created* instructions in the vector
348
348
// / loop.
349
- void addMetadata (Instruction *To, Instruction *From);
350
-
351
- // / Similar to the previous function but it adds the metadata to a
352
- // / vector of instructions.
353
- void addMetadata (ArrayRef<Value *> To, Instruction *From);
349
+ void addMetadata (Value *To, Instruction *From);
354
350
355
351
// / Set the debug location in the builder using the debug location \p DL.
356
352
void setDebugLocFrom (DebugLoc DL);
You can’t perform that action at this time.
0 commit comments