-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[DirectX] Add Range Overlap validation #152229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c95ce68
af6aa53
29eb893
ed4c553
28fb609
403972d
0f0435d
e841a98
ae6d67a
41f32bd
6f3d019
971ad57
db73d71
3b04c2d
1ddffc3
db0008e
b4e5fb4
4a655a5
cc94561
98f48d2
eb334b8
06c0da4
d58606f
74980c8
d376abf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//===-- DXILABI.cpp - ABI Sensitive Values for DXIL -----------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file contains definitions of various constants and enums that are | ||
// required to remain stable as per the DXIL format's requirements. | ||
// | ||
// Documentation for DXIL can be found in | ||
// https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a file header. |
||
#include "llvm/Support/DXILABI.h" | ||
#include "llvm/Support/ScopedPrinter.h" | ||
using namespace llvm; | ||
|
||
static const EnumEntry<dxil::ResourceClass> ResourceClassNames[] = { | ||
{"SRV", llvm::dxil::ResourceClass::SRV}, | ||
{"UAV", llvm::dxil::ResourceClass::UAV}, | ||
{"CBV", llvm::dxil::ResourceClass::CBuffer}, | ||
{"Sampler", llvm::dxil::ResourceClass::Sampler}, | ||
}; | ||
|
||
ArrayRef<EnumEntry<llvm::dxil::ResourceClass>> dxil::getResourceClasses() { | ||
return ArrayRef(ResourceClassNames); | ||
} | ||
|
||
StringRef dxil::getResourceClassName(dxil::ResourceClass RC) { | ||
return enumToStringRef(RC, getResourceClasses()); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
#include "DXILOpLowering.h" | ||
#include "DXILConstants.h" | ||
#include "DXILOpBuilder.h" | ||
#include "DXILRootSignature.h" | ||
#include "DXILShaderFlags.h" | ||
#include "DirectX.h" | ||
#include "llvm/ADT/SmallVector.h" | ||
|
@@ -918,6 +919,7 @@ PreservedAnalyses DXILOpLowering::run(Module &M, ModuleAnalysisManager &MAM) { | |
PA.preserve<DXILResourceAnalysis>(); | ||
PA.preserve<DXILMetadataAnalysis>(); | ||
PA.preserve<ShaderFlagsAnalysis>(); | ||
PA.preserve<RootSignatureAnalysis>(); | ||
return PA; | ||
} | ||
|
||
|
@@ -945,6 +947,7 @@ class DXILOpLoweringLegacy : public ModulePass { | |
AU.addPreserved<DXILResourceWrapperPass>(); | ||
AU.addPreserved<DXILMetadataAnalysisWrapperPass>(); | ||
AU.addPreserved<ShaderFlagsAnalysisWrapper>(); | ||
AU.addPreserved<RootSignatureAnalysisWrapper>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll need to preserve the root signature analysis in the new-PM version of the pass as well (that is, in |
||
} | ||
}; | ||
char DXILOpLoweringLegacy::ID = 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR makes the clang build 2% slower, probably by adding these includes. ScopedPrinter.h is very heavy, and DXILABI.h is included everywhere in clang. Please refactor things to remove these includes.
See https://llvm-compile-time-tracker.com/compare_clang.php?from=ca9ddd54b77020322a94a8032276b46cc1046522&to=d56fa965243bcdc115b8f262ce79cf2547500c6d&stat=instructions%3Au&sortBy=interestingness.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed an issue #153827, to keep track of this. Will fix it as soon as possible.