Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test new module system merge #1850

Merged
merged 33 commits into from
Jun 17, 2023
Merged

Test new module system merge #1850

merged 33 commits into from
Jun 17, 2023

Conversation

chameco
Copy link
Contributor

@chameco chameco commented Apr 3, 2023

No description provided.

@chameco chameco marked this pull request as ready for review April 4, 2023 18:05
@RyanGlScott
Copy link
Contributor

The CI isn't running due to a small number of merge conflicts, some of which I helped introduce (sorry!):

@chameco
Copy link
Contributor Author

chameco commented May 30, 2023

Thanks for the heads up, I'll resolve them. (The AWSLC test is still timing out locally, I'll keep poking at it.)

@chameco chameco force-pushed the sb/functors-merge branch from 71309e7 to 8dbebfc Compare June 1, 2023 20:00
Copy link
Contributor

@andreistefanescu andreistefanescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's merge it after GaloisInc/cryptol#1363

@andreistefanescu
Copy link
Contributor

We should add this to CHANGES.md

RyanGlScott and others added 9 commits June 16, 2023 14:25
The previous implementation of `translateLLVMGEP` was needlessly complicated,
as it required the pointer argument to have a very particular shape to its
type.  But there's no good reason for this requirement, as the only thing that
`translateLLVMGEP` _really_ needs to check for is that all of the index
arguments are `0` (so that no pointer offset needs to be computed). I have
simplified the implementation of `translateLLVMGEP` to reflect this and
expanded its Haddocks accordingly.

A secondary benefit of this change is that we no longer match on `PtrTo` in
`translateLLVMGEP`, which will make it easier to support opaque pointers in an
upcoming commit.

Fixes #1875.
This commit bumps the `llvm-pretty` submodule to bring in a commit from
GaloisInc/llvm-pretty#110 that adds additional fields to `ConstGEP` to represent
the basis type and expression to use for offset calculations. This also bumps
the `llvm-pretty-bc-parser` and `crucible` submodule to bring in corresponding
changes from GaloisInc/llvm-pretty-bc-parser#221 and GaloisInc/crucible#1085,
respectively.

This change affects one use site in `heapster-saw`, which is easily adapted.
This patch adds support for LLVM 15 and 16 by adding support for opaque
pointers, which are described in https://llvm.org/docs/OpaquePointers.html.  I
have also added a test case involving LLVM bitcode using opaque pointers to
kick the tires and ensure that the basics work as expected.

For the most part, this is a straightforward process, as most uses of pointer
types in SAW already do not care about pointee types. There are some
exceptions, however:

* The `typeOfSetupValue` function, as well as several places that use this
  function, scrutinize pointee types of pointers, which would appear to fly in
  the face of opaque pointers. I attempt to explain in #1876 which this is
  actually OK for now (although a bit awkward).
* The `llvm_boilerplate`/skeleton machinery does not support opaque pointers
  at all. See #1877.
* The `llvm_fresh_expanded_val` command does not support opaque pointers at
  all. See #1879.

This patch also bumps the following submodules to bring in support for opaque
pointers:

* `llvm-pretty`: GaloisInc/llvm-pretty#110
* `llvm-pretty-bc-parser`: GaloisInc/llvm-pretty-bc-parser#221
* `crucible`: GaloisInc/crucible#1085

This also bumps the `what4` submodule to bring in the changes from
GaloisInc/what4#234. This isn't necessary to support opaque pointers, but it
_is_ necessary to support a build plan involving `tasty-sugar-2.2.*`, which
`llvm-pretty-bc-parser`'s test suite now requires.
This way, users who encounter them in the wild will be more strongly encouraged
to report it on the issue tracker.
@yav yav merged commit 7881c6d into master Jun 17, 2023
@mergify mergify bot deleted the sb/functors-merge branch June 17, 2023 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants