Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variable in GC root placement #22848

Merged
merged 1 commit into from
Jul 20, 2017
Merged

Conversation

ararslan
Copy link
Member

This was causing an unused variable warning when building with Clang.

This was causing an unused variable warning when building with Clang.
@ararslan ararslan requested a review from Keno July 17, 2017 20:49
@yuyichao
Copy link
Contributor

Looks like the requirement on DOM wrapper pass can be removed?

@Keno
Copy link
Member

Keno commented Jul 17, 2017

Yeah that too. Wouldn't be surprised if we started needing it again at some point, but let's get rid of it for now.

@ararslan
Copy link
Member Author

To be honest I'm not really sure how to do that. This is my best guess, is it right?

diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp
index 4a613febd8..f617c2f98a 100644
--- a/src/llvm-late-gc-lowering.cpp
+++ b/src/llvm-late-gc-lowering.cpp
@@ -6,7 +6,6 @@
 #include "llvm/Analysis/CFG.h"
 #include <llvm/IR/Value.h>
 #include <llvm/IR/Constants.h>
-#include <llvm/IR/Dominators.h>
 #include <llvm/IR/Function.h>
 #include <llvm/IR/Instructions.h>
 #include <llvm/IR/IntrinsicInst.h>
@@ -290,15 +289,12 @@ struct LateLowerGCFrame: public FunctionPass {
     static char ID;
     LateLowerGCFrame() : FunctionPass(ID)
     {
-        llvm::initializeDominatorTreeWrapperPassPass(*PassRegistry::getPassRegistry());
         tbaa_gcframe = tbaa_make_child("jtbaa_gcframe").first;
     }

 protected:
     void getAnalysisUsage(AnalysisUsage &AU) const override {
         FunctionPass::getAnalysisUsage(AU);
-        AU.addRequired<DominatorTreeWrapperPass>();
-        AU.addPreserved<DominatorTreeWrapperPass>();
         AU.setPreservesCFG();
     }

@ararslan
Copy link
Member Author

If that's incorrect, perhaps the change you mentioned is better suited for a separate PR (probably by someone else...)

@ararslan ararslan merged commit 3e8b32d into master Jul 20, 2017
@ararslan ararslan deleted the aa/gc-clang-warn branch July 20, 2017 16:51
jeffwong pushed a commit to jeffwong/julia that referenced this pull request Jul 24, 2017
This was causing an unused variable warning when building with Clang.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants