1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Go to file
Richard Smith 418500e026 PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz.
Summary:
This transformation is correct for a builtin call to 'free(p)', but not
for 'operator delete(p)'. There is no guarantee that a user replacement
'operator delete' has no effect when called on a null pointer.

However, the principle behind the transformation *is* correct, and can
be applied more broadly: a 'delete p' expression is permitted to
unconditionally call 'operator delete(p)'. So do that in Clang under
-Oz where possible. We do this whether or not 'p' has trivial
destruction, since the destruction might turn out to be trivial after
inlining, and even for a class-specific (but non-virtual,
non-destroying, non-array) 'operator delete'.

Reviewers: davide, dnsampaio, rjmccall

Reviewed By: dnsampaio

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D79378
2020-06-05 17:13:43 -07:00
benchmarks
bindings Fix go bindings after FixedVectorType -> VectorType change. 2020-05-15 16:37:57 -07:00
cmake [CMake] Do not append -lm to CMAKE_REQUIRED_LIBRARIES on Apple 2020-06-05 12:45:30 -04:00
docs Fix a typo in AMDGPU docs 2020-06-05 13:30:17 +00:00
examples StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
include Migrate the rest of COFFObjectFile to Error 2020-06-05 16:29:05 -07:00
lib PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz. 2020-06-05 17:13:43 -07:00
projects
resources
runtimes [runtimes] When COMPILER_RT is enabled, consider SANITIZER prefixes 2020-03-11 14:22:20 -07:00
test PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz. 2020-06-05 17:13:43 -07:00
tools Migrate the rest of COFFObjectFile to Error 2020-06-05 16:29:05 -07:00
unittests GlobalISel: Add G_EXTRACT/G_INSERT offset to legalize info 2020-06-05 14:54:40 -04:00
utils [gn build] Port 8a8c6913a93 2020-06-05 19:48:20 +00:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes
.gitignore Continue removing llgo. 2020-02-10 10:33:58 -08:00
CMakeLists.txt Automatically configure MLIR when flang is enabled 2020-05-27 07:31:49 +00:00
CODE_OWNERS.TXT Add self as code owner for SCEV and IndVars 2020-05-26 17:35:54 -07:00
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.