HomePhabricator

[x86][SLH] Rm liveness check from data invariance check

Authored by zbrid on Mar 4 2020, 12:48 PM.

Description

[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

Details

Committed
bkramerMar 4 2020, 12:49 PM
Differential Revision
D70283: [x86][SLH] Rm liveness check from data invariance check
Parents
rG73b8d16e8595: [libc++] Mark another test as flaky
Branches
Unknown
Tags
Unknown