LLVM: lib/Transforms/Scalar/AnnotationRemarks.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

20

21using namespace llvm;

23

24#define DEBUG_TYPE "annotation-remarks"

25#define REMARK_PASS DEBUG_TYPE

26

30

33 continue;

34

35 Function &F = *I->getParent()->getParent();

39 }

40}

41

44 return;

45

46

48

50

53 if (I.hasMetadata(LLVMContext::MD_annotation))

54 continue;

55 DebugLoc2Annotated[I.getDebugLoc().getAsMDNode()].push_back(&I);

56

58 I.getMetadata(LLVMContext::MD_annotation)->operands()) {

63 ->getString();

64 Mapping[AnnotationStr]++;

65 }

66 }

67

68 for (const auto &KV : Mapping)

70 F.getSubprogram(), &F.front())

71 << "Annotated " << NV("count", KV.second) << " instructions with "

72 << NV("type", KV.first));

73

74

75

76 for (auto &KV : DebugLoc2Annotated) {

77

78 if (!KV.first)

79 continue;

80

82 }

83}

84

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

Expand Atomic instructions

static bool runImpl(Function &F, const TargetLowering &TLI, const LibcallLoweringInfo &Libcalls, AssumptionCache *AC)

This file implements a map that provides insertion order iteration.

PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)

Get the result of an analysis pass for a given IR unit.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

A parsed version of the target data layout string in and methods for querying it.

Tracking metadata reference owned by Metadata.

This class implements a map that also provides access to all stored values in a deterministic order.

A set of analyses that are preserved following a run of a transformation pass.

static PreservedAnalyses all()

Construct a special preserved set that preserves all passes.

StringRef - Represent a constant reference to a string, i.e.

Analysis pass providing the TargetLibraryInfo.

Provides information about what library functions are available for the current target.

Add a small namespace to avoid name clashes with the classes used in the streaming interface.

DiagnosticInfoOptimizationBase::Argument NV

This is an optimization pass for GlobalISel generic memory operations.

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

DWARFExpression::Operation Op

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.