aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2013-02-17 04:03:34 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2013-02-17 04:03:34 +0000
commit961f5708782bfd1d24f720546ea8017e986b8521 (patch)
tree55a1bb894c30df6ec478b13c3dd2e1ff4eea29cc /lib/CodeGen/CGClass.cpp
parent97e948e9c9cc2db9f0cdc13e708fe1bd8c6d05a2 (diff)
[CodeGen] tighten objc ivar invariant.load attribution
An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
0 files changed, 0 insertions, 0 deletions