From: Karol Herbst <karolherbst@gmail.com>
To: mesa-dev@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Subject: [PATCH v2 3/3] nv50/ir: run some passes multiple times
Date: Mon, 3 Apr 2017 17:58:22 +0200 [thread overview]
Message-ID: <20170403155822.1810-4-karolherbst@gmail.com> (raw)
In-Reply-To: <20170403155822.1810-1-karolherbst@gmail.com>
With the shader cache, compilation time matters less.
As a side effect we can write more optimizations to produce better optimized
code.
total instructions in shared programs : 3931743 -> 3917512 (-0.36%)
total gprs used in shared programs : 481460 -> 481680 (0.05%)
total local used in shared programs : 27481 -> 26761 (-2.62%)
total bytes used in shared programs : 36032672 -> 35902648 (-0.36%)
local gpr inst bytes
helped 48 133 3843 3843
hurt 1 295 75 75
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
---
.../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 0de84fe9fc..505de08573 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -3729,12 +3729,17 @@ Program::optimizeSSA(int level)
RUN_PASS(1, CopyPropagation, run);
RUN_PASS(1, MergeSplits, run);
RUN_PASS(2, GlobalCSE, run);
- RUN_PASS(1, LocalCSE, run);
- RUN_PASS(2, AlgebraicOpt, run);
- RUN_PASS(2, ModifierFolding, run); // before load propagation -> less checks
- RUN_PASS(1, ConstantFolding, foldAll);
- RUN_PASS(2, LateAlgebraicOpt, run);
- RUN_PASS(1, Split64BitOpPreRA, run);
+ for (int i = 0; i < 2; ++i) {
+ RUN_PASS(1, LocalCSE, run);
+ RUN_PASS(2, AlgebraicOpt, run);
+ RUN_PASS(2, ModifierFolding, run); // before load propagation -> less checks
+ RUN_PASS(1, ConstantFolding, foldAll);
+ RUN_PASS(2, LateAlgebraicOpt, run);
+ // only once
+ if (i == 0)
+ RUN_PASS(1, Split64BitOpPreRA, run);
+ RUN_PASS(1, DeadCodeElim, buryAll);
+ }
RUN_PASS(1, LoadPropagation, run);
RUN_PASS(1, IndirectPropagation, run);
RUN_PASS(2, MemoryOpt, run);
--
2.12.2
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
prev parent reply other threads:[~2017-04-03 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 15:58 [PATCH v2 0/3] nv50/ir: Preapre for running Opts inside a loop Karol Herbst
[not found] ` <20170403155822.1810-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-03 15:58 ` [PATCH v2 1/3] nv50/ir: fix AlgebraicOpt for slcts with mods Karol Herbst
[not found] ` <20170403155822.1810-2-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-09 17:34 ` Ilia Mirkin
2017-04-03 15:58 ` [PATCH v2 2/3] nv50/ir: handle logops with NOT in AlgebraicOpt Karol Herbst
2017-04-09 17:36 ` Ilia Mirkin
2017-04-03 15:58 ` Karol Herbst [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403155822.1810-4-karolherbst@gmail.com \
--to=karolherbst@gmail.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.