OSDN Git Service

Mark @llvm.trap cold
authorVedant Kumar <vsk@apple.com>
Wed, 14 Nov 2018 19:53:41 +0000 (19:53 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 14 Nov 2018 19:53:41 +0000 (19:53 +0000)
commit3d60ff7fa8c7d8b3db40912cd338928868ad6a11
tree8243f434784786cf533563209c168b6868991ca0
parentb78df5ef8e969928840093c3cb52b7c71f3081c8
Mark @llvm.trap cold

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.

Differential Revision: https://reviews.llvm.org/D54329

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346885 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
include/llvm/IR/Intrinsics.td
test/Feature/intrinsics.ll
test/Transforms/SimplifyCFG/switch-on-const-select.ll
utils/TableGen/CodeGenIntrinsics.h
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/IntrinsicEmitter.cpp