aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-10-24 20:46:49 -0700
committerGitHub <noreply@github.com>2024-10-24 20:46:49 -0700
commitcf8d24531e0464d32031e5490cf2772f47645674 (patch)
treec149341dfcfea28bcc9d3d2588f33fac99d8f64a /flang/lib/Frontend/CompilerInvocation.cpp
parentb852fb1ec5fa15f0b913cc4988cbd09239b19904 (diff)
downloadllvm-cf8d24531e0464d32031e5490cf2772f47645674.zip
llvm-cf8d24531e0464d32031e5490cf2772f47645674.tar.gz
llvm-cf8d24531e0464d32031e5490cf2772f47645674.tar.bz2
[msan] Reduces overhead of #113200, by 10% (#113201)
CTMark #113200 size overhead was 5.3%, now it's 4.7%. The patch affects only signed integers. https://alive2.llvm.org/ce/z/Lv5hyi * The patch replaces code which extracted sign bit, maximized/minimized it, then packed it back, with simple sign bit flip. The another way to think about transformation is as a subtraction of MIN_SINT from A/B. Then we map MIN_SINT to 0, 0 to -MIN_SINT, and MAX_SINT to MAX_UINT. * Then to maximize/minimize A/B we don't need to extract sign bit, we can apply shadow the same way as to other bits. * After sign bit flip, we had to switch to unsigned version of the predicates. * After change above getHighestPossibleValue/getLowestPossibleValue became very similar, so we can combine into a single function. * Because the function does sign bit flip and requires unsigned predicates used for returned values, there is no point in keeping it as a member of class, to hide, we switch to function local lambda.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions