From: Karol Herbst <karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Karol Herbst <nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
Subject: [PATCH 3/3] nv50/ir: run some passes multiple times
Date: Mon, 3 Apr 2017 17:55:53 +0200 [thread overview]
Message-ID: <20170403155553.996-4-karolherbst@gmail.com> (raw)
In-Reply-To: <20170403155553.996-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Karol Herbst <nouveau@karolherbst.de>
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
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2017-04-03 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 15:55 [PATCH 0/3] nv50/ir: Preapre for running Opts inside a loop Karol Herbst
2017-04-03 15:55 ` [PATCH 1/3] nv50/ir: fix AlgebraicOpt for slcts with mods Karol Herbst
[not found] ` <20170403155553.996-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-03 15:55 ` [PATCH 2/3] nv50/ir: handle logops with NOT in AlgebraicOpt Karol Herbst
2017-04-03 15:55 ` 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=20170403155553.996-4-karolherbst@gmail.com \
--to=karolherbst-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.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.