[llvm-commits] [llvm] r47904 - in /llvm/trunk: lib/Transforms/Utils/InlineFunction.cpp test/Transforms/Inline/2008-03-04-StructRet.ll
Devang Patel
dpatel at apple.com
Tue Mar 4 13:46:01 PST 2008
On Mar 4, 2008, at 1:31 PM, Chris Lattner wrote:
>
> Just use cast<> here instead of dyn_cast. cast<> doesn't have a cost
> when assertions are disabled, dyn_cast does, this also allows you to
> remove the assert.
>
> Also, it isn't a big deal, but it is more idiomatic and simpler to
> write the loop as:
>
> while (!TheCall->use_empty()) {
> GetResultInst *GR = cast<GetResultInst>(TheCall->use_back());
> ...
> }
ok
>>
>> =
>> =====================================================================
>> --- llvm/trunk/test/Transforms/Inline/2008-03-04-StructRet.ll (added)
>> +++ llvm/trunk/test/Transforms/Inline/2008-03-04-StructRet.ll Tue
>> Mar 4 15:15:15 2008
>> @@ -0,0 +1,26 @@
>> +; RUN: llvm-as < %s | opt -inline -sretpromotion -disable-output
>
> This test should not run sretpromotion, just use a .ll file from after
> sretpromotion is run.
Done.
-
Devang
More information about the llvm-commits
mailing list