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 | ed3caf90866e183380a06c0ae49101204a9f3c28 (patch) | |
tree | 94cb38fec35b6617bda80d7f134f923796a596f6 /lib | |
parent | 04187ecd57c6ce2550fbcea43966c5cff234b39a (diff) | |
download | llvm-ed3caf90866e183380a06c0ae49101204a9f3c28.tar.gz llvm-ed3caf90866e183380a06c0ae49101204a9f3c28.tar.bz2 llvm-ed3caf90866e183380a06c0ae49101204a9f3c28.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index f9f89858c9..a9afec8b21 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/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); |