clang-format
This commit is contained in:
Родитель
8f9c5017d0
Коммит
3e25309846
|
@ -293,7 +293,6 @@ const unsigned kSampleCmpOffsetArgIndex = 5;
|
|||
const unsigned kSampleCmpClampArgIndex = 6;
|
||||
const unsigned kSampleCmpStatusArgIndex = 7;
|
||||
|
||||
|
||||
// SampleCmpBias.
|
||||
const unsigned kSampleCmpBCmpValArgIndex = 4;
|
||||
const unsigned kSampleCmpBBiasArgIndex = 5;
|
||||
|
|
|
@ -258,7 +258,7 @@ void initializeLowerStaticGlobalIntoAllocaPass(PassRegistry&);
|
|||
void initializeDynamicIndexingVectorToArrayPass(PassRegistry&);
|
||||
void initializeMultiDimArrayToOneDimArrayPass(PassRegistry&);
|
||||
void initializeResourceToHandlePass(PassRegistry&);
|
||||
void initializeLowerWaveMatTypePass(PassRegistry&);
|
||||
void initializeLowerWaveMatTypePass(PassRegistry &);
|
||||
void initializeSROA_SSAUp_HLSLPass(PassRegistry&);
|
||||
void initializeHoistConstantArrayPass(PassRegistry&);
|
||||
void initializeDxilLoopUnrollPass(PassRegistry&);
|
||||
|
|
|
@ -185,7 +185,7 @@ void initializeResourceToHandlePass(PassRegistry&);
|
|||
// Flatten resource into handle.
|
||||
//
|
||||
ModulePass *createLowerWaveMatTypePass();
|
||||
void initializeLowerWaveMatTypePass(PassRegistry&);
|
||||
void initializeLowerWaveMatTypePass(PassRegistry &);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Hoist a local array initialized with constant values to a global array with
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace hlsl {
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#include "dxc/DXIL/DxilMetadataHelper.h" // HLSL Change - combine dxil metadata.
|
||||
#include "dxc/DXIL/DxilUtil.h" // HLSL Change - special handling of convergent marker
|
||||
#include "dxc/DXIL/DxilInstructions.h" // HLSL Change - DxilInst_OutputComplete usage
|
||||
#include "dxc/DXIL/DxilOperations.h" // HLSL Change - Get HLSL Opcodes
|
||||
#include "dxc/DXIL/DxilMetadataHelper.h" // HLSL Change - combine dxil metadata.
|
||||
#include "dxc/DXIL/DxilOperations.h" // HLSL Change - Get HLSL Opcodes
|
||||
#include "dxc/DXIL/DxilUtil.h" // HLSL Change - special handling of convergent marker
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -336,9 +336,9 @@ bool llvm::isInstructionTriviallyDead(Instruction *I,
|
|||
return C->isNullValue() || isa<UndefValue>(C);
|
||||
|
||||
// HLSL Change - Verify that function has no side effects
|
||||
if (hlsl::dxilutil::FunctionHasNoSideEffects(I))
|
||||
if (hlsl::dxilutil::FunctionHasNoSideEffects(I))
|
||||
return true;
|
||||
|
||||
|
||||
// HLSL Change End
|
||||
|
||||
return false;
|
||||
|
|
|
@ -26,57 +26,58 @@ namespace clang {
|
|||
// Import the diagnostic enums themselves.
|
||||
namespace diag {
|
||||
// Start position for diagnostics.
|
||||
enum {
|
||||
DIAG_START_COMMON = 0,
|
||||
DIAG_START_DRIVER = DIAG_START_COMMON + 300,
|
||||
DIAG_START_FRONTEND = DIAG_START_DRIVER + 100,
|
||||
DIAG_START_SERIALIZATION = DIAG_START_FRONTEND + 100,
|
||||
DIAG_START_LEX = DIAG_START_SERIALIZATION + 120,
|
||||
DIAG_START_PARSE = DIAG_START_LEX + 300,
|
||||
DIAG_START_AST = DIAG_START_PARSE + 500,
|
||||
DIAG_START_COMMENT = DIAG_START_AST + 110,
|
||||
DIAG_START_SEMA = DIAG_START_COMMENT + 100,
|
||||
// HLSL Change: SEMA group length increased from 3000.
|
||||
DIAG_START_ANALYSIS = DIAG_START_SEMA + 3100,
|
||||
DIAG_UPPER_LIMIT = DIAG_START_ANALYSIS + 100
|
||||
};
|
||||
enum {
|
||||
DIAG_START_COMMON = 0,
|
||||
DIAG_START_DRIVER = DIAG_START_COMMON + 300,
|
||||
DIAG_START_FRONTEND = DIAG_START_DRIVER + 100,
|
||||
DIAG_START_SERIALIZATION = DIAG_START_FRONTEND + 100,
|
||||
DIAG_START_LEX = DIAG_START_SERIALIZATION + 120,
|
||||
DIAG_START_PARSE = DIAG_START_LEX + 300,
|
||||
DIAG_START_AST = DIAG_START_PARSE + 500,
|
||||
DIAG_START_COMMENT = DIAG_START_AST + 110,
|
||||
DIAG_START_SEMA = DIAG_START_COMMENT + 100,
|
||||
// HLSL Change: SEMA group length increased from 3000.
|
||||
DIAG_START_ANALYSIS = DIAG_START_SEMA + 3100,
|
||||
DIAG_UPPER_LIMIT = DIAG_START_ANALYSIS + 100
|
||||
};
|
||||
|
||||
class CustomDiagInfo;
|
||||
class CustomDiagInfo;
|
||||
|
||||
/// \brief All of the diagnostics that can be emitted by the frontend.
|
||||
typedef unsigned kind;
|
||||
/// \brief All of the diagnostics that can be emitted by the frontend.
|
||||
typedef unsigned kind;
|
||||
|
||||
// Get typedefs for common diagnostics.
|
||||
enum {
|
||||
#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
|
||||
SFINAE,CATEGORY,NOWERROR,SHOWINSYSHEADER) ENUM,
|
||||
// Get typedefs for common diagnostics.
|
||||
enum {
|
||||
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, CATEGORY, \
|
||||
NOWERROR, SHOWINSYSHEADER) \
|
||||
ENUM,
|
||||
#define COMMONSTART
|
||||
#include "clang/Basic/DiagnosticCommonKinds.inc"
|
||||
NUM_BUILTIN_COMMON_DIAGNOSTICS
|
||||
NUM_BUILTIN_COMMON_DIAGNOSTICS
|
||||
#undef DIAG
|
||||
};
|
||||
};
|
||||
|
||||
/// Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs
|
||||
/// to either Ignore (nothing), Remark (emit a remark), Warning
|
||||
/// (emit a warning) or Error (emit as an error). It allows clients to
|
||||
/// map ERRORs to Error or Fatal (stop emitting diagnostics after this one).
|
||||
enum class Severity {
|
||||
// NOTE: 0 means "uncomputed".
|
||||
Ignored = 1, ///< Do not present this diagnostic, ignore it.
|
||||
Remark = 2, ///< Present this diagnostic as a remark.
|
||||
Warning = 3, ///< Present this diagnostic as a warning.
|
||||
Error = 4, ///< Present this diagnostic as an error.
|
||||
Fatal = 5 ///< Present this diagnostic as a fatal error.
|
||||
};
|
||||
/// Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs
|
||||
/// to either Ignore (nothing), Remark (emit a remark), Warning
|
||||
/// (emit a warning) or Error (emit as an error). It allows clients to
|
||||
/// map ERRORs to Error or Fatal (stop emitting diagnostics after this one).
|
||||
enum class Severity {
|
||||
// NOTE: 0 means "uncomputed".
|
||||
Ignored = 1, ///< Do not present this diagnostic, ignore it.
|
||||
Remark = 2, ///< Present this diagnostic as a remark.
|
||||
Warning = 3, ///< Present this diagnostic as a warning.
|
||||
Error = 4, ///< Present this diagnostic as an error.
|
||||
Fatal = 5 ///< Present this diagnostic as a fatal error.
|
||||
};
|
||||
|
||||
/// Flavors of diagnostics we can emit. Used to filter for a particular
|
||||
/// kind of diagnostic (for instance, for -W/-R flags).
|
||||
enum class Flavor {
|
||||
WarningOrError, ///< A diagnostic that indicates a problem or potential
|
||||
///< problem. Can be made fatal by -Werror.
|
||||
Remark ///< A diagnostic that indicates normal progress through
|
||||
///< compilation.
|
||||
};
|
||||
/// Flavors of diagnostics we can emit. Used to filter for a particular
|
||||
/// kind of diagnostic (for instance, for -W/-R flags).
|
||||
enum class Flavor {
|
||||
WarningOrError, ///< A diagnostic that indicates a problem or potential
|
||||
///< problem. Can be made fatal by -Werror.
|
||||
Remark ///< A diagnostic that indicates normal progress through
|
||||
///< compilation.
|
||||
};
|
||||
}
|
||||
|
||||
class DiagnosticMapping {
|
||||
|
|
|
@ -1078,9 +1078,8 @@ bool CGDebugInfo::TryCollectHLSLRecordElements(const RecordType *Ty,
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (hlsl::IsHLSLResourceType(QualTy) || hlsl::IsHLSLNodeType(QualTy) ||
|
||||
hlsl::IsHLSLStreamOutputType(QualTy)) {
|
||||
} else if (hlsl::IsHLSLResourceType(QualTy) || hlsl::IsHLSLNodeType(QualTy) ||
|
||||
hlsl::IsHLSLStreamOutputType(QualTy)) {
|
||||
// Should appear as having no members rather than exposing our internal handles.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -833,31 +833,31 @@ void Parser::ParseGNUAttributeArgs(IdentifierInfo *AttrName,
|
|||
case AttributeList::AT_HLSLUnroll:
|
||||
case AttributeList::AT_HLSLWaveSize:
|
||||
case AttributeList::AT_NoInline:
|
||||
// The following are not accepted in [attribute(param)] syntax:
|
||||
//case AttributeList::AT_HLSLCentroid:
|
||||
//case AttributeList::AT_HLSLGroupShared:
|
||||
//case AttributeList::AT_HLSLIn:
|
||||
//case AttributeList::AT_HLSLInOut:
|
||||
//case AttributeList::AT_HLSLLinear:
|
||||
//case AttributeList::AT_HLSLCenter:
|
||||
//case AttributeList::AT_HLSLNoInterpolation:
|
||||
//case AttributeList::AT_HLSLNoPerspective:
|
||||
//case AttributeList::AT_HLSLOut:
|
||||
//case AttributeList::AT_HLSLPrecise:
|
||||
//case AttributeList::AT_HLSLSample:
|
||||
//case AttributeList::AT_HLSLSemantic:
|
||||
//case AttributeList::AT_HLSLShared:
|
||||
//case AttributeList::AT_HLSLUniform:
|
||||
//case AttributeList::AT_HLSLPoint:
|
||||
//case AttributeList::AT_HLSLLine:
|
||||
//case AttributeList::AT_HLSLLineAdj:
|
||||
//case AttributeList::AT_HLSLTriangle:
|
||||
//case AttributeList::AT_HLSLTriangleAdj:
|
||||
//case AttributeList::AT_HLSLIndices:
|
||||
//case AttributeList::AT_HLSLVertices:
|
||||
//case AttributeList::AT_HLSLPrimitives:
|
||||
//case AttributeList::AT_HLSLPayload:
|
||||
//case AttributeList::AT_HLSLAllowSparseNodes:
|
||||
// The following are not accepted in [attribute(param)] syntax:
|
||||
// case AttributeList::AT_HLSLCentroid:
|
||||
// case AttributeList::AT_HLSLGroupShared:
|
||||
// case AttributeList::AT_HLSLIn:
|
||||
// case AttributeList::AT_HLSLInOut:
|
||||
// case AttributeList::AT_HLSLLinear:
|
||||
// case AttributeList::AT_HLSLCenter:
|
||||
// case AttributeList::AT_HLSLNoInterpolation:
|
||||
// case AttributeList::AT_HLSLNoPerspective:
|
||||
// case AttributeList::AT_HLSLOut:
|
||||
// case AttributeList::AT_HLSLPrecise:
|
||||
// case AttributeList::AT_HLSLSample:
|
||||
// case AttributeList::AT_HLSLSemantic:
|
||||
// case AttributeList::AT_HLSLShared:
|
||||
// case AttributeList::AT_HLSLUniform:
|
||||
// case AttributeList::AT_HLSLPoint:
|
||||
// case AttributeList::AT_HLSLLine:
|
||||
// case AttributeList::AT_HLSLLineAdj:
|
||||
// case AttributeList::AT_HLSLTriangle:
|
||||
// case AttributeList::AT_HLSLTriangleAdj:
|
||||
// case AttributeList::AT_HLSLIndices:
|
||||
// case AttributeList::AT_HLSLVertices:
|
||||
// case AttributeList::AT_HLSLPrimitives:
|
||||
// case AttributeList::AT_HLSLPayload:
|
||||
// case AttributeList::AT_HLSLAllowSparseNodes:
|
||||
goto GenericAttributeParse;
|
||||
default:
|
||||
Diag(AttrNameLoc, diag::warn_unknown_attribute_ignored) << AttrName;
|
||||
|
|
|
@ -395,8 +395,9 @@ enum ArBasicKind {
|
|||
#define IS_BPROP_ENUM(_Props) (((_Props)&BPROP_ENUM) != 0)
|
||||
|
||||
#define IS_BPROP_WAVE_MATRIX_INPUT(_Props) \
|
||||
(((_Props)&BPROP_WAVE_MATRIX_INPUT) != 0)
|
||||
#define IS_BPROP_WAVE_MATRIX_ACC(_Props) (((_Props)&BPROP_WAVE_MATRIX_ACC) != 0)
|
||||
(((_Props) & BPROP_WAVE_MATRIX_INPUT) != 0)
|
||||
#define IS_BPROP_WAVE_MATRIX_ACC(_Props) \
|
||||
(((_Props) & BPROP_WAVE_MATRIX_ACC) != 0)
|
||||
|
||||
const UINT g_uBasicKindProps[] = {
|
||||
BPROP_PRIMITIVE | BPROP_BOOLEAN | BPROP_INTEGER | BPROP_NUMERIC |
|
||||
|
|
Загрузка…
Ссылка в новой задаче