summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-06-10 22:38:30 +0000
committerPete Cooper <peter_cooper@apple.com>2015-06-10 22:38:30 +0000
commit87b925b0645e33fc353d8c54ab21b26792262dc8 (patch)
tree943bbe2c778529bf412d5e451fcfe0e468e64766 /llvm/lib/IR/Instructions.cpp
parent115fe3762108b7aca37274cb31f10a48d9b35b01 (diff)
downloadbcm5719-llvm-87b925b0645e33fc353d8c54ab21b26792262dc8.tar.gz
bcm5719-llvm-87b925b0645e33fc353d8c54ab21b26792262dc8.zip
Move the special Phi logic for hung off uses in to User::allocHungOffUses. NFC.
PhiNode's need to allocate space for an array of Use[N] and then BasicBlock*[N]. They had their own allocHungOffUses to handle all of this. This moves the logic in to User::allocHungOffUses and PhiNode passes in a bool to say to allocate the BB* space too. Reviewed by Duncan Exon Smith. llvm-svn: 239489
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 1478bffe7c3..06e2d0913ce 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -97,18 +97,6 @@ PHINode::~PHINode() {
dropHungoffUses();
}
-Use *PHINode::allocHungoffUses(unsigned N) const {
- // Allocate the array of Uses of the incoming values, followed by a pointer
- // (with bottom bit set) to the User, followed by the array of pointers to
- // the incoming basic blocks.
- size_t size = N * sizeof(Use) + sizeof(Use::UserRef)
- + N * sizeof(BasicBlock*);
- Use *Begin = static_cast<Use*>(::operator new(size));
- Use *End = Begin + N;
- (void) new(End) Use::UserRef(const_cast<PHINode*>(this), 1);
- return Use::initTags(Begin, End);
-}
-
// removeIncomingValue - Remove an incoming value. This is useful if a
// predecessor basic block is deleted.
Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) {
OpenPOWER on IntegriCloud