[PATCH] D54329: Mark @llvm.trap cold

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 09:46:01 PST 2018


vsk created this revision.
vsk added reviewers: junbuml, efriedma, brzycki, sebpop.

A call to @llvm.trap can be expected to be cold (i.e. unlikely to be
reached in a normal program execution).

Outlining paths which unconditionally trap is an important memory
saving. As the hot/cold splitting pass (imho) should not treat all
noreturn calls as cold, explicitly mark @llvm.trap cold so that it can
be outlined.

Split out of https://reviews.llvm.org/D54244.


https://reviews.llvm.org/D54329

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/Intrinsics.td
  llvm/test/Feature/intrinsics.ll
  llvm/test/Transforms/SimplifyCFG/switch-on-const-select.ll
  llvm/utils/TableGen/CodeGenIntrinsics.h
  llvm/utils/TableGen/CodeGenTarget.cpp
  llvm/utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54329.173366.patch
Type: text/x-patch
Size: 4397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181109/5db9cd63/attachment.bin>


More information about the llvm-commits mailing list