Skip to content

Commit b969d46

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:94821ce45fe9 into origin/amd-gfx:6bc8f8a713b9
Local branch origin/amd-gfx 6bc8f8a Merged main:e8b52acca237 into origin/amd-gfx:636b44b5b57a Remote branch main 94821ce MCValue: Store SymA specifier at Specifier
2 parents 6bc8f8a + 94821ce commit b969d46

File tree

171 files changed

+2549
-1042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+2549
-1042
lines changed

.ci/monolithic-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ targets="${2}"
5353
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
5454

5555
echo "--- cmake"
56+
export PIP_BREAK_SYSTEM_PACKAGES=1
5657
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
5758
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
5859
pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt

.github/workflows/containers/github-action-ci-windows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RUN choco install -y handle
108108
109109
RUN pip3 install pywin32 buildbot-worker==2.8.4
110110
111-
ARG RUNNER_VERSION=2.322.0
111+
ARG RUNNER_VERSION=2.323.0
112112
ENV RUNNER_VERSION=$RUNNER_VERSION
113113
114114
RUN powershell -Command \

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ WORKDIR /home/gha
9595

9696
FROM ci-container as ci-container-agent
9797

98-
ENV GITHUB_RUNNER_VERSION=2.322.0
98+
ENV GITHUB_RUNNER_VERSION=2.323.0
9999

100100
RUN mkdir actions-runner && \
101101
cd actions-runner && \

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,20 @@ jobs:
197197
os: macos-15
198198
- config: apple-configuration
199199
os: macos-15
200+
# TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an
201+
# older system-provided libc++.dylib). Doing this properly would require building the test suite on a
202+
# recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an
203+
# older mac. We could do that by e.g. sharing artifacts between the two jobs.
204+
#
205+
# However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only
206+
# alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work
207+
# since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent
208+
# macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional
209+
# coverage.
200210
- config: apple-system
201-
os: macos-13
211+
os: macos-15
202212
- config: apple-system-hardened
203-
os: macos-13
213+
os: macos-15
204214
runs-on: ${{ matrix.os }}
205215
steps:
206216
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
121121
return cir::BoolAttr::get(getContext(), getBoolTy(), state);
122122
}
123123

124+
mlir::Value createNot(mlir::Value value) {
125+
return create<cir::UnaryOp>(value.getLoc(), value.getType(),
126+
cir::UnaryOpKind::Not, value);
127+
}
128+
124129
/// Create a do-while operation.
125130
cir::DoWhileOp createDoWhile(
126131
mlir::Location loc,

clang/lib/Basic/SourceManager.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@
2424
#include "llvm/ADT/StringRef.h"
2525
#include "llvm/ADT/StringSwitch.h"
2626
#include "llvm/Support/Allocator.h"
27-
#include "llvm/Support/AutoConvert.h"
2827
#include "llvm/Support/Capacity.h"
2928
#include "llvm/Support/Compiler.h"
3029
#include "llvm/Support/Endian.h"
3130
#include "llvm/Support/ErrorHandling.h"
32-
#include "llvm/Support/FileSystem.h"
33-
#include "llvm/Support/MathExtras.h"
3431
#include "llvm/Support/MemoryBuffer.h"
35-
#include "llvm/Support/Path.h"
3632
#include "llvm/Support/raw_ostream.h"
3733
#include <algorithm>
3834
#include <cassert>

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
488488
return emitUnaryOp(e, cir::UnaryOpKind::Not, op);
489489
}
490490

491+
mlir::Value VisitUnaryLNot(const UnaryOperator *e);
492+
491493
/// Emit a conversion from the specified type to the specified destination
492494
/// type, both of which are CIR scalar types.
493495
/// TODO: do we need ScalarConversionOpts here? Should be done in another
@@ -1315,7 +1317,7 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce) {
13151317
"fixed point casts");
13161318
return {};
13171319
}
1318-
cgf.getCIRGenModule().errorNYI(subExpr->getSourceRange(), "fp options");
1320+
assert(!cir::MissingFeatures::cgFPOptionsRAII());
13191321
return emitScalarConversion(Visit(subExpr), subExpr->getType(), destTy,
13201322
ce->getExprLoc());
13211323
}
@@ -1353,6 +1355,33 @@ mlir::Value CIRGenFunction::emitScalarConversion(mlir::Value src,
13531355
.emitScalarConversion(src, srcTy, dstTy, loc);
13541356
}
13551357

1358+
mlir::Value ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *e) {
1359+
// Perform vector logical not on comparison with zero vector.
1360+
if (e->getType()->isVectorType() &&
1361+
e->getType()->castAs<VectorType>()->getVectorKind() ==
1362+
VectorKind::Generic) {
1363+
assert(!cir::MissingFeatures::vectorType());
1364+
cgf.cgm.errorNYI(e->getSourceRange(), "vector logical not");
1365+
return {};
1366+
}
1367+
1368+
// Compare operand to zero.
1369+
mlir::Value boolVal = cgf.evaluateExprAsBool(e->getSubExpr());
1370+
1371+
// Invert value.
1372+
boolVal = builder.createNot(boolVal);
1373+
1374+
// ZExt result to the expr type.
1375+
mlir::Type dstTy = cgf.convertType(e->getType());
1376+
if (mlir::isa<cir::IntType>(dstTy))
1377+
return builder.createBoolToInt(boolVal, dstTy);
1378+
if (mlir::isa<cir::BoolType>(dstTy))
1379+
return boolVal;
1380+
1381+
cgf.cgm.errorNYI("destination type for logical-not unary operator is NYI");
1382+
return {};
1383+
}
1384+
13561385
/// Return the size or alignment of the type of argument of the sizeof
13571386
/// expression as an integer.
13581387
mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,14 @@ mlir::LogicalResult CIRToLLVMCastOpLowering::matchAndRewrite(
501501
assert(!MissingFeatures::cxxABI());
502502
assert(!MissingFeatures::dataMemberType());
503503
break;
504-
case cir::CastKind::ptr_to_bool:
505-
assert(!cir::MissingFeatures::opCmp());
504+
case cir::CastKind::ptr_to_bool: {
505+
mlir::Value llvmSrcVal = adaptor.getOperands().front();
506+
mlir::Value zeroPtr = rewriter.create<mlir::LLVM::ZeroOp>(
507+
castOp.getLoc(), llvmSrcVal.getType());
508+
rewriter.replaceOpWithNewOp<mlir::LLVM::ICmpOp>(
509+
castOp, mlir::LLVM::ICmpPredicate::ne, llvmSrcVal, zeroPtr);
506510
break;
511+
}
507512
case cir::CastKind::address_space: {
508513
mlir::Type dstTy = castOp.getType();
509514
mlir::Value llvmSrcVal = adaptor.getOperands().front();

clang/lib/CodeGen/CGObjCMac.cpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,6 @@ class ObjCCommonTypesHelper {
184184
/// SelectorPtrTy - LLVM type for selector handles (typeof(SEL))
185185
llvm::PointerType *SelectorPtrTy;
186186

187-
private:
188-
/// ProtocolPtrTy - LLVM type for external protocol handles
189-
/// (typeof(Protocol))
190-
llvm::Type *ExternalProtocolPtrTy;
191-
192-
public:
193-
llvm::Type *getExternalProtocolPtrTy() {
194-
if (!ExternalProtocolPtrTy) {
195-
// FIXME: It would be nice to unify this with the opaque type, so that the
196-
// IR comes out a bit cleaner.
197-
CodeGen::CodeGenTypes &Types = CGM.getTypes();
198-
ASTContext &Ctx = CGM.getContext();
199-
llvm::Type *T = Types.ConvertType(Ctx.getObjCProtoType());
200-
ExternalProtocolPtrTy = llvm::PointerType::getUnqual(T);
201-
}
202-
203-
return ExternalProtocolPtrTy;
204-
}
205-
206187
// SuperCTy - clang type for struct objc_super.
207188
QualType SuperCTy;
208189
// SuperPtrCTy - clang type for struct objc_super *.
@@ -5636,8 +5617,7 @@ CGObjCNonFragileABIMac::CGObjCNonFragileABIMac(CodeGen::CodeGenModule &cgm)
56365617
/* *** */
56375618

56385619
ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5639-
: VMContext(cgm.getLLVMContext()), CGM(cgm),
5640-
ExternalProtocolPtrTy(nullptr) {
5620+
: VMContext(cgm.getLLVMContext()), CGM(cgm) {
56415621
CodeGen::CodeGenTypes &Types = CGM.getTypes();
56425622
ASTContext &Ctx = CGM.getContext();
56435623
unsigned ProgramAS = CGM.getDataLayout().getProgramAddressSpace();

clang/lib/Format/Format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4010,7 +4010,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
40104010

40114011
switch (Style.Language) {
40124012
case FormatStyle::LK_C:
4013-
LangOpts.C17 = 1;
4013+
LangOpts.C11 = 1;
40144014
break;
40154015
case FormatStyle::LK_Cpp:
40164016
case FormatStyle::LK_ObjC:

0 commit comments

Comments
 (0)