[all-commits] [llvm/llvm-project] c07339: Move *San module passes later in the NPM pipeline

aeubanks via All-commits all-commits at lists.llvm.org
Mon Jun 8 12:09:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c07339c6754e1faf4078d3c592c0ae28455503cd
      https://github.com/llvm/llvm-project/commit/c07339c6754e1faf4078d3c592c0ae28455503cd
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-06-08 (Mon, 08 Jun 2020)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/test/CodeGen/asan-new-pm.ll
    M clang/test/CodeGen/sanitizer-module-constructor.c

  Log Message:
  -----------
  Move *San module passes later in the NPM pipeline

Summary:
This fixes pr33372.cpp under the new pass manager.

ASan adds padding to globals. For example, it will change a {i32, i32, i32} to a {{i32, i32, i32}, [52 x i8]}. However, when loading from the {i32, i32, i32}, InstCombine may (after various optimizations) end up loading 16 bytes instead of 12, likely because it thinks the [52 x i8] padding is ok to load from. But ASan checks that padding should not be loaded from.

Ultimately this is an issue of *San passes wanting to be run after all optimizations. This change moves the module passes right next to the corresponding function passes.

Also remove comment that's no longer relevant, this is the last ASan/MSan/TSan failure under the NPM (hopefully...).

As mentioned in https://reviews.llvm.org/rG1285e8bcac2c54ddd924ffb813b2b187467ac2a6, NPM doesn't support LTO + sanitizers, so modified some tests that test for that.

Reviewers: leonardchan, vitalybuka

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list