Skip to content

Commit 8952e47

Browse files
committed
Merge "merge main into amd-staging" into amd-staging
2 parents d5b5ddd + 4d9ec6f commit 8952e47

26 files changed

+956
-182
lines changed

compiler-rt/lib/memprof/memprof_mapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extern uptr kHighMemEnd; // Initialized in __memprof_init.
5555
// computed by summing up all individual 1 byte counters. This can incur an
5656
// accuracy penalty.
5757

58-
#define HISTOGRAM_GRANULARITY 8U
58+
#define HISTOGRAM_GRANULARITY 8ULL
5959

6060
#define HISTOGRAM_MAX_COUNTER 255U
6161

compiler-rt/lib/nsan/nsan_interceptors.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121

2222
#include <wchar.h>
2323

24-
#if SANITIZER_LINUX
25-
extern "C" int mallopt(int param, int value);
26-
#endif
27-
2824
using namespace __sanitizer;
2925
using __nsan::nsan_init_is_running;
3026
using __nsan::nsan_initialized;
@@ -209,12 +205,6 @@ void __nsan::InitializeInterceptors() {
209205
static bool initialized = false;
210206
CHECK(!initialized);
211207

212-
// Instruct libc malloc to consume less memory.
213-
#if SANITIZER_LINUX
214-
mallopt(1, 0); // M_MXFAST
215-
mallopt(-3, 32 * 1024); // M_MMAP_THRESHOLD
216-
#endif
217-
218208
InitializeMallocInterceptors();
219209

220210
INTERCEPT_FUNCTION(memset);

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,25 +2386,25 @@ void SignalContext::DumpAllRegisters(void *context) {
23862386
# elif SANITIZER_FREEBSD
23872387
# if defined(__x86_64__)
23882388
Report("Register values:\n");
2389-
Printf("rax = 0x%016llx ", ucontext->uc_mcontext.mc_rax);
2390-
Printf("rbx = 0x%016llx ", ucontext->uc_mcontext.mc_rbx);
2391-
Printf("rcx = 0x%016llx ", ucontext->uc_mcontext.mc_rcx);
2392-
Printf("rdx = 0x%016llx ", ucontext->uc_mcontext.mc_rdx);
2389+
Printf("rax = 0x%016lx ", ucontext->uc_mcontext.mc_rax);
2390+
Printf("rbx = 0x%016lx ", ucontext->uc_mcontext.mc_rbx);
2391+
Printf("rcx = 0x%016lx ", ucontext->uc_mcontext.mc_rcx);
2392+
Printf("rdx = 0x%016lx ", ucontext->uc_mcontext.mc_rdx);
23932393
Printf("\n");
2394-
Printf("rdi = 0x%016llx ", ucontext->uc_mcontext.mc_rdi);
2395-
Printf("rsi = 0x%016llx ", ucontext->uc_mcontext.mc_rsi);
2396-
Printf("rbp = 0x%016llx ", ucontext->uc_mcontext.mc_rbp);
2397-
Printf("rsp = 0x%016llx ", ucontext->uc_mcontext.mc_rsp);
2394+
Printf("rdi = 0x%016lx ", ucontext->uc_mcontext.mc_rdi);
2395+
Printf("rsi = 0x%016lx ", ucontext->uc_mcontext.mc_rsi);
2396+
Printf("rbp = 0x%016lx ", ucontext->uc_mcontext.mc_rbp);
2397+
Printf("rsp = 0x%016lx ", ucontext->uc_mcontext.mc_rsp);
23982398
Printf("\n");
2399-
Printf(" r8 = 0x%016llx ", ucontext->uc_mcontext.mc_r8);
2400-
Printf(" r9 = 0x%016llx ", ucontext->uc_mcontext.mc_r9);
2401-
Printf("r10 = 0x%016llx ", ucontext->uc_mcontext.mc_r10);
2402-
Printf("r11 = 0x%016llx ", ucontext->uc_mcontext.mc_r11);
2399+
Printf(" r8 = 0x%016lx ", ucontext->uc_mcontext.mc_r8);
2400+
Printf(" r9 = 0x%016lx ", ucontext->uc_mcontext.mc_r9);
2401+
Printf("r10 = 0x%016lx ", ucontext->uc_mcontext.mc_r10);
2402+
Printf("r11 = 0x%016lx ", ucontext->uc_mcontext.mc_r11);
24032403
Printf("\n");
2404-
Printf("r12 = 0x%016llx ", ucontext->uc_mcontext.mc_r12);
2405-
Printf("r13 = 0x%016llx ", ucontext->uc_mcontext.mc_r13);
2406-
Printf("r14 = 0x%016llx ", ucontext->uc_mcontext.mc_r14);
2407-
Printf("r15 = 0x%016llx ", ucontext->uc_mcontext.mc_r15);
2404+
Printf("r12 = 0x%016lx ", ucontext->uc_mcontext.mc_r12);
2405+
Printf("r13 = 0x%016lx ", ucontext->uc_mcontext.mc_r13);
2406+
Printf("r14 = 0x%016lx ", ucontext->uc_mcontext.mc_r14);
2407+
Printf("r15 = 0x%016lx ", ucontext->uc_mcontext.mc_r15);
24082408
Printf("\n");
24092409
# elif defined(__i386__)
24102410
Report("Register values:\n");

llvm/include/llvm/Analysis/DXILResource.h

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ class ResourceInfo {
106106

107107
MSInfo MultiSample;
108108

109+
public:
110+
ResourceInfo(dxil::ResourceClass RC, dxil::ResourceKind Kind, Value *Symbol,
111+
StringRef Name)
112+
: Symbol(Symbol), Name(Name), RC(RC), Kind(Kind) {}
113+
109114
// Conditions to check before accessing union members.
110115
bool isUAV() const;
111116
bool isCBuffer() const;
@@ -115,11 +120,45 @@ class ResourceInfo {
115120
bool isFeedback() const;
116121
bool isMultiSample() const;
117122

118-
ResourceInfo(dxil::ResourceClass RC, dxil::ResourceKind Kind, Value *Symbol,
119-
StringRef Name)
120-
: Symbol(Symbol), Name(Name), RC(RC), Kind(Kind) {}
123+
void bind(uint32_t UniqueID, uint32_t Space, uint32_t LowerBound,
124+
uint32_t Size) {
125+
Binding.UniqueID = UniqueID;
126+
Binding.Space = Space;
127+
Binding.LowerBound = LowerBound;
128+
Binding.Size = Size;
129+
}
130+
void setUAV(bool GloballyCoherent, bool HasCounter, bool IsROV) {
131+
assert(isUAV() && "Not a UAV");
132+
UAVFlags.GloballyCoherent = GloballyCoherent;
133+
UAVFlags.HasCounter = HasCounter;
134+
UAVFlags.IsROV = IsROV;
135+
}
136+
void setCBuffer(uint32_t Size) {
137+
assert(isCBuffer() && "Not a CBuffer");
138+
CBufferSize = Size;
139+
}
140+
void setSampler(dxil::SamplerType Ty) { SamplerTy = Ty; }
141+
void setStruct(uint32_t Stride, Align Alignment) {
142+
assert(isStruct() && "Not a Struct");
143+
Struct.Stride = Stride;
144+
Struct.Alignment = Alignment;
145+
}
146+
void setTyped(dxil::ElementType ElementTy, uint32_t ElementCount) {
147+
assert(isTyped() && "Not Typed");
148+
Typed.ElementTy = ElementTy;
149+
Typed.ElementCount = ElementCount;
150+
}
151+
void setFeedback(dxil::SamplerFeedbackType Type) {
152+
assert(isFeedback() && "Not Feedback");
153+
Feedback.Type = Type;
154+
}
155+
void setMultiSample(uint32_t Count) {
156+
assert(isMultiSample() && "Not MultiSampled");
157+
MultiSample.Count = Count;
158+
}
159+
160+
bool operator==(const ResourceInfo &RHS) const;
121161

122-
public:
123162
static ResourceInfo SRV(Value *Symbol, StringRef Name,
124163
dxil::ElementType ElementTy, uint32_t ElementCount,
125164
dxil::ResourceKind Kind);
@@ -164,16 +203,6 @@ class ResourceInfo {
164203
static ResourceInfo Sampler(Value *Symbol, StringRef Name,
165204
dxil::SamplerType SamplerTy);
166205

167-
void bind(uint32_t UniqueID, uint32_t Space, uint32_t LowerBound,
168-
uint32_t Size) {
169-
Binding.UniqueID = UniqueID;
170-
Binding.Space = Space;
171-
Binding.LowerBound = LowerBound;
172-
Binding.Size = Size;
173-
}
174-
175-
bool operator==(const ResourceInfo &RHS) const;
176-
177206
MDTuple *getAsMetadata(LLVMContext &Ctx) const;
178207

179208
ResourceBinding getBinding() const { return Binding; }

llvm/include/llvm/MC/MCFragment.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@ class MCFragment {
6969
FragmentType Kind;
7070

7171
protected:
72+
/// Used by subclasses for better packing.
73+
///
74+
/// MCEncodedFragment
7275
bool HasInstructions : 1;
76+
bool AlignToBundleEnd : 1;
77+
/// MCDataFragment
7378
bool LinkerRelaxable : 1;
79+
/// MCRelaxableFragment: x86-specific
80+
bool AllowAutoPadding : 1;
7481

7582
MCFragment(FragmentType Kind, bool HasInstructions);
7683

@@ -115,9 +122,6 @@ class MCDummyFragment : public MCFragment {
115122
/// data.
116123
///
117124
class MCEncodedFragment : public MCFragment {
118-
/// Should this fragment be aligned to the end of a bundle?
119-
bool AlignToBundleEnd = false;
120-
121125
uint8_t BundlePadding = 0;
122126

123127
protected:
@@ -228,11 +232,8 @@ class MCDataFragment : public MCEncodedFragmentWithFixups<32, 4> {
228232
/// relaxed during the assembler layout and relaxation stage.
229233
///
230234
class MCRelaxableFragment : public MCEncodedFragmentWithFixups<8, 1> {
231-
232235
/// The instruction this is a fragment for.
233236
MCInst Inst;
234-
/// Can we auto pad the instruction?
235-
bool AllowAutoPadding = false;
236237

237238
public:
238239
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI)

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,10 @@ class NoOpLoopAnalysis : public AnalysisInfoMixin<NoOpLoopAnalysis> {
944944
return Result();
945945
}
946946
};
947+
948+
/// Common option used by multiple tools to print pipeline passes
949+
extern cl::opt<bool> PrintPipelinePasses;
950+
947951
}
948952

949953
#endif

0 commit comments

Comments
 (0)