This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).
Details
- Reviewers
GGanesh craig.topper andreadb spatel - Commits
- rG99b925bdf388: [X86][LWP] Add llvm support for LWP instructions (reapplied).
rGb2e0464fde89: [X86][LWP] Add llvm support for LWP instructions.
rL302041: [X86][LWP] Add llvm support for LWP instructions (reapplied).
rL302028: [X86][LWP] Add llvm support for LWP instructions.
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGen/X86/lwp-intrinsics-x86_64.ll | ||
---|---|---|
14 ↗ | (On Diff #97519) | That immediate seems way out of range of 32-bit value. Is that intentional? |
test/CodeGen/X86/lwp-intrinsics-x86_64.ll | ||
---|---|---|
14 ↗ | (On Diff #97519) | Yes, I was trying to check that it truncated correctly. Should I comment it? Add it as a separate test? |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
20297 ↗ | (On Diff #97519) | Can you split this refactor, please? |
test/CodeGen/X86/lwp-intrinsics-x86_64.ll | ||
14 ↗ | (On Diff #97519) | I'm not sure this is useful, does it even make it past the IR reader? |
test/CodeGen/X86/lwp-intrinsics-x86_64.ll | ||
---|---|---|
14 ↗ | (On Diff #97519) | OK, I'll strip them down. |
I noticed that according to X86GenInstrInfo.inc, the new LWPINS instructions don't have "UnmodeledSideEffects".
However, all the other LWP instructions have flag UnmodeledSideEffects set.
My understanding is that this is because LWPVAL/LLWPCB/SLWPCB are directly matched from x86 intrinsics with side effects, while LWPINS* are firstly lowered to X86ISD::LWPINS nodes.
Shouldn't we set hasSideEffects = 1 for the LWPINS variants too? After all, those instructions modify memory by pushing new events in the ring buffer. So, those can both read and write.