[llvm-commits] [llvm] r94113 - /llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Victor Hernandez
vhernandez at apple.com
Fri Jan 22 14:51:14 PST 2010
Yup, fixed in r94194.
Victor
On Jan 21, 2010, at 3:59 PM, Chris Lattner wrote:
>
> On Jan 21, 2010, at 3:08 PM, Victor Hernandez wrote:
>
>> Author: hernande
>> Date: Thu Jan 21 17:08:36 2010
>> New Revision: 94113
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=94113&view=rev
>> Log:
>> DbgInfoIntrinsic no longer appear in an instruction's use list
>>
>> Modified:
>> llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=94113&r1=94112&r2=94113&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ======================================================================
>> --- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Thu Jan 21 17:08:36 2010
>> @@ -76,16 +76,9 @@
>> return false; // Don't allow a store OF the AI, only INTO the AI.
>> if (SI->isVolatile())
>> return false;
>> - } else if (const BitCastInst *BC = dyn_cast<BitCastInst>(*UI)) {
>> - // A bitcast that does not feed into debug info inhibits promotion.
>> - if (!BC->hasOneUse() || !isa<DbgInfoIntrinsic>(*BC->use_begin()))
>> - return false;
>> - // If the only use is by debug info, this alloca will not exist in
>> - // non-debug code, so don't try to promote; this ensures the same
>> - // codegen with debug info. Otherwise, debug info should not
>> - // inhibit promotion (but we must examine other uses).
>> - if (AI->hasOneUse())
>> - return false;
>> + } else if (isa<BitCastInst>(*UI)) {
>> + // A bitcast inhibits promotion.
>> + return false;
>> } else {
>> return false;
>
> Can't the 'else if' just be removed? It will be handled by the else case.
>
> -Chris
More information about the llvm-commits
mailing list