-
Notifications
You must be signed in to change notification settings - Fork 98
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
_mm256_loadu_si256
is failed to be inlined for ABI issues
#140
Comments
What part isn't "fully" true? You conclude by saying that both
It does though. Because the caller of these functions has to uphold the safety contract that it's calling them from within a context where the appropriate target features are enabled.
This is not a reproduction. You didn't include the specific steps you went through to produce the executable. When you give repro steps, you should provide every step with the commands you're running. Like this:
Okay, and now I can try running your command:
I don't really know what to make of this. It does seem to suggest that it isn't getting inline somewhere, but it doesn't say where. And in particular, if this were a systemic problem, something like "load a vector from memory" not being inlined would be very apparent on a profile. Indeed, in profiling, the routine is marked as inlined: I got that profile by using
You can use whatever kind of haystack you want for this. Just make it a big one. In my case, One possibility is that this function (via the generic So... what made you report this issue? Are you hitting a real problem? Or are you fishing for one? If the former, please share the real problem you're hitting. If the latter, I'm happy to have this fixed, but it isn't something I'm keen on spending time on. |
Inlining fails on https://github.com/BurntSushi/aho-corasick/blob/master/src/packed/teddy/generic.rs#L1254. Since you think it's not a problem, I'm closing this issue.
I think I'm just reporting a potential problem since I'm not a user of this package. If you call it fishing, I'm fishing. |
To be clear, fishing is fine. It's just important context to understand what is driving things here. I'll re-open this. I didn't mean to say it wasn't a problem, just not one that I'll like prioritize myself to fix. |
Yeah indeed. It looks like going through |
Inspired by rust-lang/rust#121960, I'm looking for SIMD intrinsics that are not inlined in generated code.
https://github.com/BurntSushi/aho-corasick/blob/master/src/packed/vector.rs#L19C1-L27C59:
It's not fully true: if you do not mark the routines with
#[target_feature]
, LLVM will reject to inline them since it does not know if inlining causes ABI issues. So we need to use both#[target_feature]
and#[inline(always)]
.I find
_mm256_loadu_si256
is failed to be inlined in my project and it also applies to the releasedcargo
binary. I think it's another rustc bug at first but finallyobjdump
leads me here.Step to reproduce it:
Copy & paste the example in readme.
The text was updated successfully, but these errors were encountered: