This is an archive of the discontinued LLVM Phabricator instance.

[Analysis] Support aligned new/delete functions.
ClosedPublic

Authored by EricWF on Mar 21 2018, 6:38 PM.

Details

Summary

Clang's __builtin_operator_new/delete was recently taught about the aligned allocation overloads (r328134). This patch makes LLVM aware of them as well.
This allows the compiler to perform certain optimizations including eliding new/delete calls.

Diff Detail

Repository
rL LLVM

Event Timeline

EricWF created this revision.Mar 21 2018, 6:38 PM
EricWF updated this revision to Diff 139544.Mar 22 2018, 6:03 PM
  • Add support for nothrow aligned now/delete operators.
EricWF updated this revision to Diff 139547.Mar 22 2018, 6:28 PM
  • Correct AllocationFnData for align_val_t overloads to properly check the second parameter.
EricWF updated this revision to Diff 139548.Mar 22 2018, 6:31 PM

Uploading correct diff. Sorry for the spam.

This revision is now accepted and ready to land.Apr 4 2018, 7:40 AM
This revision was automatically updated to reflect the committed changes.