[llvm-commits] [llvm] r86897 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Duncan Sands baldrick at free.fr
Thu Nov 12 11:27:40 PST 2009


Hi Bill,

>> doesn't this mean that if a pointer to a nounwind function is passed as a
>> call parameter (rather than as the callee), then DoesNotThrow is set to true?
>>
> If such an instruction existed, then I suppose. What's the best way to determine that it's the "callee" and not a parameter? Do you have an example to work with?

I actually think the approach is wrong.  A call can be "nounwind" without the
callee necessarily being nounwind.  Your patch only catches the case of the
callee being nounwind.  The CallSite doesNotThrow method checks for both of
these possibilities.  I think what should happen is: at the moment of lowering
the IR to SDAG nodes, check "doesNotThrow" on calls and set a corresponding
flag in the SDAG node.  Check this flag when outputting the dwarf table.

Ciao,

Duncan.



More information about the llvm-commits mailing list