Skip to content

Conversation

@ahmedbougacha
Copy link
Member

This lets us guarantee the emission of one of our hardened constant signed pointer materialization sequences, rather than emitting the sign intrinsic as a naked sign, and exposing the raw pointer.

Do that in the builder to help guarantee that through the backend.

At the IR level, there aren't great ways to enforce that the constant operand to the intrinsic stays there, but we might be able to do that by generalizing immarg to be applicable to callsites rather than just Intrinsic definitions. That's all theoretical either way, and there's rarely a good reason to hoist a constant op from an intrinsic anyway.

This is pretty tolerant of weird discriminators, which should cover the interesting cases.

This lets us guarantee the emission of one of our hardened constant
signed pointer materialization sequences, rather than emitting the
sign intrinsic as a naked sign, and exposing the raw pointer.

Do that in the builder to help guarantee that through the backend.

At the IR level, there aren't great ways to enforce that the constant
operand to the intrinsic stays there, but we might be able to do that
by generalizing immarg to be applicable to callsites rather than just
Intrinsic definitions.  That's all theoretical either way, and there's
rarely a good reason to hoist a constant op from an intrinsic anyway.

This is pretty tolerant of weird discriminators, which should cover the
interesting cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants