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

Use TBAA metadata to tell LLVM about the (lack of) aliasing between attributes #624

Closed
whitequark opened this issue Nov 20, 2016 · 2 comments

Comments

@whitequark
Copy link
Contributor

I'm not sure that this will work, but if it does, this can potentially lead to significant benefits because e.g. TTLOut.channel could be hoisted out of an inner loop without even declaring it as kernel invariant (since it will be no-alias wrt anything written in the loop).

@whitequark
Copy link
Contributor Author

whitequark commented Nov 21, 2016

Test case: this should result in read of t being hoisted out of the inner loop:

class UnitConversionTime3(EnvExperiment):
    def build(self):
        self.setattr_device("core")
        self.setattr_device("ttl1")

    @kernel
    def set_time_kernel(self, t):
        self.t = t
        self.t_mu = seconds_to_mu(self.t)

    @kernel
    def run(self):
        for t in [20*us, 15*us, 10*us, 5*us, 2*us, 1*us]:
            print("t =", t, " us")
            self.set_time_kernel(t)

            self.core.reset()

            for _ in range(10000):
                self.ttl12.pulse(self.t)

@sbourdeauducq
Copy link
Member

Transferred to NAC3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants