[LLVMdev] Deduplication of memory allocation

François Fayard fayard.francois at icloud.com
Fri May 1 09:25:44 PDT 2015


> Probably the easiest way to give the compiler an opportunity here would be to have 'f's definition available for inlining - a compiler might be able to inline that, then, depending on the particular allocation behavior of 'f', the allocation /may/ be reused (I don't think we do anything like reusing yet - though we can, to some degree, inline a bunch of std::vector's ops and then just remove the whole std::vector thing in favor of a stack allocation, for example) 


Do you have any concrete example where std::vector is finally allocated on the stack?



More information about the llvm-dev mailing list