Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e5d587

Browse filesBrowse files
committed
Revert #140650 and #140505
This reverts commit 90daed3 and 4cfbe55. These changes exposed cyclic dependencies when LLVM is configured with modules `-DLLVM_ENABLE_MODULES=ON`.
1 parent 12c62eb commit 6e5d587
Copy full SHA for 6e5d587

File tree

Expand file treeCollapse file tree

4 files changed

+22
-47
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+22
-47
lines changed

‎llvm/include/llvm/Analysis/MemoryProfileInfo.h

Copy file name to clipboardExpand all lines: llvm/include/llvm/Analysis/MemoryProfileInfo.h
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
#ifndef LLVM_ANALYSIS_MEMORYPROFILEINFO_H
1414
#define LLVM_ANALYSIS_MEMORYPROFILEINFO_H
1515

16-
#include "llvm/IR/InstrTypes.h"
1716
#include "llvm/IR/Metadata.h"
18-
#include "llvm/ProfileData/MemProfCommon.h"
17+
#include "llvm/IR/ModuleSummaryIndex.h"
1918
#include <map>
2019

2120
namespace llvm {

‎llvm/include/llvm/IR/ModuleSummaryIndex.h

Copy file name to clipboardExpand all lines: llvm/include/llvm/IR/ModuleSummaryIndex.h
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "llvm/IR/ConstantRange.h"
2828
#include "llvm/IR/GlobalValue.h"
2929
#include "llvm/IR/Module.h"
30-
#include "llvm/ProfileData/MemProfCommon.h"
3130
#include "llvm/Support/Allocator.h"
3231
#include "llvm/Support/Compiler.h"
3332
#include "llvm/Support/InterleavedRange.h"
@@ -307,6 +306,14 @@ template <> struct DenseMapInfo<ValueInfo> {
307306
static unsigned getHashValue(ValueInfo I) { return hash_value(I.getRef()); }
308307
};
309308

309+
// For optional hinted size reporting, holds a pair of the full stack id
310+
// (pre-trimming, from the full context in the profile), and the associated
311+
// total profiled size.
312+
struct ContextTotalSize {
313+
uint64_t FullStackId;
314+
uint64_t TotalSize;
315+
};
316+
310317
/// Summary of memprof callsite metadata.
311318
struct CallsiteInfo {
312319
// Actual callee function.
@@ -343,6 +350,19 @@ inline raw_ostream &operator<<(raw_ostream &OS, const CallsiteInfo &SNI) {
343350
return OS;
344351
}
345352

353+
// Allocation type assigned to an allocation reached by a given context.
354+
// More can be added, now this is cold, notcold and hot.
355+
// Values should be powers of two so that they can be ORed, in particular to
356+
// track allocations that have different behavior with different calling
357+
// contexts.
358+
enum class AllocationType : uint8_t {
359+
None = 0,
360+
NotCold = 1,
361+
Cold = 2,
362+
Hot = 4,
363+
All = 7 // This should always be set to the OR of all values.
364+
};
365+
346366
/// Summary of a single MIB in a memprof metadata on allocations.
347367
struct MIBInfo {
348368
// The allocation type for this profiled context.

‎llvm/include/llvm/ProfileData/MemProfCommon.h

Copy file name to clipboardExpand all lines: llvm/include/llvm/ProfileData/MemProfCommon.h
-43Lines changed: 0 additions & 43 deletions
This file was deleted.

‎llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

Copy file name to clipboardExpand all lines: llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include "llvm/Transforms/Utils/ModuleUtils.h"
4747
#include <map>
4848
#include <set>
49-
#include <unordered_set>
5049

5150
using namespace llvm;
5251
using namespace llvm::memprof;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.