llvm-project/llvm/lib
Florian Hahn aadb635e04 [SCCP] Remove forcedconstant, go to overdefined instead
This patch removes forcedconstant to simplify things for the
move to ValueLattice, which includes constant ranges, but no
forced constants.

This patch removes forcedconstant and changes ResolvedUndefsIn
to mark instructions with unknown operands as overdefined. This
means we do not do simplifications based on undef directly in SCCP
any longer, but this seems to hardly come up in practice (see stats
below), presumably because InstCombine & others take care
of most of the relevant folds already.

It is still beneficial to keep ResolvedUndefIn, as it allows us delaying
going to overdefined until we propagated all known information.

I also built MultiSource, SPEC2000 and SPEC2006 and compared
sccp.IPNumInstRemoved and sccp.NumInstRemoved. It looks like the impact
is quite low:

Tests: 244
Same hash: 238 (filtered out)
Remaining: 6
Metric: sccp.IPNumInstRemoved

Program                                        base     patch    diff
 test-suite...arks/VersaBench/dbms/dbms.test     4.00    3.00  -25.0%
 test-suite...TimberWolfMC/timberwolfmc.test    38.00   34.00  -10.5%
 test-suite...006/453.povray/453.povray.test   158.00  155.00  -1.9%
 test-suite.../CINT2000/176.gcc/176.gcc.test   668.00  668.00   0.0%
 test-suite.../CINT2006/403.gcc/403.gcc.test   1209.00 1209.00  0.0%
 test-suite...arks/mafft/pairlocalalign.test    76.00   76.00   0.0%

Tests: 244
Same hash: 238 (filtered out)
Remaining: 6
Metric: sccp.NumInstRemoved

Program                                        base    patch     diff
 test-suite...arks/mafft/pairlocalalign.test   185.00  175.00  -5.4%
 test-suite.../CINT2006/403.gcc/403.gcc.test   2059.00 2056.00 -0.1%
 test-suite.../CINT2000/176.gcc/176.gcc.test   2358.00 2357.00 -0.0%
 test-suite...006/453.povray/453.povray.test   317.00  317.00   0.0%
 test-suite...TimberWolfMC/timberwolfmc.test    12.00   12.00   0.0%

Reviewers: davide, efriedma, mssimpso

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D61314
2020-02-11 15:24:15 +00:00
..
Analysis [LoopCacheAnalysis]: Add support for negative stride 2020-02-10 13:22:35 -05:00
AsmParser Revert "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-05 19:27:32 -08:00
BinaryFormat DWARFDebugLine.cpp: Format unknown line number standard opcodes 2020-01-15 10:45:50 -05:00
Bitcode Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Bitstream Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
CodeGen [DebugInfo][NFC] Fixup the UserValue methods to use FragmentInfo 2020-02-11 10:20:24 +00:00
DWARFLinker [dsymutil] Delete unneeded parameter Triple from DWARFLinker 2020-02-07 11:33:27 -08:00
DebugInfo [Debuginfo][NFC] Rename error handling functions using the same pattern. 2020-02-11 14:50:53 +03:00
Demangle Revert "Add some missing includes to MicrosoftDemangle.cpp (PR44217)" 2019-12-04 11:10:07 -08:00
ExecutionEngine Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Frontend Revert "[OpenMP] Fix unused variable" 2020-02-10 16:34:59 +01:00
FuzzMutate Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Fuzzer
IR Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
IRReader [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LTO Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
LineEditor Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Linker IR Linking: Support merging Warning+Max module metadata flags 2020-02-07 16:29:58 -08:00
MC [AsmPrinter] Print FP constant in hexadecimal form instead 2020-02-07 16:00:55 +00:00
MCA Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Object Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
ObjectYAML Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Option Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Passes [VectorCombine] new IR transform pass for partial vector ops 2020-02-09 10:04:41 -05:00
ProfileData Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Remarks Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Support [Clang][Driver] After default -fintegrated-cc1, make llvm::report_fatal_error() generate preprocessed source + reproducer.sh again. 2020-02-11 10:17:30 -05:00
TableGen [llvm][TableGen] Define FieldInit::isConcrete overload 2020-02-10 18:04:58 -08:00
Target [ARM][MVE] Tail-Predication: recognise (again) active lanes IR pattern 2020-02-11 15:18:18 +00:00
Testing
TextAPI Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
ToolDrivers [llvm] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:16:46 -08:00
Transforms [SCCP] Remove forcedconstant, go to overdefined instead 2020-02-11 15:24:15 +00:00
WindowsManifest Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name"" 2019-12-03 09:27:14 -08:00
XRay Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
CMakeLists.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00
LLVMBuild.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00