[PATCH] D28786: [ExecutionDepsFix] Kill clearance at function calls

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 15:49:18 PST 2017

loladiro created this revision.

This is a follow up to https://reviews.llvm.org/D28759 and together with that commit fixes
almost all (maybe all, pending another look at the benchmarks) of
the benchmarks that regressed due to https://reviews.llvm.org/rL278321 (while keeping the
performance enhancements in cases where https://reviews.llvm.org/rL278321 was beneficial).

Prior to this commit, the analysis would simply ignore any function
calls for the clearance calulation, causing incorrect results after
any function call (for the benchmarks that regressed https://reviews.llvm.org/rL278321 just
happened to pick a register that was worse than the xmm0 default).
With this patch, we kill clearance for all registers when a function
call occurs. This is obviously more pessimistic than reality in a lot
of cases (if the callee function doesn't def some of the registers),
but in most cases having to insert an extra xorps even if unnecessary
is better than taking the 3-5x performance penalty of picking the wrong

As an added optimization, also make sure to only insert one dependency
breaking instruction if there's multiple undef reads from the same



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28786.84607.patch
Type: text/x-patch
Size: 10445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170116/a52ff8aa/attachment.bin>

More information about the llvm-commits mailing list