-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Missing TBAA information on view #34847
Comments
Bump |
This is the same issue as #36970. Also, AFAICT, the issue is not the absense of TBAA but the absense of dereferenceable. All the memory operations in the loop have all the metadata on them. However, LICM striped the metadata for the load of the array from subarray and therefore lost information needed to hoist the load of the array pointer in https://reviews.llvm.org/D85598 helps with #36970 but not this one since the load is not constant. |
Bumping this as I think it's relevant. @chriselrod pointed me to this issue. Currently
The very last timing should be |
In https://discourse.julialang.org/t/rfc-ann-restacker-jl-a-workaround-for-the-heap-allocated-immutable-problem/35037 @tkf that copying a view manually at that tart of the function causes a sizable performance improvement. It seems different from the stack allocation of immutable that contain heap references (x-ref: #34126). From my brief investigation it seems like the performance difference is due to a vectorization failure. The example I looked at is:
"Restacking"
ys
causes this function to be vectorizable.Looking at the optimized LLVM IR I noticed
Where
%42 = load
is thegetindex
fromxs
andstore double
is thesetindex!
intoys
. Notice how in%48
we are reloading the base pointer of the array at each iteration.So how are we deriving
%38
and%48
, why don't we have to reload the pointer we are loading from?The series of operations we do to obtain the base pointer for the
getpointer
the operations we do to obtain the pointer from which to load the base pointer.
Notice how in the later case we are missing all TBAA information. The two interesting tbaa trees are below.
I don't understand our TBAA annotations well enough to conclude that this is a bug, but shouldn't the view be marked immutable either way?
The text was updated successfully, but these errors were encountered: