Skip to content

Commit e8a1c2c

Browse files
authored
Merge branch 'llvm:main' into main
2 parents 4729ce1 + f37bee1 commit e8a1c2c

File tree

25 files changed

+351
-937
lines changed

25 files changed

+351
-937
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4335,16 +4335,6 @@ def HLSLLoopHint: StmtAttr {
43354335
let Documentation = [HLSLLoopHintDocs, HLSLUnrollHintDocs];
43364336
}
43374337

4338-
def HLSLControlFlowHint: StmtAttr {
4339-
/// [branch]
4340-
/// [flatten]
4341-
let Spellings = [Microsoft<"branch">, Microsoft<"flatten">];
4342-
let Subjects = SubjectList<[IfStmt],
4343-
ErrorDiag, "'if' statements">;
4344-
let LangOpts = [HLSL];
4345-
let Documentation = [InternalOnly];
4346-
}
4347-
43484338
def CapturedRecord : InheritableAttr {
43494339
// This attribute has no spellings as it is only ever created implicitly.
43504340
let Spellings = [];

clang/lib/CodeGen/CGStmt.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,6 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) {
757757
bool noinline = false;
758758
bool alwaysinline = false;
759759
bool noconvergent = false;
760-
HLSLControlFlowHintAttr::Spelling flattenOrBranch =
761-
HLSLControlFlowHintAttr::SpellingNotCalculated;
762760
const CallExpr *musttail = nullptr;
763761

764762
for (const auto *A : S.getAttrs()) {
@@ -790,17 +788,13 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) {
790788
Builder.CreateAssumption(AssumptionVal);
791789
}
792790
} break;
793-
case attr::HLSLControlFlowHint: {
794-
flattenOrBranch = cast<HLSLControlFlowHintAttr>(A)->getSemanticSpelling();
795-
} break;
796791
}
797792
}
798793
SaveAndRestore save_nomerge(InNoMergeAttributedStmt, nomerge);
799794
SaveAndRestore save_noinline(InNoInlineAttributedStmt, noinline);
800795
SaveAndRestore save_alwaysinline(InAlwaysInlineAttributedStmt, alwaysinline);
801796
SaveAndRestore save_noconvergent(InNoConvergentAttributedStmt, noconvergent);
802797
SaveAndRestore save_musttail(MustTailCall, musttail);
803-
SaveAndRestore save_flattenOrBranch(HLSLControlFlowAttr, flattenOrBranch);
804798
EmitStmt(S.getSubStmt(), S.getAttrs());
805799
}
806800

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "llvm/IR/DataLayout.h"
4141
#include "llvm/IR/Dominators.h"
4242
#include "llvm/IR/FPEnv.h"
43-
#include "llvm/IR/Instruction.h"
4443
#include "llvm/IR/IntrinsicInst.h"
4544
#include "llvm/IR/Intrinsics.h"
4645
#include "llvm/IR/MDBuilder.h"
@@ -2084,29 +2083,7 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
20842083
Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
20852084
}
20862085

2087-
llvm::Instruction *BrInst = Builder.CreateCondBr(CondV, TrueBlock, FalseBlock,
2088-
Weights, Unpredictable);
2089-
switch (HLSLControlFlowAttr) {
2090-
case HLSLControlFlowHintAttr::Microsoft_branch:
2091-
case HLSLControlFlowHintAttr::Microsoft_flatten: {
2092-
llvm::MDBuilder MDHelper(CGM.getLLVMContext());
2093-
2094-
llvm::ConstantInt *BranchHintConstant =
2095-
HLSLControlFlowAttr ==
2096-
HLSLControlFlowHintAttr::Spelling::Microsoft_branch
2097-
? llvm::ConstantInt::get(CGM.Int32Ty, 1)
2098-
: llvm::ConstantInt::get(CGM.Int32Ty, 2);
2099-
2100-
SmallVector<llvm::Metadata *, 2> Vals(
2101-
{MDHelper.createString("hlsl.controlflow.hint"),
2102-
MDHelper.createConstant(BranchHintConstant)});
2103-
BrInst->setMetadata("hlsl.controlflow.hint",
2104-
llvm::MDNode::get(CGM.getLLVMContext(), Vals));
2105-
break;
2106-
}
2107-
case HLSLControlFlowHintAttr::SpellingNotCalculated:
2108-
break;
2109-
}
2086+
Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
21102087
}
21112088

21122089
/// ErrorUnsupported - Print out an error that codegen doesn't support the

clang/lib/CodeGen/CodeGenFunction.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,6 @@ class CodeGenFunction : public CodeGenTypeCache {
615615
/// True if the current statement has noconvergent attribute.
616616
bool InNoConvergentAttributedStmt = false;
617617

618-
/// HLSL Branch attribute.
619-
HLSLControlFlowHintAttr::Spelling HLSLControlFlowAttr =
620-
HLSLControlFlowHintAttr::SpellingNotCalculated;
621-
622618
// The CallExpr within the current statement that the musttail attribute
623619
// applies to. nullptr if there is no 'musttail' on the current statement.
624620
const CallExpr *MustTailCall = nullptr;

clang/lib/Sema/SemaStmtAttr.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -619,12 +619,6 @@ static Attr *handleHLSLLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A,
619619
return ::new (S.Context) HLSLLoopHintAttr(S.Context, A, UnrollFactor);
620620
}
621621

622-
static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St, const ParsedAttr &A,
623-
SourceRange Range) {
624-
625-
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
626-
}
627-
628622
static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A,
629623
SourceRange Range) {
630624
if (A.isInvalid() || A.getKind() == ParsedAttr::IgnoredAttribute)
@@ -661,8 +655,6 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A,
661655
return handleLoopHintAttr(S, St, A, Range);
662656
case ParsedAttr::AT_HLSLLoopHint:
663657
return handleHLSLLoopHintAttr(S, St, A, Range);
664-
case ParsedAttr::AT_HLSLControlFlowHint:
665-
return handleHLSLControlFlowHint(S, St, A, Range);
666658
case ParsedAttr::AT_OpenCLUnrollHint:
667659
return handleOpenCLUnrollHint(S, St, A, Range);
668660
case ParsedAttr::AT_Suppress:

clang/test/AST/HLSL/HLSLControlFlowHint.hlsl

Lines changed: 0 additions & 43 deletions
This file was deleted.

clang/test/CodeGenHLSL/HLSLControlFlowHint.hlsl

Lines changed: 0 additions & 48 deletions
This file was deleted.

lldb/tools/lldb-dap/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
2+
list(APPEND extra_libs lldbHost)
3+
endif ()
4+
15
if (HAVE_LIBPTHREAD)
26
list(APPEND extra_libs pthread)
37
endif ()
@@ -22,23 +26,22 @@ add_lldb_tool(lldb-dap
2226
lldb-dap.cpp
2327
Breakpoint.cpp
2428
BreakpointBase.cpp
25-
DAP.cpp
2629
ExceptionBreakpoint.cpp
2730
FifoFiles.cpp
2831
FunctionBreakpoint.cpp
29-
InstructionBreakpoint.cpp
3032
IOStream.cpp
3133
JSONUtils.cpp
3234
LLDBUtils.cpp
3335
OutputRedirector.cpp
3436
ProgressEvent.cpp
3537
RunInTerminal.cpp
3638
SourceBreakpoint.cpp
39+
DAP.cpp
3740
Watchpoint.cpp
41+
InstructionBreakpoint.cpp
3842

3943
LINK_LIBS
4044
liblldb
41-
lldbHost
4245
${extra_libs}
4346

4447
LINK_COMPONENTS

0 commit comments

Comments
 (0)