diff options
| author | Cameron Zwarich <zwarich@apple.com> | 2011-04-02 02:40:26 +0000 |
|---|---|---|
| committer | Cameron Zwarich <zwarich@apple.com> | 2011-04-02 02:40:26 +0000 |
| commit | 8c7bbc09e2287533d48e932b4c833be3cdc37409 (patch) | |
| tree | d840f3e743ef65664d2f87fb5b18ed954363bd1f /llvm/lib/CodeGen/SelectionDAG | |
| parent | 8904cc49dbdbf6d84e75fa8a6b5b1b7a00a029e0 (diff) | |
| download | bcm5719-llvm-8c7bbc09e2287533d48e932b4c833be3cdc37409.tar.gz bcm5719-llvm-8c7bbc09e2287533d48e932b4c833be3cdc37409.zip | |
Add a RemoveFromWorklist method to DCI. This is needed to do some complicated
transformations in target-specific DAG combines without causing DAGCombiner to
delete the same node twice. If you know of a better way to avoid this (see my
next patch for an example), please let me know.
llvm-svn: 128758
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index f9f89858c97..a9afec8b216 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -319,6 +319,10 @@ void TargetLowering::DAGCombinerInfo::AddToWorklist(SDNode *N) { ((DAGCombiner*)DC)->AddToWorkList(N); } +void TargetLowering::DAGCombinerInfo::RemoveFromWorklist(SDNode *N) { + ((DAGCombiner*)DC)->removeFromWorkList(N); +} + SDValue TargetLowering::DAGCombinerInfo:: CombineTo(SDNode *N, const std::vector<SDValue> &To, bool AddTo) { return ((DAGCombiner*)DC)->CombineTo(N, &To[0], To.size(), AddTo); |

