jrtc27 wrote:
As the author of the patch that seems sensible to me, and I’ve not been aware
of any regressions from it in main.
https://github.com/llvm/llvm-project/pull/113052
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
ht
https://github.com/jrtc27 created
https://github.com/llvm/llvm-project/pull/113733
Whilst in upstream LLVM iPTRAny is only ever an integer, essentially an
alias for iPTR, this is not true in CHERI LLVM, where it gets used to
mean "iPTR or cPTR", i.e. either an integer address or a capability
(wi
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113733
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113733
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113732
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113732
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 created
https://github.com/llvm/llvm-project/pull/113732
We've already called EnforceInteger on Types[0], and iPTRAny isn't
regarded as an integer type (note that TableGen special-cases iPTR here
to include that, though), so we cannot possibly still have an iPTRAny by
t
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -342,14 +346,63 @@ class DataLayout {
SmallVector getNonIntegralAddressSpaces() const {
SmallVector AddrSpaces;
for (const PointerSpec &PS : PointerSpecs) {
- if (PS.IsNonIntegral)
+ if (PS.HasNonIntegralRepresentation || PS.HasUnstableRepresentation)
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -3082,16 +3129,21 @@ as follows:
``A``
Specifies the address space of objects created by '``alloca``'.
Defaults to the default address space of 0.
-``p[n]::[:][:]``
+``p[][]::[:][:]``
This specifies the *size* of a pointer and its and
\erred alignm
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -342,14 +346,63 @@ class DataLayout {
SmallVector getNonIntegralAddressSpaces() const {
jrtc27 wrote:
This name seems stale given it's including unstable pointers
https://github.com/llvm/llvm-project/pull/105735
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -419,9 +420,24 @@ Error DataLayout::parsePointerSpec(StringRef Spec) {
// Address space. Optional, defaults to 0.
unsigned AddrSpace = 0;
- if (!Components[0].empty())
-if (Error Err = parseAddrSpace(Components[0], AddrSpace))
+ bool UnstableRepr = false;
+ bool
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -361,6 +414,16 @@ class DataLayout {
return PTy && isNonIntegralPointerType(PTy);
}
+ bool shouldAvoidPtrToInt(Type *Ty) const {
+auto *PTy = dyn_cast(Ty);
+return PTy && shouldAvoidPtrToInt(PTy->getPointerAddressSpace());
jrtc27 wrote:
It s
https://github.com/jrtc27 approved this pull request.
This should be low risk. If the condition holds, it would previously
dereference an invalid iterator, and either crash immediately thanks to
assertions or use whatever junk's in memory. Now it will treat it the same as
if there's an immedia
25 matches
Mail list logo