[all-commits] [llvm/llvm-project] 9e66c4: [Utils] Use WeakTrackingVH in vector used as scrat...
Alina Sbirlea via All-commits
all-commits at lists.llvm.org
Thu Jan 23 16:05:24 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 9e66c4ec127ef6e73f1bafe06fe3fba45d59feee
https://github.com/llvm/llvm-project/commit/9e66c4ec127ef6e73f1bafe06fe3fba45d59feee
Author: Alina Sbirlea <asbirlea at google.com>
Date: 2020-01-23 (Thu, 23 Jan 2020)
Changed paths:
M llvm/include/llvm/Transforms/Utils/Local.h
M llvm/lib/Transforms/IPO/Attributor.cpp
M llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
M llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
M llvm/lib/Transforms/Utils/Local.cpp
Log Message:
-----------
[Utils] Use WeakTrackingVH in vector used as scratch storage.
The utility method RecursivelyDeleteTriviallyDeadInstructions receives
as input a vector of Instructions, where all inputs are valid
instructions. This same vector is used as a scratch storage (per the
header comment) to recursively delete instructions. If an instruction is
added as an operand of multiple other instructions, it may be added twice,
then deleted once, then the second reference in the vector is invalid.
Switch to using a Vector<WeakTrackingVH>.
This change facilitates a clean-up in LoopStrengthReduction.
More information about the All-commits
mailing list