[llvm] r231127 - unique_ptrify ResourcePriorityQueue::ResourceModel
David Blaikie
dblaikie at gmail.com
Tue Mar 3 12:49:09 PST 2015
Author: dblaikie
Date: Tue Mar 3 14:49:08 2015
New Revision: 231127
URL: http://llvm.org/viewvc/llvm-project?rev=231127&view=rev
Log:
unique_ptrify ResourcePriorityQueue::ResourceModel
Modified:
llvm/trunk/include/llvm/CodeGen/ResourcePriorityQueue.h
llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ResourcePriorityQueue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ResourcePriorityQueue.h?rev=231127&r1=231126&r2=231127&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ResourcePriorityQueue.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ResourcePriorityQueue.h Tue Mar 3 14:49:08 2015
@@ -64,7 +64,7 @@ namespace llvm {
/// ResourcesModel - Represents VLIW state.
/// Not limited to VLIW targets per say, but assumes
/// definition of DFA by a target.
- DFAPacketizer *ResourcesModel;
+ std::unique_ptr<DFAPacketizer> ResourcesModel;
/// Resource model - packet/bundle model. Purely
/// internal at the time.
@@ -77,10 +77,6 @@ namespace llvm {
public:
ResourcePriorityQueue(SelectionDAGISel *IS);
- ~ResourcePriorityQueue() {
- delete ResourcesModel;
- }
-
bool isBottomUp() const override { return false; }
void initNodes(std::vector<SUnit> &sunits) override;
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp?rev=231127&r1=231126&r2=231127&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp Tue Mar 3 14:49:08 2015
@@ -47,7 +47,7 @@ ResourcePriorityQueue::ResourcePriorityQ
TRI = STI.getRegisterInfo();
TLI = IS->TLI;
TII = STI.getInstrInfo();
- ResourcesModel = TII->CreateTargetScheduleState(STI);
+ ResourcesModel.reset(TII->CreateTargetScheduleState(STI));
// This hard requirement could be relaxed, but for now
// do not let it procede.
assert(ResourcesModel && "Unimplemented CreateTargetScheduleState.");
More information about the llvm-commits
mailing list