[llvm-commits] [llvm] r66244 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2009-03-05-dbg.ll
Devang Patel
dpatel at apple.com
Thu Mar 5 19:23:14 PST 2009
On Mar 5, 2009, at 7:17 PM, Owen Anderson wrote:
> You may need to make a similar change to memdep, to prevent debug
> instrinsics from blocking load elimination.
Can you take care of memdep?
-
Devang
>
>
> --Owen
>
> On Mar 5, 2009, at 6:59 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Thu Mar 5 20:59:27 2009
>> New Revision: 66244
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=66244&view=rev
>> Log:
>> Skip DbgInfoIntrinsic.
>>
>> Added:
>> llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll
>> Modified:
>> llvm/trunk/lib/Transforms/Scalar/GVN.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=66244&r1=66243&r2=66244&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Thu Mar 5 20:59:27 2009
>> @@ -21,7 +21,7 @@
>> #include "llvm/Constants.h"
>> #include "llvm/DerivedTypes.h"
>> #include "llvm/Function.h"
>> -#include "llvm/Instructions.h"
>> +#include "llvm/IntrinsicInst.h"
>> #include "llvm/Value.h"
>> #include "llvm/ADT/DenseMap.h"
>> #include "llvm/ADT/DepthFirstIterator.h"
>> @@ -1470,7 +1470,7 @@
>>
>> if (isa<AllocationInst>(CurInst) ||
>> isa<TerminatorInst>(CurInst) ||
>> isa<PHINode>(CurInst) || CurInst->mayReadFromMemory() ||
>> - CurInst->mayWriteToMemory())
>> + CurInst->mayWriteToMemory() ||
>> isa<DbgInfoIntrinsic>(CurInst))
>> continue;
>>
>> uint32_t valno = VN.lookup(CurInst);
>>
>> Added: llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll?rev=66244&view=auto
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll (added)
>> +++ llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll Thu Mar 5
>> 20:59:27 2009
>> @@ -0,0 +1,66 @@
>> +; RUN: llvm-as < %s | opt -gvn -disable-output
>> + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*,
>> i8*, i1, i1, i8*, i32 }
>> + at llvm.dbg.compile_unit298 = external constant
>> %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*>
>> [#uses=1]
>> +
>> +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind
>> +
>> +define i8* @__deregister_frame_info_bases(i8* %begin) {
>> +entry:
>> + br i1 false, label %bb17, label %bb
>> +
>> +bb: ; preds = %entry
>> + br i1 false, label %bb17, label %bb6.preheader
>> +
>> +bb6.preheader: ; preds = %bb
>> + br label %bb6
>> +
>> +bb3: ; preds = %bb6
>> + br i1 false, label %bb4, label %bb6
>> +
>> +bb4: ; preds = %bb3
>> + br label %out
>> +
>> +bb6: ; preds = %bb3, %bb6.preheader
>> + br i1 false, label %bb14.loopexit, label %bb3
>> +
>> +bb8: ; preds = %bb14
>> + br i1 false, label %bb9, label %bb11
>> +
>> +bb9: ; preds = %bb8
>> + br i1 false, label %bb10, label %bb13
>> +
>> +bb10: ; preds = %bb9
>> + br label %out
>> +
>> +bb11: ; preds = %bb8
>> + br i1 false, label %bb12, label %bb13
>> +
>> +bb12: ; preds = %bb11
>> + br label %out
>> +
>> +bb13: ; preds = %bb11, %bb9
>> + br label %bb14
>> +
>> +bb14.loopexit: ; preds = %bb6
>> + br label %bb14
>> +
>> +bb14: ; preds = %bb14.loopexit, %bb13
>> + br i1 false, label %bb15.loopexit, label %bb8
>> +
>> +out: ; preds = %bb12, %bb10, %bb4
>> + tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast
>> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit298 to { }*))
>> + br i1 false, label %bb15, label %bb16
>> +
>> +bb15.loopexit: ; preds = %bb14
>> + br label %bb15
>> +
>> +bb15: ; preds = %bb15.loopexit, %out
>> + tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast
>> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit298 to { }*))
>> + unreachable
>> +
>> +bb16: ; preds = %out
>> + ret i8* null
>> +
>> +bb17: ; preds = %bb, %entry
>> + ret i8* null
>> +}
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list