This is an archive of the discontinued LLVM Phabricator instance.

Mark @llvm.trap cold
ClosedPublic

Authored by vsk on Nov 9 2018, 9:45 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Nov 9 2018, 9:45 AM
hiraditya accepted this revision.Nov 13 2018, 5:32 AM
This revision is now accepted and ready to land.Nov 13 2018, 5:32 AM
This revision was automatically updated to reflect the committed changes.