llvm-project/clang/test
Sebastian Neubauer 2a6c871596 [InstCombine] Move target-specific inst combining
For a long time, the InstCombine pass handled target specific
intrinsics. Having target specific code in general passes was noted as
an area for improvement for a long time.

D81728 moves most target specific code out of the InstCombine pass.
Applying the target specific combinations in an extra pass would
probably result in inferior optimizations compared to the current
fixed-point iteration, therefore the InstCombine pass resorts to newly
introduced functions in the TargetTransformInfo when it encounters
unknown intrinsics.
The patch should not have any effect on generated code (under the
assumption that code never uses intrinsics from a foreign target).

This introduces three new functions:
TargetTransformInfo::instCombineIntrinsic
TargetTransformInfo::simplifyDemandedUseBitsIntrinsic
TargetTransformInfo::simplifyDemandedVectorEltsIntrinsic

A few target specific parts are left in the InstCombine folder, where
it makes sense to share code. The largest left-over part in
InstCombineCalls.cpp is the code shared between arm and aarch64.

This allows to move about 3000 lines out from InstCombine to the targets.

Differential Revision: https://reviews.llvm.org/D81728
2020-07-22 15:59:49 +02:00
..
ARCMT
AST [AST][RecoveryExpr] Error-dependent expression should not be treat as a nullptr pointer constant. 2020-07-22 10:03:51 +02:00
ASTMerge
Analysis [analyzer][solver] Track symbol disequalities 2020-07-22 13:02:39 +03:00
CXX [clang][NFC] Tests showing the problems with some uses of NamedDecl::getDeclName in diagnostics, SemaOverload.cpp+SemaStmt.cpp part 2020-07-18 20:44:06 +01:00
ClangScanDeps
CodeCompletion [CodeComplete] Add code completion after function equals 2020-07-01 12:51:25 +08:00
CodeGen [InstCombine] Move target-specific inst combining 2020-07-22 15:59:49 +02:00
CodeGenCUDA [CUDA][HIP] Let lambda be host device by default 2020-07-08 13:10:26 -04:00
CodeGenCXX [AIX] report_fatal_error on `-fregister_global_dtors_with_atexit` for static init 2020-07-17 16:14:49 -04:00
CodeGenCoroutines [Coroutines] Ensure co_await promise.final_suspend() does not throw 2020-06-22 15:01:42 -07:00
CodeGenHIP [NFC] Fixed ignored .hip test. 2020-06-29 18:57:14 +03:00
CodeGenObjC Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG" 2020-07-16 16:09:08 +07:00
CodeGenObjCXX Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG" 2020-07-16 16:09:08 +07:00
CodeGenOpenCL [SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls 2020-07-22 13:53:50 +07:00
CodeGenOpenCLCXX [CGCall] Annotate references with "align" attribute. 2020-05-19 20:21:30 -07:00
CodeGenSYCL
Coverage
CoverageMapping [Coverage] fix failed test case. 2020-07-21 19:16:18 -07:00
Driver add -fpch-codegen/debuginfo mapping to -fmodules-codegen/debuginfo 2020-07-22 10:21:53 +02:00
FixIt
Format
Frontend [clang] Teach -fembed-bitcode option not to embed W_value Group 2020-07-14 14:40:43 -07:00
Headers [OpenMP][CUDA] Fix std::complex in GPU regions 2020-07-11 00:40:05 -05:00
Import [clang] Rework how and when APValues are dumped 2020-07-06 22:03:08 +01:00
Index [libclang] Fix crash when visiting a captured VLA 2020-07-08 13:10:16 -07:00
Integration
InterfaceStubs [llvm-readobj] Update tests because of changes in llvm-readobj behavior 2020-07-20 10:39:04 +01:00
Layout
Lexer [clang][slh] Add test for SLH feature checking macro 2020-05-15 12:23:31 -07:00
Misc [Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path 2020-07-20 09:34:39 -07:00
Modules make -fmodules-codegen and -fmodules-debuginfo work also with PCHs 2020-07-09 15:22:26 +02:00
OpenMP [OpenMP] Add missing RUN lines for OpenMP 4.5 2020-07-22 01:08:06 -04:00
PCH accept 'clang++ -c a.pch -o a.o' to create PCH's object file 2020-07-22 10:21:23 +02:00
Parser [clang] Provide a more specific diagnostic for a misplaced lambda capture-default. 2020-07-18 20:35:16 +01:00
ParserSYCL
Preprocessor [Sema][AArch64] Add parsing support for arm_sve_vector_bits attribute 2020-07-17 10:06:54 +00:00
Profile Fix version of c-general.profdata.v5 test case 2020-06-10 16:20:20 +02:00
Refactor
Rewriter
Sema Fix issue in typo handling which could lead clang to hang 2020-07-20 11:42:11 -04:00
SemaCUDA recommit 4fc752b30b [CUDA][HIP] Always defer diagnostics for wrong-sided reference 2020-07-17 09:14:39 -04:00
SemaCXX [AST][RecoveryExpr] Preserve the invalid "undef_var" initializer. 2020-07-21 09:38:09 +02:00
SemaObjC [clang][NFC] Tests showing the problems with some uses of NamedDecl::getDeclName in diagnostics, SemaOverload.cpp+SemaStmt.cpp part 2020-07-18 20:44:06 +01:00
SemaObjCXX Clang crashed while checking for deletion of copy and move ctors 2020-07-07 14:40:37 -04:00
SemaOpenCL [AST][RecoveryExpr] Fix a crash on opencl C++. 2020-07-20 15:15:30 +02:00
SemaOpenCLCXX [OpenCL] Defer addr space deduction for dependent type. 2020-07-13 11:44:38 +01:00
SemaSYCL [SYCL][OpenMP] Implement thread-local storage restriction 2020-06-17 14:36:00 +03:00
SemaTemplate [AST][RecoveryExpr] Preserve the AST for invalid conditions. 2020-07-20 14:58:36 +02:00
TableGen
Templight
Tooling [clang] Rework how and when APValues are dumped 2020-07-06 22:03:08 +01:00
Unit
VFS
clang-rename
utils/update_cc_test_checks [Utils][Fix] remove unnecessary ; at the end 2020-07-19 20:48:28 +02:00
.clang-format [clang] Partially revert "Disable a few formatting options for test/" 2020-07-21 14:53:37 +01:00
CMakeLists.txt Revert "[CMake] Simplify CMake handling for zlib" 2020-07-14 19:56:10 -07:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [Coverage] Add comment to skipped regions 2020-07-21 17:34:18 -07:00
lit.site.cfg.py.in Revert "[CMake] Simplify CMake handling for zlib" 2020-07-14 19:56:10 -07:00
make_test_dirs.pl