Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b7c17ab
[MLIR][OpenMP] Add Initial Taskloop Clause Support (#174623)
Stylie777 Jan 9, 2026
a484de1
[X86] Add rewrite pattern for SSE41/AVX1 roundss/sd + blendps/pd (#17…
stomfaig Jan 9, 2026
6c942d8
[AArch64] Fix using NEON copies in streaming-mode-enable regions. (#1…
aemerson Jan 9, 2026
ddb706b
[mlir][OpenMP] Don't allocate task context structure if not needed (#…
tblah Jan 9, 2026
484ee42
[libc++] Introduce the notion of a minimum header version (#166074)
philnik777 Jan 9, 2026
66fa2f9
[libc++] Refactor variant benchmarks (#174743)
philnik777 Jan 9, 2026
b6bfb19
[libc++] Fix {deque,vector}::append_range assuming too much about the…
philnik777 Jan 9, 2026
a5cab90
[libc++][NFC] Refactor _LIBCPP_OVERRIDABLE_FUNCTION to be a normal at…
philnik777 Jan 9, 2026
e91447f
Fix lld crash using --fix-cortex-a53-843419 (#170495)
tarcisiofischer Jan 9, 2026
ee3bc3d
[libc++][NFC] Simplify the implementation of __mul_overflowed (#174956)
philnik777 Jan 9, 2026
5ae7bff
[llvm-exegesis] Fix intermittent failure in setReg_init_check.s (#175…
c-rhodes Jan 9, 2026
7289e06
[X86][InstCombine] Generalize SSE/AVX fp MAX/MIN intrinsics to maxnum…
neil-phan Jan 9, 2026
804aa88
[MLIR][OpenMP] Support cancel taskgroup inside of taskloop (#174815)
tblah Jan 9, 2026
781677e
[PPC] Disable some ORC-powerpc64le-linux tests. (#175100)
mandlebug Jan 9, 2026
b28eeb2
[CodeGen] Generalise Hexagon flags for memop inline thresholds (#172829)
stuij Jan 9, 2026
30c88f7
[X86] Rename commute-clmul.ll -> commute-pclmul.ll (#175157)
RKSimon Jan 9, 2026
6395afa
[flang] Fix homonymous interface and procedure warning (#171696)
luporl Jan 9, 2026
6cdcce5
[MLIR][NVVM] Fix crash on invalid optimization level in NVVMTargetAtt…
Men-cotton Jan 9, 2026
687eb2c
[AllocToken] Fix attribute mismatch in AllocTokenPass (#174959)
ayumiohno Jan 9, 2026
8a922e8
[flang-rt][build] Disable build-time warning of '-Wshift-count-negati…
zjlcd Jan 9, 2026
75fefa3
[MLIR][Quant] Add DialectInlinerInterface to QuantDialect (#172509)
jorickert Jan 9, 2026
4772815
[NFC][clang] Fix a typo in Typebase.h (#175163)
YexuanXiao Jan 9, 2026
82353b5
[CodeGen][NFC] Improve readability of getLocalLiveOutMIDef (#175074)
mgudim Jan 9, 2026
7eae17e
[clang] Fix string literal parsing on some attributes (#171017)
s-barannikov Jan 9, 2026
6a5c894
[mlir][Analysis][NFC] Improve `RegionBranchOpInterface` API usage (#1…
matthias-springer Jan 9, 2026
7f5dbbc
[Utils][update_mc_test_checks] Handle double quotes in asm source (#1…
jayfoad Jan 9, 2026
6b0f475
[AMDGPU] Regenerate all MC checks after #164424 (#175156)
jayfoad Jan 9, 2026
e82399d
[flang][OpenMP] Prevent `omp.map.info` ops with user-defined mappers …
ergawy Jan 9, 2026
ecc8a95
[CommandLine] Use DenseMap instead of StringMap (NFC) (#174988)
nikic Jan 9, 2026
ded109c
[clang][CodeGen] Fix ConstantInt::get for i1 in EmitScalarPrePostIncD…
bjope Jan 9, 2026
ed004cf
Revert "[VPlan] Only use isAddressSCEVForCost in legacy getAddressAcc…
zmodem Jan 9, 2026
d66b9de
[X86] Add baseline test coverage for #169995 (#175175)
RKSimon Jan 9, 2026
fb47a25
[lldb-dap] add timeout to spawn_and_wait test utility (#174461)
charles-zablit Jan 9, 2026
6bfa042
[flang][mlir] Add checks and test for linear clause on omp.wsloop and…
NimishMishra Jan 9, 2026
8f58ce2
Fix Bazel build for 75fefa3 (#175179)
WillFroom Jan 9, 2026
5c43243
[SPIR-V] Initial support for SPIR-V in `gpuintrin.h` (#174910)
jhuber6 Jan 9, 2026
6f5c214
[TableGen] Remove deprecated !getop and !setop (#175155)
jayfoad Jan 9, 2026
89c8a25
[libc++] Make optional::iterator experimental (#173470)
philnik777 Jan 9, 2026
3c51ed9
[clang][bytecode] Fix initializing array elems from string (#175170)
tbaederr Jan 9, 2026
ff94a19
[clang][bytecode] Fix APValues for arrays in dynamic allocations (#17…
tbaederr Jan 9, 2026
475f022
[AMDGPU] Add support for GFX12 expert scheduling mode 2 (#170319)
jayfoad Jan 9, 2026
77b8b33
[LLD][COFF] Prefetch inputs early-on to improve link times (#169224)
aganea Jan 9, 2026
0d6f651
[X86] Add baseline clmul intrinsic test coverage (#175185)
RKSimon Jan 9, 2026
a095db2
[CodeGen] Introduce MI flag for Live Range split instructions (#117543)
cdevadas Jan 9, 2026
e486a26
[AMDGPU] Add liverange split instructions into BB Prolog (#117544)
cdevadas Jan 9, 2026
edab192
[AMDGPU] Remove unneeded redirects from MC tests. NFC. (#175186)
jayfoad Jan 9, 2026
c722ef4
[OpenMP] Remove testing LTO variant on CPU targets (#175187)
jhuber6 Jan 9, 2026
4996e3b
[ConstantFolding] Allow truncation when folding wasm.dot
nikic Jan 9, 2026
8aebfcd
[CIR][NFC] Generate ABI lowering patterns with TableGen (#175021)
Lancern Jan 9, 2026
9e1a185
[InstCombine] Fold intrinsics over multi-use selects when the intrins…
sivakusayan Jan 9, 2026
327d6e1
[RISCV][llvm] Support frame index in zilsd optimizer (#174073)
4vtomat Jan 9, 2026
ec7ab6f
[mlir][tosa] Add min/max_shape ops (#175146)
Philip742 Jan 9, 2026
8f6e731
merge main into amd-staging
ronlieb Jan 9, 2026
2e8ecf6
fix 2 flang lit tests
ronlieb Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions clang/include/clang/AST/TypeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
Last = PtrdiffT
};

class PresefinedSugarTypeBitfields {
class PredefinedSugarTypeBitfields {
friend class PredefinedSugarType;

LLVM_PREFERRED_TYPE(TypeBitfields)
Expand Down Expand Up @@ -2332,7 +2332,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
TemplateSpecializationTypeBitfields TemplateSpecializationTypeBits;
PackExpansionTypeBitfields PackExpansionTypeBits;
CountAttributedTypeBitfields CountAttributedTypeBits;
PresefinedSugarTypeBitfields PredefinedSugarTypeBits;
PredefinedSugarTypeBitfields PredefinedSugarTypeBits;
};

private:
Expand Down
10 changes: 10 additions & 0 deletions clang/include/clang/CIR/Dialect/IR/CIROps.td
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class LLVMLoweringInfo {

class CIR_Op<string mnemonic, list<Trait> traits = []> :
Op<CIR_Dialect, mnemonic, traits>, LLVMLoweringInfo {
// Should we generate an ABI lowering pattern for this op?
bit hasCXXABILowering = false;
// Should we generate an LLVM lowering pattern for this op?
bit hasLLVMLowering = true;
// Is the LLVM lowering pattern for this operation recursive?
Expand Down Expand Up @@ -451,6 +453,7 @@ def CIR_ConstantOp : CIR_Op<"const", [

let hasFolder = 1;

let hasCXXABILowering = true;
let isLLVMLoweringRecursive = true;
}

Expand Down Expand Up @@ -571,6 +574,8 @@ def CIR_AllocaOp : CIR_Op<"alloca", [
`]`
($annotations^)? attr-dict
}];

let hasCXXABILowering = true;
}

//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -2251,6 +2256,8 @@ def CIR_GlobalOp : CIR_Op<"global", [

let hasVerifier = 1;

let hasCXXABILowering = true;

let isLLVMLoweringRecursive = true;
let extraLLVMLoweringPatternDecl = [{
mlir::LogicalResult matchAndRewriteRegionInitializedGlobal(
Expand Down Expand Up @@ -3009,6 +3016,8 @@ def CIR_FuncOp : CIR_Op<"func", [
let hasCustomAssemblyFormat = 1;
let hasVerifier = 1;

let hasCXXABILowering = true;

let extraLLVMLoweringPatternDecl = [{
static mlir::StringRef getLinkageAttrNameString() { return "linkage"; }

Expand Down Expand Up @@ -3785,6 +3794,7 @@ def CIR_GetRuntimeMemberOp : CIR_Op<"get_runtime_member"> {

let hasVerifier = 1;

let hasCXXABILowering = true;
let hasLLVMLowering = false;
}

Expand Down
12 changes: 8 additions & 4 deletions clang/include/clang/Parse/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2117,10 +2117,14 @@ class Parser : public CodeCompletionHandler {

ExprResult ParseUnevaluatedStringInAttribute(const IdentifierInfo &AttrName);

bool
ParseAttributeArgumentList(const clang::IdentifierInfo &AttrName,
SmallVectorImpl<Expr *> &Exprs,
ParsedAttributeArgumentsProperties ArgsProperties);
/// Parses a comma-delimited list of arguments of an attribute \p AttrName,
/// filling \p Exprs. \p ArgsProperties specifies which of the arguments
/// should be parsed as unevaluated string literals. \p Arg is the number
/// of arguments parsed before calling / this function (the index of the
/// argument to be parsed next).
bool ParseAttributeArgumentList(
const IdentifierInfo &AttrName, SmallVectorImpl<Expr *> &Exprs,
ParsedAttributeArgumentsProperties ArgsProperties, unsigned Arg);

/// Parses syntax-generic attribute arguments for attributes which are
/// known to the implementation, and adds them to the given ParsedAttributes
Expand Down
27 changes: 21 additions & 6 deletions clang/lib/AST/ByteCode/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3685,34 +3685,42 @@ bool Compiler<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
QualType InitType = Init->getType();
size_t StaticInitElems = 0;
const Expr *DynamicInit = nullptr;
OptPrimType ElemT;

if (const ConstantArrayType *CAT =
Ctx.getASTContext().getAsConstantArrayType(InitType)) {
StaticInitElems = CAT->getZExtSize();
// Initialize the first S element from the initializer.
if (!this->visitInitializer(Init))
return false;

if (const auto *ILE = dyn_cast<InitListExpr>(Init);
ILE && ILE->hasArrayFiller())
DynamicInit = ILE->getArrayFiller();
if (const auto *ILE = dyn_cast<InitListExpr>(Init)) {
if (ILE->hasArrayFiller())
DynamicInit = ILE->getArrayFiller();
else if (isa<StringLiteral>(ILE->getInit(0)))
ElemT = classifyPrim(CAT->getElementType());
}
}

// The initializer initializes a certain number of elements, S.
// However, the complete number of elements, N, might be larger than that.
// In this case, we need to get an initializer for the remaining elements.
// There are to cases:
// There are three cases:
// 1) For the form 'new Struct[n];', the initializer is a
// CXXConstructExpr and its type is an IncompleteArrayType.
// 2) For the form 'new Struct[n]{1,2,3}', the initializer is an
// InitListExpr and the initializer for the remaining elements
// is the array filler.
// 3) StringLiterals don't have an array filler, so we need to zero
// the remaining elements.

if (DynamicInit || InitType->isIncompleteArrayType()) {
if (DynamicInit || ElemT || InitType->isIncompleteArrayType()) {
const Function *CtorFunc = nullptr;
if (const auto *CE = dyn_cast<CXXConstructExpr>(Init)) {
CtorFunc = getFunction(CE->getConstructor());
if (!CtorFunc)
return false;
} else if (!DynamicInit)
} else if (!DynamicInit && !ElemT)
DynamicInit = Init;

LabelTy EndLabel = this->getLabel();
Expand Down Expand Up @@ -3778,6 +3786,13 @@ bool Compiler<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
if (!this->emitPopPtr(E))
return false;
}
} else if (ElemT) {
if (!this->visitZeroInitializer(
*ElemT, InitType->getAsArrayTypeUnsafe()->getElementType(),
Init))
return false;
if (!this->emitStorePop(*ElemT, E))
return false;
} else {
assert(CtorFunc);
if (!this->emitCall(CtorFunc, 0, E))
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/AST/ByteCode/Pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ APValue Pointer::toAPValue(const ASTContext &ASTCtx) const {
unsigned Index = Ptr.getIndex();
QualType ElemType = Desc->getElemQualType();
Offset += (Index * ASTCtx.getTypeSizeInChars(ElemType));
if (Ptr.getArray().getType()->isArrayType())
if (Ptr.getArray().getFieldDesc()->IsArray)
Path.push_back(APValue::LValuePathEntry::ArrayIndex(Index));
Ptr = Ptr.getArray();
} else {
Expand Down Expand Up @@ -278,7 +278,7 @@ APValue Pointer::toAPValue(const ASTContext &ASTCtx) const {
} else {
Offset += (Index * ASTCtx.getTypeSizeInChars(ElemType));
}
if (Ptr.getArray().getType()->isArrayType())
if (Ptr.getArray().getFieldDesc()->IsArray)
Path.push_back(APValue::LValuePathEntry::ArrayIndex(Index));
Ptr = Ptr.getArray();
} else {
Expand Down
45 changes: 6 additions & 39 deletions clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,9 @@ namespace mlir {

namespace {

template <typename Op>
class CIROpCXXABILoweringPattern : public mlir::OpConversionPattern<Op> {
protected:
mlir::DataLayout *dataLayout;
cir::LowerModule *lowerModule;

public:
CIROpCXXABILoweringPattern(mlir::MLIRContext *context,
const mlir::TypeConverter &typeConverter,
mlir::DataLayout &dataLayout,
cir::LowerModule &lowerModule)
: mlir::OpConversionPattern<Op>(typeConverter, context),
dataLayout(&dataLayout), lowerModule(&lowerModule) {}
};

// TODO(cir): Use TableGen to generate these patterns.
#define CIR_CXXABI_LOWERING_PATTERN(name, operation) \
struct name : CIROpCXXABILoweringPattern<operation> { \
using CIROpCXXABILoweringPattern<operation>::CIROpCXXABILoweringPattern; \
\
mlir::LogicalResult \
matchAndRewrite(operation op, OpAdaptor adaptor, \
mlir::ConversionPatternRewriter &rewriter) const override; \
}

CIR_CXXABI_LOWERING_PATTERN(CIRAllocaOpABILowering, cir::AllocaOp);
CIR_CXXABI_LOWERING_PATTERN(CIRConstantOpABILowering, cir::ConstantOp);
CIR_CXXABI_LOWERING_PATTERN(CIRFuncOpABILowering, cir::FuncOp);
CIR_CXXABI_LOWERING_PATTERN(CIRGetRuntimeMemberOpABILowering,
cir::GetRuntimeMemberOp);
CIR_CXXABI_LOWERING_PATTERN(CIRGlobalOpABILowering, cir::GlobalOp);
#undef CIR_CXXABI_LOWERING_PATTERN
#define GET_ABI_LOWERING_PATTERNS
#include "clang/CIR/Dialect/IR/CIRLowering.inc"
#undef GET_ABI_LOWERING_PATTERNS

struct CXXABILoweringPass
: public impl::CXXABILoweringBase<CXXABILoweringPass> {
Expand Down Expand Up @@ -346,13 +317,9 @@ void CXXABILoweringPass::runOnOperation() {
patterns.add<CIRGenericCXXABILoweringPattern>(patterns.getContext(),
typeConverter);
patterns.add<
// clang-format off
CIRAllocaOpABILowering,
CIRConstantOpABILowering,
CIRFuncOpABILowering,
CIRGetRuntimeMemberOpABILowering,
CIRGlobalOpABILowering
// clang-format on
#define GET_ABI_LOWERING_PATTERNS_LIST
#include "clang/CIR/Dialect/IR/CIRLowering.inc"
#undef GET_ABI_LOWERING_PATTERNS_LIST
>(patterns.getContext(), typeConverter, dataLayout, *lowerModule);

mlir::ConversionTarget target(*ctx);
Expand Down
5 changes: 4 additions & 1 deletion clang/lib/CodeGen/CGExprScalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3337,7 +3337,10 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
value = EmitOverflowCheckedBinOp(createBinOpInfoFromIncDec(
E, value, isInc, E->getFPFeaturesInEffect(CGF.getLangOpts())));
} else {
llvm::Value *amt = llvm::ConstantInt::get(value->getType(), amount, true);
// Treat positive amount as unsigned to support inc of i1 (needed for
// unsigned _BitInt(1)).
llvm::Value *amt =
llvm::ConstantInt::get(value->getType(), amount, !isInc);
value = Builder.CreateAdd(value, amt, isInc ? "inc" : "dec");
}

Expand Down
1 change: 1 addition & 0 deletions clang/lib/Headers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ set(gpu_files
gpuintrin.h
nvptxintrin.h
amdgpuintrin.h
spirvintrin.h
)

set(windows_only_files
Expand Down
2 changes: 2 additions & 0 deletions clang/lib/Headers/gpuintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ _Pragma("omp end declare target");
#include <nvptxintrin.h>
#elif defined(__AMDGPU__)
#include <amdgpuintrin.h>
#elif defined(__SPIRV__)
#include <spirvintrin.h>
#elif !defined(_OPENMP)
#error "This header is only meant to be used on GPU architectures."
#endif
Expand Down
Loading
Loading