llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.22k stars 11.64k forks source link

[X86] Add X86 unfold instruction pass #86669

Open RKSimon opened 6 months ago

RKSimon commented 6 months ago

There are a number of cases where we might want to unfold memory loads from instructions, but keep the memory load/store in the same basic block:

I imagine this being similar to MachineLICM; driven by register pressure and scheduler throughput/latency, but within a basicblock.

llvmbot commented 6 months ago

@llvm/issue-subscribers-backend-x86

Author: Simon Pilgrim (RKSimon)

There are a number of cases where we might want to unfold memory loads from instructions, but keep the memory load/store in the same basic block: - [ ] Instructions that are notably slower in their folded form (#72530, #14640) - [ ] optsize/minsize builds - Loading a vector constant that can be compressed by X86FixupVectorConstants - [ ] RMW scalar arithmetic on many Intel targets (#40176) I imagine this being similar to MachineLICM; driven by register pressure and scheduler throughput/latency, but within a basicblock.