[PATCH] Outline functions for SEH with the MSVC environment

Andy Kaylor andrew.kaylor at intel.com
Thu Dec 11 08:42:12 PST 2014


- Re-implemented filter outlining in a more robust manner
- Added support for cleanup outlining
- Added code necessary to invoke the pass from opt for testing
- Updated the test to use opt and check outlined functions

I'm not sure the cleanup handling is correct.  MSVC disallows __try in a block that requires unwinding, so I expected that we'd do the same in clang.  Does the MSVC SEH personality function even support exception handlers and cleanup in the same block?  Also, it isn't clear to me how the cleanup handlers will be connected to the landingpad after they've been outlined.

I'm still not handling references to frame variables within the handlers, but I have an idea how I can do that with the CloningDirector class as I've revised it here.

I'm also still not removing code that has been outlined.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6556

Files:
  include/llvm/CodeGen/Passes.h
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Utils/Cloning.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/CodeGen.cpp
  lib/CodeGen/MSVCEHPrepare.cpp
  lib/CodeGen/Passes.cpp
  lib/Transforms/Utils/CloneFunction.cpp
  test/CodeGen/X86/seh-outline.ll
  tools/opt/opt.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6556.17176.patch
Type: text/x-patch
Size: 34038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141211/571b3bd1/attachment.bin>


More information about the llvm-commits mailing list