[llvm-commits] [llvm] r95628 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Support/StandardPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/ObjectSizeLowering.cpp test/Transforms/InstCombine/objsize.ll test/Transforms/ObjSizeLower/ test/Transforms/ObjSizeLower/objsize.ll

Chris Lattner clattner at apple.com
Tue Feb 9 09:15:10 PST 2010


Sounds great, thanks Eric!

-Chris

On Feb 9, 2010, at 9:07 AM, Eric Christopher <echristo at apple.com> wrote:

>>
>> Right now, yes, it's a big hammer. However, for various different  
>> permutations of geps etc I found I was duplicating (iteratively) a  
>> lot of SCEV's internal code to determine offsets into objects etc.
>>
>> Ideally we'd also like to use that along with loop information to  
>> be able to tell something like this:
>>
>> char buffer[128];
>>
>> for (int i = 0; i < 128; i++)
>>  strcpy(buffer[i], "f")
>>
>> or assorted and tell that we're not going to overrun the buffer and  
>> lower to an explicit strcpy instead of the checking version.
>
> After chatting yesterday it doesn't appear that gcc deals with any  
> of this, mostly just merging phis/conditionals so I'll just go ahead  
> and do this in instcombine and  attempt to lower the checking calls  
> there, moving that code from simplifylibcalls.
>
> If we ever do want to resurrect this, it's obviously pretty easy to  
> write :)
>
> How's that sound?
>
> -eric



More information about the llvm-commits mailing list