[LLVMdev] exact semantics of 'nounwind'

Jan Rehders cmdkeen at gmx.de
Thu Mar 13 04:47:08 PDT 2008


Hi,

as a language front end developer I am a bit terrified by any "unwind  
here will call terminate" semantics in the IR. I'd prefer the LLVM IR  
to be free from any assumptions about the languages compiled to it and  
this looks like C++ semantics sneaking into LLVM. Thus I'm under the  
expression the calling terminate semantics should be implemented by  
the front end.

> Chris and I also couldn't agree on what the semantics ought to be  
> going
> forward. He suggested having two bits, one to memoize an analysis
> proving that it can't unwind, and one to mean that an unwind triggers
> terminate. I happen to think that this ought to be explicitly modelled
> in the IR by arcing to another BB that calls terminate.

Having two bits might probably be a viable compromise.

Just out of interest: how much does a will-not-throw-flag improve the  
generated code?

Jan




More information about the llvm-dev mailing list