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

[NewOptimizer] Make simdloop marker more robust #26985

Merged
merged 3 commits into from
May 7, 2018
Merged

[NewOptimizer] Make simdloop marker more robust #26985

merged 3 commits into from
May 7, 2018

Conversation

Keno
Copy link
Member

@Keno Keno commented May 4, 2018

See the individual commits for details. There's a couple regression in #26795 due to the new optimizer dropping simdloop annotations where it shouldn't. Fixing that was easy, but unfortunately, the simd loop metadata still got lost with the code generated by the new optimizer. The last commit fixes that by making the marker more robust against premature optimization. Unfortunately this exposed an LLVM bug which is fixed by the second commit. The combination of these restores SIMD loop functionality for the new optimizer.

@ararslan ararslan added the compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) label May 4, 2018
@vchuravy
Copy link
Member

vchuravy commented May 6, 2018

When you rebase on master, do bump

LLVM_BB_REL = 1
to 2

Keno added 2 commits May 6, 2018 17:45
Turns out getLoopID doesn't always get what setLoopID set.
I submitted a patch upstream to fix that. This carries that patch.
Previously the simdloop marker was metadata on a random add instruction in the loop.
This is problematic if that add instruction gets moved around or folded by an earlier
optimization pass. Switching to using an explicit marker instruction. Eventually we
should do something different here to address #26976. This just makes it more robust
to make sure it keeps working with the new optimizer.
@Keno
Copy link
Member Author

Keno commented May 7, 2018

Just in case:

@nanosoldier runbenchmarks(ALL, vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

@Keno Keno merged commit 71f6bfe into master May 7, 2018
@martinholters martinholters deleted the kf/simdloop branch May 7, 2018 17:01
@vchuravy
Copy link
Member

vchuravy commented May 15, 2018

Bizarrely enough only on the AArch64 build bots I am seeing:

/buildworker/worker/package_linuxaarch64/build/contrib/install.sh 644 /buildworker/worker/package_linuxaarch64/build/usr/include/uv/unix.h /buildworker/worker/package_linuxaarch64/build/usr/include/uv/version.h /buildworker/worker/package_linuxaarch64/build/usr/include/uv/errno.h /buildworker/worker/package_linuxaarch64/build/usr/include/uv/linux.h /buildworker/worker/package_linuxaarch64/build/usr/include/uv/threadpool.h /buildworker/worker/package_linuxaarch64/build/usr/include/julia/uv
/buildworker/worker/package_linuxaarch64/build/src/llvm-simdloop.cpp: In member function 'virtual bool llvm::LowerSIMDLoop::runOnModule(llvm::Module&)':
/buildworker/worker/package_linuxaarch64/build/src/llvm-simdloop.cpp:228:12: error: 'class llvm::Instruction' has no member named 'deleteValue'; did you mean 'InsertValue'?
         I->deleteValue();
            ^~~~~~~~~~~
            InsertValue
make[1]: *** [llvm-simdloop.o] Error 1

https://build.julialang.org/#/builders/78/builds/1198

@mbauman mbauman added the compiler:simd instruction-level vectorization label Jun 7, 2018
@Keno Keno mentioned this pull request Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) compiler:simd instruction-level vectorization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants