diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-10-31 13:07:06 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-10-31 17:51:29 +0100 |
commit | b46fddf75fc27ee1545f00ab853d50b10c1d7ee6 (patch) | |
tree | c2376509855c7b939060b18c6d2df99840453f6a /llvm/lib/Analysis/ValueTracking.cpp | |
parent | ef6f6d1c1a2819407c8c218119b97e1e656e5ef3 (diff) | |
download | llvm-b46fddf75fc27ee1545f00ab853d50b10c1d7ee6.zip llvm-b46fddf75fc27ee1545f00ab853d50b10c1d7ee6.tar.gz llvm-b46fddf75fc27ee1545f00ab853d50b10c1d7ee6.tar.bz2 |
[CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop.
The attribute has no effect on a do statement since the path of execution
will always include its substatement.
It adds a diagnostic when the attribute is used on an infinite while loop
since the codegen omits the branch here. Since the likelihood attributes
have no effect on a do statement no diagnostic will be issued for
do [[unlikely]] {...} while(0);
Differential Revision: https://reviews.llvm.org/D89899
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions