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)
commit808e157356234ecc865c0baecb2e22df5e4d54a8
tree709d3fcfa3a621d154b82f49755bfb053498ed18
parentc0830f55779adf07809f6b1af4351c3a2f293dfc
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

llvm-svn: 346885
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