[llvm-commits] [llvm] r65977 - in /llvm/branches/Apple/Dib: include/llvm/Intrinsics.td lib/Transforms/IPO/StripSymbols.cpp
Bill Wendling
isanbard at gmail.com
Tue Mar 3 14:37:36 PST 2009
Author: void
Date: Tue Mar 3 16:37:36 2009
New Revision: 65977
URL: http://llvm.org/viewvc/llvm-project?rev=65977&view=rev
Log:
--- Merging (from foreign repository) r65971 into '.':
U lib/Transforms/IPO/StripSymbols.cpp
Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
--- Merging (from foreign repository) r65975 into '.':
U include/llvm/Intrinsics.td
Dbg Intrinsics do not access memory.
Modified:
llvm/branches/Apple/Dib/include/llvm/Intrinsics.td
llvm/branches/Apple/Dib/lib/Transforms/IPO/StripSymbols.cpp
Modified: llvm/branches/Apple/Dib/include/llvm/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/include/llvm/Intrinsics.td?rev=65977&r1=65976&r2=65977&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/include/llvm/Intrinsics.td (original)
+++ llvm/branches/Apple/Dib/include/llvm/Intrinsics.td Tue Mar 3 16:37:36 2009
@@ -261,14 +261,17 @@
//===------------------------ Debugger Intrinsics -------------------------===//
//
-def int_dbg_stoppoint : Intrinsic<[llvm_void_ty],
- [llvm_i32_ty, llvm_i32_ty,
- llvm_descriptor_ty]>;
-def int_dbg_region_start : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
-def int_dbg_region_end : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
-def int_dbg_func_start : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
-def int_dbg_declare : Intrinsic<[llvm_void_ty],
- [llvm_descriptor_ty, llvm_descriptor_ty]>;
+// None of these intrinsics accesses memory at all.
+let Properties = [IntrNoMem] in {
+ def int_dbg_stoppoint : Intrinsic<[llvm_void_ty],
+ [llvm_i32_ty, llvm_i32_ty,
+ llvm_descriptor_ty]>;
+ def int_dbg_region_start : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
+ def int_dbg_region_end : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
+ def int_dbg_func_start : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
+ def int_dbg_declare : Intrinsic<[llvm_void_ty],
+ [llvm_descriptor_ty, llvm_descriptor_ty]>;
+}
//===------------------ Exception Handling Intrinsics----------------------===//
//
Modified: llvm/branches/Apple/Dib/lib/Transforms/IPO/StripSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/IPO/StripSymbols.cpp?rev=65977&r1=65976&r2=65977&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/IPO/StripSymbols.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/IPO/StripSymbols.cpp Tue Mar 3 16:37:36 2009
@@ -28,6 +28,7 @@
#include "llvm/Pass.h"
#include "llvm/ValueSymbolTable.h"
#include "llvm/TypeSymbolTable.h"
+#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/Compiler.h"
#include "llvm/ADT/SmallPtrSet.h"
using namespace llvm;
@@ -268,8 +269,8 @@
if (Arg1->use_empty()) {
if (Constant *C = dyn_cast<Constant>(Arg1))
DeadConstants.push_back(C);
- if (Instruction *I = dyn_cast<Instruction>(Arg1))
- I->eraseFromParent();
+ else
+ RecursivelyDeleteTriviallyDeadInstructions(Arg1, NULL);
}
if (Arg2->use_empty())
if (Constant *C = dyn_cast<Constant>(Arg2))
More information about the llvm-commits
mailing list