diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-03-29 20:48:30 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-03-29 20:48:30 +0000 |
commit | 4d1aa2a1c645f54b9faf7a427928f061c8ca58af (patch) | |
tree | fa9c6fa57a04134bcc96e33383d35bbf0635e611 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 9bdadf0d998904ea6ba6b9302c99b9e274bd73b0 (diff) | |
download | bcm5719-llvm-4d1aa2a1c645f54b9faf7a427928f061c8ca58af.tar.gz bcm5719-llvm-4d1aa2a1c645f54b9faf7a427928f061c8ca58af.zip |
Pool allocate SDDbgValue nodes.
llvm-svn: 99836
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 1e1c6957990..32c4cc77bd3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -842,6 +842,7 @@ void SelectionDAG::clear() { Root = getEntryNode(); delete Ordering; Ordering = new SDNodeOrdering(); + DbgInfo->clear(); delete DbgInfo; DbgInfo = new SDDbgInfo(); } @@ -4849,6 +4850,26 @@ SDNode *SelectionDAG::getNodeIfExists(unsigned Opcode, SDVTList VTList, return NULL; } +/// getDbgValue - Creates a SDDbgValue node. +/// +SDDbgValue * +SelectionDAG::getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R, uint64_t Off, + DebugLoc DL, unsigned O) { + return new (Allocator) SDDbgValue(MDPtr, N, R, Off, DL, O); +} + +SDDbgValue * +SelectionDAG::getDbgValue(MDNode *MDPtr, Value *C, uint64_t Off, + DebugLoc DL, unsigned O) { + return new (Allocator) SDDbgValue(MDPtr, C, Off, DL, O); +} + +SDDbgValue * +SelectionDAG::getDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off, + DebugLoc DL, unsigned O) { + return new (Allocator) SDDbgValue(MDPtr, FI, Off, DL, O); +} + namespace { /// RAUWUpdateListener - Helper for ReplaceAllUsesWith - When the node |