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

@noinline ignored #19418

Closed
damiendr opened this issue Nov 25, 2016 · 6 comments · Fixed by #33557
Closed

@noinline ignored #19418

damiendr opened this issue Nov 25, 2016 · 6 comments · Fixed by #33557

Comments

@damiendr
Copy link
Contributor

It looks like Julia 0.6 ignores @noinline in the following snippet:

@noinline bar() = 1
function foo()
    bar()
end
@code_typed(foo())

Julia Version 0.5.0-dev+2349
Commit cf93d6f* (2016-01-29 02:19 UTC):

1-element Array{Any,1}:
 :($(Expr(:lambda, Any[], Any[Any[],Any[],Any[],Any[]], :(begin  # In[1], line 3:
        return (Main.bar)()::Int64
    end::Int64))))

Julia Version 0.6.0-dev.1297
Commit 416f5f2* (2016-11-23 13:12 UTC):

CodeInfo(:(begin 
        return $(QuoteNode(1))
    end))=>Int64
@yuyichao
Copy link
Contributor

The pure+constant return logic bypasses noinline...

@damiendr
Copy link
Contributor Author

OK, good to know. I was using noinline functions like these as a tag for introspection purposes, but I will find another way if that's the new logic.

@damiendr
Copy link
Contributor Author

Won't this cause problems with #265 ?

@yuyichao
Copy link
Contributor

This is unrelated to #265.

@nlw0
Copy link
Contributor

nlw0 commented Apr 26, 2019

Is this still the case? I am trying to implement a macro similar to how @noinline is supposed to work, but I'm no sure the code that arrives at emit_function in codegen.cpp really has the structure expected by jl_has_meta. I cannot make my macro work, and I guess it could be the same issue.

@nlw0
Copy link
Contributor

nlw0 commented Apr 26, 2019

If @noinline is still supposed to be propagated to LLVM then this would depend on #27104

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 a pull request may close this issue.

3 participants