https://github.com/s-barannikov commented:
Apparently my English is really not that good, sorry :smile:
Please see the two inline suggestions
https://github.com/llvm/llvm-project/pull/132252
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
@@ -0,0 +1,107 @@
+//===-- CGBuiltin.h - Emit LLVM Code for builtins
-===//
+//
+// 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: Ap
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/130108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/132252
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===-- CGBuiltin.h - Emit LLVM Code for builtins
-===//
+//
+// 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: Ap
@@ -0,0 +1,102 @@
+//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++
-*-===//
s-barannikov wrote:
Copy&paste bug?
Note that per updated coding standard this line may be the same as line 7.
https://github.com/llvm/llvm-project/pull/13225
@@ -0,0 +1,105 @@
+//===-- CGBuiltin.h - Emit LLVM Code for builtins
-===//
+//
+// 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: Ap
@@ -0,0 +1,105 @@
+//===-- CGBuiltin.h - Emit LLVM Code for builtins
-===//
+//
+// 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: Ap
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/132252
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -61,6 +61,16 @@ add_clang_library(clangCodeGen
CGAtomic.cpp
CGBlocks.cpp
CGBuiltin.cpp
+ TargetBuiltins/AArch64.cpp
s-barannikov wrote:
(nit) Move these filenames down the list to keep it sorted?
https://github.com/llvm/llvm-project/pull/132252
@@ -0,0 +1,102 @@
+//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++
-*-===//
+//
+// 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:
@@ -0,0 +1,102 @@
+//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++
-*-===//
+//
+// 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:
@@ -0,0 +1,102 @@
+//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++
-*-===//
+//
+// 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:
@@ -51,28 +57,71 @@ class StringToOffsetTable {
return II->second;
}
- // Emit the string using string literal concatenation, for better readability
- // and searchability.
- void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl,
-co
https://github.com/s-barannikov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/123548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable {
return II->second;
}
- // Emit the string using string literal concatenation, for better readability
- // and searchability.
- void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl,
-co
@@ -51,28 +57,71 @@ class StringToOffsetTable {
return II->second;
}
- // Emit the string using string literal concatenation, for better readability
- // and searchability.
- void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl,
-co
@@ -1718,15 +1719,30 @@ class Record {
ArrayRef getAssertions() const { return Assertions; }
ArrayRef getDumps() const { return Dumps; }
- ArrayRef> getSuperClasses() const {
-return SuperClasses;
+ /// Append all superclasses in post-order to \p Classes.
+ void get
https://github.com/s-barannikov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/123072
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
> @s-barannikov
>
> > > * the `strlen` is NOT constant-evaluated on MSVC, even the latest version.
> >
> >
> > The godbolt link shows otherwise?
>
> This is what I see in godbolt - to me this loop looks like strlen:
>
>  I brought this up in case someone else could
suggest the preferred way to fix the issue.
I don't have objections against the current approach, but I'm not qualified to
review it either.
https://github.com/
s-barannikov wrote:
> Updating the wrapper function's return type as below also fixes the error:
I mean, why do we have to watch for type mismatches and fix them instead of
creating the correct type in the first place?
There is `getPointerType(RetQT)` just above, shouldn't it be something like
https://github.com/s-barannikov commented:
May it be possible that the wrapper function's return type is invalid and the
cast isn't needed?
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
CharUnits Align = CGM.getContext().getDeclAlign(VD);
Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
}
+if (Val->getType() != Wrapper->getReturnType()) {
+ Val = Build
https://github.com/s-barannikov closed
https://github.com/llvm/llvm-project/pull/118856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
Spent quite a time tracking a non-existent address >_<
https://github.com/llvm/llvm-project/pull/118856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov created
https://github.com/llvm/llvm-project/pull/118856
None
>From 8af8a8c51955802a58341f32b2990859ee89038b Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Thu, 5 Dec 2024 21:41:36 +0300
Subject: [PATCH] [libunwind] Fix a typo in debug print
---
libunw
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/116642
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
Stray change?
https://github.com/llvm/llvm-project/pull/116181
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/106951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
I guess this is a breaking change?
Following the discussion in the linked revision it looks like this also needs
some AutoUpgrade changes.
https://github.com/llvm/llvm-project/pull/106951
___
cfe-commits mailing list
cfe-commits@l
https://github.com/s-barannikov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/105824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/105544
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
> However I feel like it is out of scope for what I am trying to do right now.
> Would this be better as a separate PR to change how this is handled?
Sure
https://github.com/llvm/llvm-project/pull/104816
___
cfe-commits mailing l
@@ -13,7 +13,7 @@
#ifndef LLVM_SUPPORT_CRC_H
#define LLVM_SUPPORT_CRC_H
-#include "llvm/Support/DataTypes.h"
+#include
s-barannikov wrote:
```suggestion
#include
```
https://github.com/llvm/llvm-project/pull/104825
_
@@ -17,7 +17,7 @@
#ifndef LLVM_SUPPORT_ATOMIC_H
#define LLVM_SUPPORT_ATOMIC_H
-#include "llvm/Support/DataTypes.h"
+#include
s-barannikov wrote:
```suggestion
#include
```
https://github.com/llvm/llvm-project/pull/104825
___
@@ -9,17 +9,14 @@
#ifndef LLVM_SUPPORT_CHRONO_H
#define LLVM_SUPPORT_CHRONO_H
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/FormatProviders.h"
+#include "llvm/Support/FormatVariadicDetails.h"
#include
s-barannikov wrote:
(nit) extra newline
@@ -12,10 +12,8 @@
#include "Unix.h"
#include "llvm/ADT/Hashing.h"
-#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/StringSwitch.h"
#include "llvm/Config/config.h"
-#include
-#include
s-barannikov wrote:
`` is used in this file
https://github.com/llv
@@ -19,6 +19,7 @@
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
+#include "llvm/Support/Debug.h"
using namespace llvm;
s-barannikov wrote:
```suggestion
using namespace llvm;
```
https://github.com/llvm/llvm-projec
@@ -10,6 +10,7 @@
#include "InputFiles.h"
#include "InputSection.h"
#include "OutputSegment.h"
+#include "llvm/ADT/StringSwitch.h"
#include
s-barannikov wrote:
(nit)
```suggestion
#include "llvm/ADT/StringSwitch.h"
#include
```
https://github.com/llvm/ll
@@ -1,4 +1,4 @@
-//===- MachineCFGPrinter.cpp - DOT Printer for Machine Functions
--===//
+//===- - DOT Printer for Machine Functions --===//
s-barannikov wrote:
Looks unintended.
https://github.com/llvm/llvm-project/pull/104825
_
@@ -39,7 +39,6 @@
#ifndef LLVM_SUPPORT_BALANCED_PARTITIONING_H
#define LLVM_SUPPORT_BALANCED_PARTITIONING_H
-#include "raw_ostream.h"
#include "llvm/ADT/ArrayRef.h"
#include
s-barannikov wrote:
(nit)
```suggestion
#include "llvm/ADT/ArrayRef.h"
#include
@@ -13,10 +13,12 @@
#ifndef LLVM_SUPPORT_COMPRESSION_H
#define LLVM_SUPPORT_COMPRESSION_H
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/ErrorHandling.h"
+#include
+#include
s-barannikov wrote:
Here and elsewher
s-barannikov wrote:
I think the issue could be handled a different (more generic) way, by pulling
`useFirstFieldIfTransparentUnion` to the caller and taking transparent unions
into account when emitting LLVM IR for the formal / actual parameters somewhere
in `CGCall.cpp`, so that ABIInfo imple
s-barannikov wrote:
May it make sense to add tests with the argument passed in memory / by
reference?
https://github.com/llvm/llvm-project/pull/104816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/104666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15567,12 +15567,13 @@ bool ComplexExprEvaluator::VisitBinaryOperator(const
BinaryOperator *E) {
HandleComplexComplexDiv(A, B, C, D, ResR, ResI);
}
} else {
- if (RHS.getComplexIntReal() == 0 && RHS.getComplexIntImag() == 0)
-return Error(E, d
https://github.com/s-barannikov closed
https://github.com/llvm/llvm-project/pull/102841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/102841
>From 8382e3ed0a5546fff4ed662a7abbaa39e2f0c22a Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 12 Aug 2024 04:08:54 +0300
Subject: [PATCH] [DataLayout] Remove constructor accepting a pointer to
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/102841
>From 8382e3ed0a5546fff4ed662a7abbaa39e2f0c22a Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 12 Aug 2024 04:08:54 +0300
Subject: [PATCH] [DataLayout] Remove constructor accepting a pointer to
https://github.com/s-barannikov created
https://github.com/llvm/llvm-project/pull/102841
The constructor initializes `*this` with `M->getDataLayout()`, which
is effectively the same as calling the copy constructor.
There does not seem to be a case where a copy would be necessary.
Note that the
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/98713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/98713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -293,20 +293,26 @@ void
CodeGenFunction::initFullExprCleanupWithFlag(RawAddress ActiveFlag) {
void EHScopeStack::Cleanup::anchor() {}
static void createStoreInstBefore(llvm::Value *value, Address addr,
- llvm::Instruction *beforeInst,
+
@@ -293,20 +293,26 @@ void
CodeGenFunction::initFullExprCleanupWithFlag(RawAddress ActiveFlag) {
void EHScopeStack::Cleanup::anchor() {}
static void createStoreInstBefore(llvm::Value *value, Address addr,
- llvm::Instruction *beforeInst,
+
https://github.com/s-barannikov commented:
A couple of remarks in case this patch gets reverted.
https://github.com/llvm/llvm-project/pull/102006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/102006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/101650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6077,6 +6077,10 @@ def mvis3 : Flag<["-"], "mvis3">,
Group;
def mno_vis3 : Flag<["-"], "mno-vis3">, Group;
def mhard_quad_float : Flag<["-"], "mhard-quad-float">,
Group;
def msoft_quad_float : Flag<["-"], "msoft-quad-float">,
Group;
+def mv8plus : Flag<["-"], "mv8plus">,
@@ -6077,6 +6077,10 @@ def mvis3 : Flag<["-"], "mvis3">,
Group;
def mno_vis3 : Flag<["-"], "mno-vis3">, Group;
def mhard_quad_float : Flag<["-"], "mhard-quad-float">,
Group;
def msoft_quad_float : Flag<["-"], "msoft-quad-float">,
Group;
+def mv8plus : Flag<["-"], "mv8plus">,
s-barannikov wrote:
> > > > This looks wrong. Preferred and ABI alignments should be set in
> > > > ~Triple~. ADD: Sorry, I meant DataLayout, of course.
> > >
> > >
> > > Thanks for pointing this out. How does data layout affect the alignment
> > > of constant string global variable symbols?
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const
ArgList &Args,
Features.push_back("-hard-quad-float");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus))
{
+if (A->getOption().matches(options::OPT_mv8p
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/98713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
> > This looks wrong. Preferred and ABI alignments should be set in ~Triple~.
> > ADD: Sorry, I meant DataLayout, of course.
>
> Thanks for pointing this out. How does data layout affect the alignment of
> constant string global variable symbols?
They will be aligned to th
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const
ArgList &Args,
Features.push_back("-hard-quad-float");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus))
{
+if (A->getOption().matches(options::OPT_mv8p
s-barannikov wrote:
This looks wrong. Preferred and ABI alignments should be set in Triple.
https://github.com/llvm/llvm-project/pull/101309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/98713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/98713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const
ArgList &Args,
Features.push_back("-hard-quad-float");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus))
{
+if (A->getOption().matches(options::OPT_mv8p
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const
ArgList &Args,
Features.push_back("-hard-quad-float");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus))
{
+if (A->getOption().matches(options::OPT_mv8p
@@ -137,6 +137,16 @@ bool isEmptyField(ASTContext &Context, const FieldDecl
*FD, bool AllowArrays,
bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays,
bool AsIfNoUniqueAddr = false);
+/// isEmptyFieldForLayout - Return true iff the field i
s-barannikov wrote:
IIRC there is a clang-tidy check that diagnoses uninitialized PODs, but
probably making the constructor non-trivial is simpler.
https://github.com/llvm/llvm-project/pull/98307
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/98307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11,7 +11,7 @@
//
s-barannikov wrote:
I guess this file should've been removed.
https://github.com/llvm/llvm-project/pull/93388
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/90338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21,6 +21,12 @@ char f_int_4(char x) { return x; }
// CHECK-LABEL: define{{.*}} fp128 @f_ld(fp128 noundef %x)
long double f_ld(long double x) { return x; }
+// Empty struct is lowered as a placeholder word parameter.
+struct empty {};
+
+// CHECK-LABEL: define{{.*}} i64 @f_
@@ -21,6 +21,12 @@ char f_int_4(char x) { return x; }
// CHECK-LABEL: define{{.*}} fp128 @f_ld(fp128 noundef %x)
long double f_ld(long double x) { return x; }
+// Empty struct is lowered as a placeholder word parameter.
+struct empty {};
+
+// CHECK-LABEL: define{{.*}} i64 @f_
@@ -263,7 +263,10 @@ SparcV9ABIInfo::classifyType(QualType Ty, unsigned
SizeLimit) const {
CoerceBuilder CB(getVMContext(), getDataLayout());
CB.addStruct(0, StrTy);
- CB.pad(llvm::alignTo(CB.DL.getTypeSizeInBits(StrTy), 64));
+ // All structs, even empty ones, should t
@@ -21,6 +21,12 @@ char f_int_4(char x) { return x; }
// CHECK-LABEL: define{{.*}} fp128 @f_ld(fp128 noundef %x)
long double f_ld(long double x) { return x; }
+// Empty struct is lowered as a placeholder word parameter.
+struct empty {};
+
+// CHECK-LABEL: define{{.*}} i64 @f_
https://github.com/s-barannikov closed
https://github.com/llvm/llvm-project/pull/68550
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/68550
>From 96dd0121b095f92cc66fcfc3ef08a19d0b2d6bec Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 9 Oct 2023 01:38:33 +0300
Subject: [PATCH 1/2] [clang] Differentiate between identifier and string
s-barannikov wrote:
Still LGTM
https://github.com/llvm/llvm-project/pull/74927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
s-barannikov wrote:
> Shorts are half an int, so HalfWidth and HalfAlign apply here.
This is not true for our downstream target where `short` has the same width as
`int` (note that the standard allows it).
It would be better to introduce `ShortWidth` / `ShortAlign` fields and
initialize them t
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/68550
>From 96dd0121b095f92cc66fcfc3ef08a19d0b2d6bec Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 9 Oct 2023 01:38:33 +0300
Subject: [PATCH 1/2] [clang] Differentiate between identifier and string
@@ -82,6 +88,13 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
return is64Bit() ? 2047 : 0;
}
+ bool isRegisterReserved(MCPhysReg PhysReg) const {
+if (PhysReg >= SP::G0 && PhysReg <= SP::O7)
+ return ReserveRegister[PhysReg - SP::G0];
---
@@ -82,6 +88,13 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
return is64Bit() ? 2047 : 0;
}
+ bool isRegisterReserved(MCPhysReg PhysReg) const {
+if (PhysReg >= SP::G0 && PhysReg <= SP::O7)
+ return ReserveRegister[PhysReg - SP::G0];
---
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/74927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov approved this pull request.
https://github.com/llvm/llvm-project/pull/74927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -29,6 +29,12 @@ namespace llvm {
class StringRef;
class SparcSubtarget : public SparcGenSubtargetInfo {
+ // Reserve*Register[i] - *#i is not available as a general purpose register.
+ BitVector ReserveGRegister;
s-barannikov wrote:
I was thinking about
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const
MachineFunction &MF) const {
for (unsigned n = 0; n < 31; n++)
Reserved.set(SP::ASR1 + n);
+ for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) {
+// Mark both single register and
https://github.com/s-barannikov ready_for_review
https://github.com/llvm/llvm-project/pull/68550
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/68550
>From 96dd0121b095f92cc66fcfc3ef08a19d0b2d6bec Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 9 Oct 2023 01:38:33 +0300
Subject: [PATCH 1/2] [clang] Differentiate between identifier and string
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/68550
>From 96dd0121b095f92cc66fcfc3ef08a19d0b2d6bec Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 9 Oct 2023 01:38:33 +0300
Subject: [PATCH] [clang] Differentiate between identifier and string
Enum
https://github.com/s-barannikov updated
https://github.com/llvm/llvm-project/pull/68550
>From 96dd0121b095f92cc66fcfc3ef08a19d0b2d6bec Mon Sep 17 00:00:00 2001
From: Sergei Barannikov
Date: Mon, 9 Oct 2023 01:38:33 +0300
Subject: [PATCH] [clang] Differentiate between identifier and string
Enum
@@ -29,6 +29,12 @@ namespace llvm {
class StringRef;
class SparcSubtarget : public SparcGenSubtargetInfo {
+ // Reserve*Register[i] - *#i is not available as a general purpose register.
+ BitVector ReserveGRegister;
s-barannikov wrote:
Can this be a single
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const
MachineFunction &MF) const {
for (unsigned n = 0; n < 31; n++)
Reserved.set(SP::ASR1 + n);
+ for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) {
+// Mark both single register and
@@ -80,6 +86,11 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
return is64Bit() ? 2047 : 0;
}
+ bool isGRegisterReserved(size_t i) const { return ReserveGRegister[i]; }
+ bool isORegisterReserved(size_t i) const { return ReserveORegister[i]; }
+ bool isLRegi
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const
MachineFunction &MF) const {
for (unsigned n = 0; n < 31; n++)
Reserved.set(SP::ASR1 + n);
+ for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) {
+// Mark both single register and
1 - 100 of 161 matches
Mail list logo