1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests
Yevgeny Rouban 5ea08972f1 [NewPM] Disable PreservedCFGChecker and add regression unit tests
The design of the PreservedCFG Checker (landed with the commit
28012e00d80b9) has a fundamental flaw which makes it incorrect.
The checker is based on the PreservedAnalyses result returned
by functional passes: if CFGAnalyses is in the returned
PreservedAnalyses set, then the checker asserts that the CFG
snapshot saved before the pass is equal to the CFG snapshot
taken after the the pass. The problem is in passes that change
CFG and invalidate CFGAnalyses on their own. Such passes do not
return CFGanalyses in the returned PreservedAnalyses. So the
checker mistakenly expects CFG unchanged. As an example see the
class TestSimplifyCFGInvalidatingAnalysisPass in the new tests.

It is interesting that the bug was not found in LLVM. That is
because the CFG checker ran only if CFGAnalyses was checked
incorrectly:
  if (!PassPA.allAnalysesInSetPreserved<CFGAnalyses>())
    return;

but must be checked as follows:
  auto PAC = PA.getChecker<PreservedCFGCheckerAnalysis>();
  if (!(PAC.preserved() ||
        PAC.preservedSet<AllAnalysesOn<Function>>() ||
        PAC.preservedSet<CFGAnalyses>())
    return;

A fully redesigned checker will be sent as a separate follow-up
patch.

Reviewed By: Serguei Katkov, Jakub Kuderski

Differential Revision: https://reviews.llvm.org/D91324
2020-11-18 10:02:47 +07:00
..
ADT [STLExtras] Add append_range helper. 2020-11-05 16:20:02 -08:00
Analysis [CGSCC][Inliner] Handle new non-trivial edges in updateCGAndAnalysisManagerForPass 2020-11-11 13:43:49 -08:00
AsmParser
BinaryFormat
Bitcode
Bitstream
CodeGen [GlobalISel] Add convenience matchers for nots and all-ones constants 2020-11-13 13:54:08 -08:00
DebugInfo llvm-dwarfdump: Support verbose printing DW_OP_convert to print the CU local offset before the resolved absolute offset 2020-10-23 18:50:15 -07:00
Demangle
ExecutionEngine [ORC] Add dependence of OrcJIT on OrcTargetProcess. 2020-11-13 18:09:41 +11:00
FileCheck Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
Frontend [LLVMFronted][tests] Add basic OpenMP parsing tests. 2020-11-17 15:45:19 -06:00
FuzzMutate Revert "Revert "[NFC][llvm] Make the contructors of ElementCount private."" 2020-08-19 17:26:36 +00:00
InterfaceStub [llvm] Fix ODRViolations for VersionTuple YAML specializations NFC 2020-10-20 18:29:15 -07:00
IR [NewPM] Disable PreservedCFGChecker and add regression unit tests 2020-11-18 10:02:47 +07:00
LineEditor
Linker
MC [MC] Adjust StringTableBuilder for linked Mach-O binaries 2020-10-22 19:19:41 -07:00
MI
Object [llvm-readobj/libObject] - Allow dumping objects that has a broken SHT_SYMTAB_SHNDX section. 2020-11-03 11:30:28 +03:00
ObjectYAML Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
Option Reland [clang][cli] Port ObjCMTAction to new option parsing system 2020-11-13 13:42:54 +01:00
Passes
ProfileData [llvm] [unittests] Remove temporary files after they're not needed 2020-09-02 00:34:44 +03:00
Remarks
Support [YAMLIO] Correctly diagnose empty alias/anchor 2020-11-16 18:45:05 +00:00
TableGen [TableGen] [tests] Change integer ranges to use new '...' punctuation 2020-10-26 10:47:29 -04:00
Target [NFCI] Replace AArch64StackOffset by StackOffset. 2020-11-04 08:49:00 +00:00
TextAPI [TextAPI] clean up auto usages in tests, NFC 2020-09-21 08:39:40 -07:00
tools [llvm] [unittests] Remove temporary files after they're not needed 2020-09-02 00:34:44 +03:00
Transforms [VPlan] Add VPDef class. 2020-11-17 16:18:11 +00:00
XRay
CMakeLists.txt Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library 2020-09-01 14:59:28 +02:00
unittest.cfg.in