[llvm-commits] [llvm] r127985 - /llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Frits van Bommel
fvbommel at gmail.com
Mon Mar 21 01:55:31 PDT 2011
On Mon, Mar 21, 2011 at 9:45 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Anders,
>
>> @@ -2742,6 +2742,13 @@
>> if (!CalledFn)
>> return false;
>>
>> + if (unsigned IntrinsicID = CalledFn->getIntrinsicID()) {
>> + // Ignore debug intrinsics.
>> + if (IntrinsicID == llvm::Intrinsic::dbg_declare ||
>> + IntrinsicID == llvm::Intrinsic::dbg_value)
>> + continue;
>> + }
>> +
>
> if (isa<DbgInfoIntrinsic>(CalledFn))
> continue;
>
> would be neater. See IntrinsicInst.h
Actually, that'd be isa<DbgInfoIntrinsic>(CI), because a
DbgInfoIntrinsic is a call to an intrinsic function instead of the
function itself.
More information about the llvm-commits
mailing list