Kyle Roarty has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/38135 )
Change subject: gpu-compute: Use dict.get syntax for accessing buildEnv keys
..
gpu-compute: Use dict.get syntax for accessing buildEnv keys
37775 removed SmartDict, which is the type buildEnv used to be.
Because of that change, doing buildEnv[key] with a key not in the dict
returns KeyError instead of False. By using buildEnv(key, False), we are
able to return False when the key isn't in the dict.
Change-Id: I4aae29b95b082efb2b021f21d608f9cd1c196379
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38135
Reviewed-by: Matt Sinclair
Reviewed-by: Matthew Poremba
Maintainer: Matt Sinclair
Maintainer: Matthew Poremba
Tested-by: kokoro
---
M src/gpu-compute/X86GPUTLB.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Matthew Poremba: Looks good to me, approved; Looks good to me, approved
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/gpu-compute/X86GPUTLB.py b/src/gpu-compute/X86GPUTLB.py
index fee9b9a..7e5d932 100644
--- a/src/gpu-compute/X86GPUTLB.py
+++ b/src/gpu-compute/X86GPUTLB.py
@@ -36,7 +36,7 @@
from m5.objects.ClockedObject import ClockedObject
from m5.SimObject import SimObject
-if buildEnv['FULL_SYSTEM']:
+if buildEnv.get('FULL_SYSTEM', False):
class X86PagetableWalker(SimObject):
type = 'X86PagetableWalker'
cxx_class = 'X86ISA::Walker'
@@ -50,7 +50,7 @@
size = Param.Int(64, "TLB size (number of entries)")
assoc = Param.Int(64, "TLB associativity")
-if buildEnv['FULL_SYSTEM']:
+if buildEnv.get('FULL_SYSTEM', False):
walker = Param.X86PagetableWalker(X86PagetableWalker(),
"page table walker")
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38135
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4aae29b95b082efb2b021f21d608f9cd1c196379
Gerrit-Change-Number: 38135
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty
Gerrit-Reviewer: Bobby R. Bruce
Gerrit-Reviewer: Kyle Roarty
Gerrit-Reviewer: Matt Sinclair
Gerrit-Reviewer: Matthew Poremba
Gerrit-Reviewer: kokoro
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s