llvm-project/clang/docs
Paul Kirth bac6cd5bf8 [misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its
original checking methodology only using MD_prof branch_weights
metadata.

New checks rely on 2 invariants:

1) For frontend instrumentation, MD_prof branch_weights will always be
   populated before llvm.expect intrinsics are lowered.

2) for IR and sample profiling, llvm.expect intrinsics will always be
   lowered before branch_weights are populated from the IR profiles.

These invariants allow the checking to assume how the existing branch
weights are populated depending on the profiling method used, and emit
the correct diagnostics. If these invariants are ever invalidated, the
MisExpect related checks would need to be updated, potentially by
re-introducing MD_misexpect metadata, and ensuring it always will be
transformed the same way as branch_weights in other optimization passes.

Frontend based profiling is now enabled without using LLVM Args, by
introducing a new CodeGen option, and checking if the -Wmisexpect flag
has been passed on the command line.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D115907
2022-04-19 21:23:48 +00:00
..
CommandGuide Treat `std::move`, `forward`, etc. as builtins. 2022-04-17 13:26:16 -07:00
DataFlowAnalysisIntroImages [clang][docs][dataflow] Added an introduction to dataflow analysis 2021-12-06 12:16:35 +01:00
analyzer [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file 2022-03-22 10:28:42 +08:00
tools [analyzer] Expose Taint.h to plugins 2022-04-19 16:55:01 +02:00
APINotes.rst
AddressSanitizer.rst [asan] Add support for disable_sanitizer_instrumentation attribute 2022-02-18 09:51:54 +01:00
AutomaticReferenceCounting.rst [clang] Document objc_unsafeClaimAutoreleasedReturnValue. 2022-02-08 14:30:39 -08:00
Block-ABI-Apple.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
BlockLanguageSpec.rst
CMakeLists.txt
ClangCheck.rst
ClangCommandLineReference.rst [Clang][Docs] Update information on the new driver now that it's default 2022-04-18 15:05:09 -04:00
ClangFormat.rst [clang-format] [doc] Add script to automatically update help output in ClangFormat.rst. 2022-03-23 13:17:50 +01:00
ClangFormatStyleOptions.rst [clang-format][docs] Fix incorrect 'clang-format 11' option markers 2022-04-06 18:38:30 -07:00
ClangFormattedStatus.rst [clang-format] NFC update LLVM overall clang-formatted status 2022-03-06 20:03:27 +00:00
ClangLinkerWrapper.rst [Clang][Docs] Add documention for new OpenMP offloading driver 2022-02-03 13:09:49 -05:00
ClangNvlinkWrapper.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
ClangOffloadBundler.rst [clang][NFC] Fix Typo 2022-01-28 11:55:46 -08:00
ClangOffloadWrapper.rst [Doc] Fix wrong indentation 2022-01-19 11:15:31 +00:00
ClangPlugins.rst [docs] Add note about interaction between clang plugins and -clear-ast-before-backend 2022-02-28 12:53:09 -08:00
ClangStaticAnalyzer.rst
ClangTools.rst [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
ClangTransformerTutorial.rst Add a clang-transformer tutorial 2021-11-17 13:40:46 +00:00
ConstantInterpreter.rst
ControlFlowIntegrity.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
ControlFlowIntegrityDesign.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
CrossCompilation.rst
DataFlowAnalysisIntro.md [analyzer][NFC] Merge similar conditional paths 2022-03-07 22:05:27 +05:30
DataFlowSanitizer.rst Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS 2022-02-10 15:05:23 -05:00
DataFlowSanitizerDesign.rst [clang] Fix typos in documentation (NFC) 2021-08-21 12:17:58 -07:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst
FAQ.rst
HLSLSupport.rst [Clang] [Docs] Add HLSLSupport page 2022-04-08 12:17:45 -05:00
HardwareAssistedAddressSanitizerDesign.rst [HWASan] Mention x86_64 aliasing mode in design doc. 2021-03-25 14:22:20 -07:00
HowToSetupToolingForLLVM.rst [tooling] Explain how to create a compilation database on Windows [NFC] 2022-03-04 13:06:08 -07:00
InternalsManual.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
IntroductionToTheClangAST.rst [clang] Fix typos in documentation (NFC) 2021-08-21 12:17:58 -07:00
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [docs] [clang] Small documentation change for compilation databases 2022-01-22 17:30:34 -08:00
LTOVisibility.rst
LanguageExtensions.rst [Clang] Implement __builtin_source_location. 2022-03-28 18:29:02 -04:00
LeakSanitizer.rst [lsan][docs] Clarify supported platforms 2021-04-21 10:27:55 -07:00
LibASTImporter.rst
LibASTMatchers.rst
LibASTMatchersReference.html [ASTMatchers] Expand isInline matcher to VarDecl 2022-02-23 08:34:00 +00:00
LibASTMatchersTutorial.rst [docs] Fix linking issues in LibASTMatchers tutorial 2021-07-05 12:11:25 +03:00
LibFormat.rst [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
LibTooling.rst [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
MSVCCompatibility.rst
MatrixTypes.rst [Matrix] Add missing newline to appease sphinx. 2021-03-12 09:33:36 +00:00
MemorySanitizer.rst [msan] Add link to the lifetime definition 2022-03-29 14:42:36 -07:00
MisExpect.rst [misexpect] Re-implement MisExpect Diagnostics 2022-04-19 21:23:48 +00:00
Modules.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
ObjectiveCLiterals.rst
OffloadingDesign.rst [Clang][Docs] Update information on the new driver now that it's default 2022-04-18 15:05:09 -04:00
OpenCLSupport.rst [Docs][OpenCL] Update OpenCL 3.0 status in docs. 2022-02-16 12:32:20 +00:00
OpenMPSupport.rst [Clang][Docs] Update information on the new driver now that it's default 2022-04-18 15:05:09 -04:00
PCHInternals.rst
PCHLayout.graffle
PCHLayout.png
RAVFrontendAction.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
README.txt
RefactoringEngine.rst
ReleaseNotes.rst [misexpect] Re-implement MisExpect Diagnostics 2022-04-19 21:23:48 +00:00
SYCLSupport.rst [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL 2021-05-18 10:27:35 +03:00
SafeStack.rst
SanitizerCoverage.rst [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
SanitizerSpecialCaseList.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
SanitizerStats.rst
ShadowCallStack.rst
SourceBasedCodeCoverage.rst Coverage: Document how to collect a profile without a filesystem 2021-04-22 11:29:39 -07:00
ThinLTO.rst [clang] Fix sentence in the usage section of ThinLTO docs. 2021-09-30 07:26:19 +05:30
ThreadSafetyAnalysis.rst [clang][docs] Inclusive language: remove use of sanity check in option description 2021-11-30 15:07:43 -05:00
ThreadSanitizer.rst [tsan] Add support for disable_sanitizer_instrumentation attribute 2021-08-23 12:38:33 +02:00
Toolchain.rst Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS 2022-02-10 15:05:23 -05:00
Tooling.rst
UndefinedBehaviorSanitizer.rst Improve UBSan documentation 2021-08-02 15:10:21 -07:00
UsersManual.rst [docs] Remove outdated -fexperimental-new-pass-manager for profile data remapping support 2022-04-11 13:49:06 -07:00
conf.py [docs] Remove hard-coded version numbers from sphinx configs 2022-02-01 23:14:12 -08:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] Inclusive Language: change master to main for .chm files 2021-11-08 08:23:04 -06:00
index.rst [misexpect] Re-implement MisExpect Diagnostics 2022-04-19 21:23:48 +00:00
make.bat

README.txt

See llvm/docs/README.txt