[all-commits] [llvm/llvm-project] aa3f79: [x86][SLH] Rm liveness check from data invariance ...

zbrid via All-commits all-commits at lists.llvm.org
Wed Mar 4 12:54:09 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aa3f791fa94449a1df0bd96fa2a2e5a01514c142
      https://github.com/llvm/llvm-project/commit/aa3f791fa94449a1df0bd96fa2a2e5a01514c142
  Author: Zola Bridges <zbrid at google.com>
  Date:   2020-03-04 (Wed, 04 Mar 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp

  Log Message:
  -----------
  [x86][SLH] Rm liveness check from data invariance check

SLH had two functions named isDataInvariant and isDataInvariantLoad that
checked whether the passed instruction was data invariant. For some instructions,
if the EFLAGS were dead then they were considered data invariant, otherwise
they were not considered data invariant.

In this patch, I extracted that EFLAGS liveness check and made it
explicit at every call to isDataInvariant and isDataInvariantLoad.
This makes the isDataInvariant function behave more generally
and preserves the liveness check behavior that SLH would like to have.

Tested via llvm-lit llvm/test/CodeGen/X86/speculative-load-hardening*

This is the first step in making these two data invariance checks
available for non-SLH passes. The second step is to move the passes from
SLH to X86InstrInfo.cpp. I'll follow up with a patch that does that.

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




More information about the All-commits mailing list