[llvm-commits] patch: CXAGuardElimination pass.

Chris Lattner clattner at apple.com
Mon May 25 21:15:35 PDT 2009


On May 25, 2009, at 3:33 PM, Nick Lewycky wrote:
>>> +  This pass deletes dead calls to __cxa_guard_acquire and  
>>> __cxa_guard_release
>>> +  which are part of the Itanium C++ ABI. T hese are used to  
>>> prevent a function
>> T hese -> These
>
> That line is gone.
>
> Updated patch attached. Thanks for the review!

hi Nick,

As we discussed on IRC, I'd really like to see this get sucked into  
simplifylibcalls instead of being its own pass.  This has two  
advantages: 1) it will be a function pass, so it will interoperate  
more nicely with the inliner etc, and 2) it eliminates a special  
purpose pass with narrow goals.  I haven't look at the patch in detail  
yet, but one other minor point is that your loop to check to see if  
all uses of cxa_* are direct calls is not sufficient: other  
translation units could take their addresses etc.

-Chris



More information about the llvm-commits mailing list