[PATCH] D70283: [x86][SLH] Rm liveness check from data invariance check

Zola Bridges via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 16:44:41 PST 2019


zbrid created this revision.
zbrid added reviewers: craig.topper, rnk.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

SLH had two functions named isDataInvariant and isDataInvariantLoad that
check both whether the instructions were data invariant and also checked
whether those instructions had live or dead EFLAGS. If the EFLAGS were
dead then the set of instructions with this additional check would be
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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70283

Files:
  llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70283.229425.patch
Type: text/x-patch
Size: 6486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191115/226c55b0/attachment.bin>


More information about the llvm-commits mailing list