llvm-project/clang/docs/index.rst
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

114 lines
2.0 KiB
ReStructuredText

.. Clang documentation master file, created by
sphinx-quickstart on Sun Dec 9 20:01:55 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. title:: Welcome to Clang's documentation!
.. toctree::
:maxdepth: 1
ReleaseNotes
Using Clang as a Compiler
=========================
.. toctree::
:maxdepth: 1
UsersManual
Toolchain
LanguageExtensions
ClangCommandLineReference
AttributeReference
DiagnosticsReference
CrossCompilation
ClangStaticAnalyzer
ThreadSafetyAnalysis
DataFlowAnalysisIntro
AddressSanitizer
ThreadSanitizer
MemorySanitizer
UndefinedBehaviorSanitizer
DataFlowSanitizer
LeakSanitizer
SanitizerCoverage
SanitizerStats
SanitizerSpecialCaseList
ControlFlowIntegrity
LTOVisibility
SafeStack
ShadowCallStack
SourceBasedCodeCoverage
Modules
MSVCCompatibility
MisExpect
OpenCLSupport
OpenMPSupport
SYCLSupport
HLSLSupport
ThinLTO
APINotes
CommandGuide/index
FAQ
Using Clang as a Library
========================
.. toctree::
:maxdepth: 1
Tooling
ExternalClangExamples
IntroductionToTheClangAST
LibTooling
LibFormat
ClangPlugins
RAVFrontendAction
LibASTMatchersTutorial
LibASTMatchers
ClangTransformerTutorial
LibASTImporter
HowToSetupToolingForLLVM
JSONCompilationDatabase
RefactoringEngine
Using Clang Tools
=================
.. toctree::
:maxdepth: 1
ClangTools
ClangCheck
ClangFormat
ClangFormatStyleOptions
ClangFormattedStatus
ClangLinkerWrapper
ClangNvlinkWrapper
ClangOffloadBundler
ClangOffloadWrapper
Design Documents
================
.. toctree::
:maxdepth: 1
InternalsManual
DriverInternals
OffloadingDesign
PCHInternals
ItaniumMangleAbiTags
HardwareAssistedAddressSanitizerDesign.rst
ConstantInterpreter
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`