[PATCH] D26930: Teach optimizer that pthread_self does not trap. It can be speculatively executed.

Xin Tong via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 13:05:45 PST 2016


trentxintong created this revision.
trentxintong added a reviewer: hfinkel.
trentxintong added a subscriber: llvm-commits.
trentxintong set the repository for this revision to rL LLVM.
Herald added a subscriber: mzolotukhin.

Pass TargetLibraryInfo to isSafeToSpeculativelyExecute so that it can understand the behavior of known library functions.

With this patch, pthread_self is known to NOT trap, and therefore can be speculatively executed.


Repository:
  rL LLVM

https://reviews.llvm.org/D26930

Files:
  include/llvm/Analysis/TargetLibraryInfo.def
  include/llvm/Analysis/ValueTracking.h
  include/llvm/Transforms/Utils/LoopUtils.h
  lib/Analysis/TargetLibraryInfo.cpp
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/Scalar/LICM.cpp
  lib/Transforms/Scalar/LoopSink.cpp
  test/Transforms/LICM/pthread.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26930.78768.patch
Type: text/x-patch
Size: 9362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161121/b22aa418/attachment.bin>


More information about the llvm-commits mailing list