[PATCH] D44535: Introduce metadata for avoiding loop predication

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 13:14:12 PDT 2018


anna created this revision.
anna added reviewers: hfinkel, apilipenko, reames, mkazantsev.
Herald added subscribers: llvm-commits, eraman, mehdi_amini.

This patch introduces the llvm.cond.no_loop_predication which will be
annotated on boolean conditions that are used in branches.
This is used by loop predication to identify loops that should not be
predicated. When the conditional instruction is used as the latch check
in the loop, predicating the loop can cause the widened checks to fail
spuriously.
Such coarse checks (which can later become the latch check through
passes such as loop rotate) can be introduced by the front end or by
downstream passes. Given this metadata is a property of the condition,
we cannot attach it to llvm.loop metadata.


Repository:
  rL LLVM

https://reviews.llvm.org/D44535

Files:
  docs/LangRef.rst
  include/llvm/IR/LLVMContext.h
  lib/IR/LLVMContext.cpp
  lib/Transforms/Scalar/LoopPredication.cpp
  test/ThinLTO/X86/lazyload_metadata.ll
  test/Transforms/LoopPredication/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44535.138612.patch
Type: text/x-patch
Size: 6981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180315/8a08a180/attachment.bin>


More information about the llvm-commits mailing list