[llvm-commits] patch: CXAGuardElimination pass.
Duncan Sands
baldrick at free.fr
Tue May 26 01:12:53 PDT 2009
Hi Nick,
>> What about this:
>>
>> bb1: acquire
>> br bbr
>> bb2: acquire
>> br bbr
>> bbr: release
>>
>> Aren't you going to eliminate the first acquire and the release, but
>> not the second acquire?
>
> No, it'll eliminate the second acquire and the release, but not the
> first acquire. Note that there's code to detect this case in
> deadGuardElim (see the comments).
note that bb1 doesn't branch to bb2, it branches to bbr.
> As far as I can tell that's valid behaviour for this transform so long
> as we don't mind removing infinite loops (note that these infinite loops
> can't be deliberately constructed by the user code, the calls to
> __cxa_guard are always emitted by the compiler...).
Not sure what you are saying? I hope you are not saying that this
transform relies on a particular style of guard usage being fed into
it...
Ciao,
Duncan.
More information about the llvm-commits
mailing list