[PATCH] Remove CleanupHackLevel for Exception Handling

Logan Chien tzuhsiang.chien at gmail.com
Mon Jun 30 08:56:01 PDT 2014


I would like to propose to remove the CleanupHackLevel from
CGException.cpp.  This hack was originally written for the old exception
handling intrinsics, which have several issues with function inliner.
(Read [1] for more background on this hack.)

Since LLVM 3.0, the new exception handling mechanism has been proposed and
implemented [1].  The landingpad and resume instructions are added to LLVM
IR.  AFAIK, the new exception handling mechanism works very well, and
solved most of the problems.

>From the svn log, the CleanupHackLevel code hasn't be used for a long
time.  It is guarded by a compile-time constant `CleanupHackLevel`.  The
alternative cases will be considered as the dead code and removed by the
compiler.  In addition, there is no test case covering these cases.  I feel
that it's a good time to remove them.

I have attached the patch to remove the code.  Please have a look.  Feel
free to let me know if you have any suggestions.  Thanks.


[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/041748.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140630/f5db868f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-CleanupHackLevel-from-CGException.patch
Type: text/x-patch
Size: 8403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140630/f5db868f/attachment.bin>

More information about the cfe-commits mailing list