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,
358358 LVer->annotateInstWithNoAlias (To, Orig);
359359}
360360
361- void VPTransformState::addMetadata (Instruction *To, Instruction *From) {
361+ void VPTransformState::addMetadata (Value *To, Instruction *From) {
362362 // No source instruction to transfer metadata from?
363363 if (!From)
364364 return ;
365365
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);
378369 }
379370}
380371
Original file line number Diff line number Diff line change @@ -346,11 +346,7 @@ struct VPTransformState {
346346 // / This includes both the original MDs from \p From and additional ones (\see
347347 // / addNewMetadata). Use this for *newly created* instructions in the vector
348348 // / 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);
354350
355351 // / Set the debug location in the builder using the debug location \p DL.
356352 void setDebugLocFrom (DebugLoc DL);
You can’t perform that action at this time.
0 commit comments