1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Go to file
Roman Lebedev 794d4b6ead [InstCombine] combineLoadToOperationType(): don't fold int<->ptr cast into load
And another step towards transforms not introducing inttoptr and/or
ptrtoint casts that weren't there already.

As we've been establishing (see D88788/D88789), if there is a int<->ptr cast,
it basically must stay as-is, we can't do much with it.

I've looked, and the most source of new such casts being introduces,
as far as i can tell, is this transform, which, ironically,
tries to reduce count of casts..

On vanilla llvm test-suite + RawSpeed, @ `-O3`, this results in
-33.58% less `IntToPtr`s (19014 -> 12629)
and +76.20% more `PtrToInt`s (18589 -> 32753),
which is an increase of +20.69% in total.

However just on RawSpeed, where i know there are basically
none `IntToPtr` in the original source code,
this results in -99.27% less `IntToPtr`s (2724 -> 20)
and +82.92% more `PtrToInt`s (4513 -> 8255).
which is again an increase of 14.34% in total.

To me this does seem like the step in the right direction,
we end up with strictly less `IntToPtr`, but strictly more `PtrToInt`,
which seems like a reasonable trade-off.

See https://reviews.llvm.org/D88860 / https://reviews.llvm.org/D88995
for some more discussion on the subject.

(Eventually, `CastInst::isNoopCast()`/`CastInst::isEliminableCastPair`
should be taught about this, yes)

Reviewed By: nlopes, nikic

Differential Revision: https://reviews.llvm.org/D88979
2020-10-11 20:24:28 +03:00
benchmarks Pull google/benchmark library to the LLVM tree 2018-08-28 09:42:41 +00:00
bindings [bindings/go] Fix TestAttributes after D88241 2020-09-25 20:31:45 -07:00
cmake Fix CMake configuration error when run with -Werror/-Wall 2020-10-10 21:22:40 +02:00
docs Step down from security group 2020-10-10 09:48:02 -07:00
examples [ORC][examples] Temporarily remove LLJITWithChildProcess until ORC TPC lands 2020-10-01 10:25:13 +02:00
include [LV] Tail folded inloop reductions. 2020-10-11 16:58:34 +01:00
lib [InstCombine] combineLoadToOperationType(): don't fold int<->ptr cast into load 2020-10-11 20:24:28 +03:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes [CMake] Don't use CMakePushCheckState 2020-10-02 17:13:34 -07:00
test [InstCombine] combineLoadToOperationType(): don't fold int<->ptr cast into load 2020-10-11 20:24:28 +03:00
tools [AMDGPU] Add gfx602, gfx705, gfx805 targets 2020-10-10 17:22:22 +01:00
unittests [DebugInfo] Support for DWARF attribute DW_AT_rank 2020-10-10 17:51:12 +05:30
utils [TblGen][Scheduling] Fix debug output. NFC 2020-10-10 10:04:28 +01: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 Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' 2020-07-07 14:53:45 +02:00
CMakeLists.txt Guard find_library(tensorflow_c_api ...) by checking for TENSORFLOW_C_LIB_PATH to be set by the user 2020-09-28 22:15:55 +00:00
CODE_OWNERS.TXT [CSKY 1/n] Add basic stub or infra of csky backend 2020-10-10 10:44:08 +08:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT [NFC] Add contributors names to CREDITS.TXT 2020-10-07 13:22:55 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

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.