summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer
diff options
context:
space:
mode:
authorAlok Hota <[email protected]>2018-05-25 10:19:47 -0500
committerTim Rowley <[email protected]>2018-05-25 10:56:49 -0500
commitb6b114c1aeaa996a4bf8c1fd409e8141d18b120c (patch)
tree95b4f41c2d16ecc9b7778137dee501a66609d366 /src/gallium/drivers/swr/rasterizer
parent98d0201577ba21223e6d9a54b1240fe49524d486 (diff)
swr/rast: Removed superfluous JitManager argument from passes
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp17
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h2
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp2
5 files changed, 12 insertions, 13 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
index 72bf900c85e..20f2e42eec9 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
@@ -819,7 +819,7 @@ struct BlendJit : public Builder
passes.add(createSCCPPass());
passes.add(createAggressiveDCEPass());
- passes.add(createLowerX86Pass(JM(), this));
+ passes.add(createLowerX86Pass(this));
passes.run(*blendFunc);
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index 7b0b80a7139..0abcd1a8d76 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -269,7 +269,7 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState)
optPasses.run(*fetch);
- optPasses.add(createLowerX86Pass(JM(), this));
+ optPasses.add(createLowerX86Pass(this));
optPasses.run(*fetch);
JitManager::DumpToFile(fetch, "opt");
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp
index 5a69eaef260..f2bd8889fc5 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp
@@ -136,21 +136,21 @@ namespace SwrJit
struct LowerX86 : public FunctionPass
{
- LowerX86(JitManager* pJitMgr = nullptr, Builder* b = nullptr)
- : FunctionPass(ID), mpJitMgr(pJitMgr), B(b)
+ LowerX86(Builder* b = nullptr)
+ : FunctionPass(ID), B(b)
{
initializeLowerX86Pass(*PassRegistry::getPassRegistry());
// Determine target arch
- if (mpJitMgr->mArch.AVX512F())
+ if (JM()->mArch.AVX512F())
{
mTarget = AVX512;
}
- else if (mpJitMgr->mArch.AVX2())
+ else if (JM()->mArch.AVX2())
{
mTarget = AVX2;
}
- else if (mpJitMgr->mArch.AVX())
+ else if (JM()->mArch.AVX())
{
mTarget = AVX;
@@ -356,9 +356,8 @@ namespace SwrJit
{
}
- JitManager* JM() { return mpJitMgr; }
+ JitManager* JM() { return B->JM(); }
- JitManager* mpJitMgr;
Builder* B;
TargetArch mTarget;
@@ -368,9 +367,9 @@ namespace SwrJit
char LowerX86::ID = 0; // LLVM uses address of ID as the actual ID.
- FunctionPass* createLowerX86Pass(JitManager* pJitMgr, Builder* b)
+ FunctionPass* createLowerX86Pass(Builder* b)
{
- return new LowerX86(pJitMgr, b);
+ return new LowerX86(b);
}
Instruction* NO_EMU(LowerX86* pThis, TargetArch arch, TargetWidth width, CallInst* pCallInst)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h
index f7373f034be..95ef4bcf016 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h
@@ -33,5 +33,5 @@ namespace SwrJit
{
using namespace llvm;
- FunctionPass* createLowerX86Pass(JitManager* pJitMgr, Builder* b);
+ FunctionPass* createLowerX86Pass(Builder* b);
}
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
index f804900291e..cb2e3aed61a 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
@@ -307,7 +307,7 @@ struct StreamOutJit : public Builder
passes.add(createSCCPPass());
passes.add(createAggressiveDCEPass());
- passes.add(createLowerX86Pass(JM(), this));
+ passes.add(createLowerX86Pass(this));
passes.run(*soFunc);