[PATCH] D15208: Patch for inline abort code generation

Dan Austin via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 22 10:57:04 PST 2015


danielaustin updated this revision to Diff 43459.
danielaustin added a comment.

Test case added which looks for the existence of multiple trap basic blocks in generated LLVM-IR with optimization turned on. Flag renamed (-fmerge-traps/-fno-merge-traps) and placed in a more sensible location (CodeGenOptions.def). Trap inlining logic changed to work with most recent version of LLVM (as opposed to the one packaged with AOSP). Without turning optimization off in the function containing the trap, there were cases that the abort calls were merged to the end of the function. Turning off inlining and optimization for a function which is not to merge traps appears to be working, but further analysis is in process.

This version results in slightly bigger code (~10% per function) than the original version, but has the benefit of not breaking basic blocks.


Repository:
  rL LLVM

http://reviews.llvm.org/D15208

Files:
  include/clang/Driver/Options.td
  include/clang/Frontend/CodeGenOptions.def
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/CGExpr.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/merge-traps.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15208.43459.patch
Type: text/x-patch
Size: 6444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151222/9d192d53/attachment.bin>


More information about the cfe-commits mailing list