Page MenuHomePhabricator

czhang (Charles Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 3 2019, 3:44 PM (15 w, 3 d)

Recent Activity

Aug 12 2019

czhang added a comment to D64179: [CodeGen] Define an interface for the new pass manager..

By the way, the reason why I've had a hard time with the unit tests is that MIR modules are not so easily serialized and read as IR modules are, because the representation isn't as static. Any suggestions on how to achieve something similar to parseIR cleanly without resorting to the mess in llc would be highly appreciated. For now, testing is done by checking bitwise identical outputs from both pass managers, leveraging the parsing/machine function extraction boilerplate in llc.

Aug 12 2019, 10:52 AM · Restricted Project
czhang added a comment to D64179: [CodeGen] Define an interface for the new pass manager..

@fedor.sergeev

I believe in order to make progress here we first need to settle down on a very principal matter -

what kind of IRUnit MachineFunction is?

Okey, everything you said there makes perfect sense. Thanks for clarification.

There are many details to dive in, but first lets work on doing the basics right:

MachineFunctionPassManager
FunctionToMachineFunctionPassAdaptor

This sentence doesn't quite parse for me. Could you please elaborate what you mean here? Which part of the basics specifically?

I mean both should work :)
In particular, MachineFunctionPassManager.
It seems that you just defined a typedef in a hope that it will work... for one you need some tests to verify that.
And my guess is that as soon as you instantiate MachineFunctionPassManager::run you will hit missing interfaces that generic PassManager template refers to.
At least I'm sure you will hit PassInstrumentation ones.

Lets first start with some basic unittests (see llvm/unittests/IR/PassManagerTest.cpp etc).

Aug 12 2019, 9:42 AM · Restricted Project

Aug 8 2019

czhang updated the diff for D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Fix test and formatting.

Aug 8 2019, 6:55 PM · Restricted Project, Restricted Project, Restricted Project

Aug 5 2019

czhang removed a child revision for D62829: [clang-tidy] Check for dynamically initialized statics in headers.: D64189: Allow llc to run passes under the new pass manager one at a time..
Aug 5 2019, 11:11 AM · Restricted Project, Restricted Project, Restricted Project
czhang removed a parent revision for D64189: Allow llc to run passes under the new pass manager one at a time.: D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 5 2019, 11:11 AM · Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 5 2019, 10:10 AM · Restricted Project, Restricted Project, Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 5 2019, 9:39 AM · Restricted Project, Restricted Project, Restricted Project

Aug 2 2019

czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 2 2019, 11:43 AM · Restricted Project, Restricted Project, Restricted Project
czhang updated the diff for D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Be more explicit about -fno-threadsafe-statics

Aug 2 2019, 11:43 AM · Restricted Project, Restricted Project, Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 2 2019, 11:12 AM · Restricted Project, Restricted Project, Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 2 2019, 9:49 AM · Restricted Project, Restricted Project, Restricted Project

Aug 1 2019

czhang added inline comments to D64185: [NewPM] Port FinalizeISel to the new pass manager..
Aug 1 2019, 1:33 PM · Restricted Project
czhang added a comment to D64185: [NewPM] Port FinalizeISel to the new pass manager..

Just because the IR passes made a mess of this doesn't mean the same mistake should be repeated for CodeGen passes. I think the clutter of the pass headers should be sorted away to reduce the mental burden of figuring out which headers should be included by machine passes

Aug 1 2019, 1:27 PM · Restricted Project
czhang added a comment to D64179: [CodeGen] Define an interface for the new pass manager..

I believe in order to make progress here we first need to settle down on a very principal matter -

what kind of IRUnit MachineFunction is?

In particular:

  • how MachineFunction is being produced

MachineFunction is produced from the MachineModuleInfo analysis on Functions.

Aug 1 2019, 1:18 PM · Restricted Project
czhang updated the diff for D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Add example in documentation.

Aug 1 2019, 1:04 PM · Restricted Project, Restricted Project, Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Aug 1 2019, 12:56 PM · Restricted Project, Restricted Project, Restricted Project

Jul 30 2019

czhang updated the diff for D64187: [NewPM] Port the MachineCSE pass to the new PM..

Place machine-cse registration here.

Jul 30 2019, 3:08 PM · Restricted Project
czhang updated the diff for D64185: [NewPM] Port FinalizeISel to the new pass manager..

Fix misplaced machine-cse.

Jul 30 2019, 3:04 PM · Restricted Project
czhang updated the diff for D64183: [NewPM] Port MachineModuleInfo to the new pass manager..

Fixes for nits.

Jul 30 2019, 3:02 PM · Restricted Project
czhang added a comment to D64188: [NewPM] Port the MIR Printing pass to new pass manager..

I'm not familiar with MIR printing usecases, and there are no tests for MIR printer.
Yet if MIR printing pass is to be applied to the Module only then there is no need to make it a MachineFunction pass, just do everything in a single run(Module...) method.

I would expect to see a registration of this pass in PassRegistry.def as a module pass. Perhaps named as print-mir?

Also, this patch should definitely have some dependencies on prior work introducing MachineFunction as IRUnit etc...

Jul 30 2019, 3:02 PM · Restricted Project
czhang added inline comments to D64185: [NewPM] Port FinalizeISel to the new pass manager..
Jul 30 2019, 2:33 PM · Restricted Project
czhang added a parent revision for D64183: [NewPM] Port MachineModuleInfo to the new pass manager.: D64179: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:45 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64183: [NewPM] Port MachineModuleInfo to the new pass manager..
Jul 30 2019, 9:45 AM · Restricted Project
czhang added a parent revision for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager.: D64179: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a parent revision for D64185: [NewPM] Port FinalizeISel to the new pass manager.: D64179: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64185: [NewPM] Port FinalizeISel to the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a parent revision for D64186: [NewPM] Port MachineDominatorTree analysis to the new PM.: D64179: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64187: [NewPM] Port the MachineCSE pass to the new PM..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added a parent revision for D64187: [NewPM] Port the MachineCSE pass to the new PM.: D64179: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:40 AM · Restricted Project
czhang added parent revisions for D64189: Allow llc to run passes under the new pass manager one at a time.: D64188: [NewPM] Port the MIR Printing pass to new pass manager., D64179: [CodeGen] Define an interface for the new pass manager., D62829: [clang-tidy] Check for dynamically initialized statics in headers., D64183: [NewPM] Port MachineModuleInfo to the new pass manager., D64185: [NewPM] Port FinalizeISel to the new pass manager., D64187: [NewPM] Port the MachineCSE pass to the new PM., D64186: [NewPM] Port MachineDominatorTree analysis to the new PM., D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D64185: [NewPM] Port FinalizeISel to the new pass manager.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D64187: [NewPM] Port the MachineCSE pass to the new PM.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D64186: [NewPM] Port MachineDominatorTree analysis to the new PM.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D62829: [clang-tidy] Check for dynamically initialized statics in headers.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project, Restricted Project, Restricted Project
czhang added a child revision for D64183: [NewPM] Port MachineModuleInfo to the new pass manager.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:39 AM · Restricted Project
czhang added a child revision for D64179: [CodeGen] Define an interface for the new pass manager.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:38 AM · Restricted Project
czhang added a child revision for D64188: [NewPM] Port the MIR Printing pass to new pass manager.: D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 30 2019, 9:38 AM · Restricted Project
czhang abandoned D64178: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:38 AM · Restricted Project
czhang abandoned D64180: [CodeGen] Define an interface for the new pass manager..
Jul 30 2019, 9:38 AM · Restricted Project
czhang added a comment to D64188: [NewPM] Port the MIR Printing pass to new pass manager..

Thank you! Phabricator is still a mystery to me.

Jul 30 2019, 9:33 AM · Restricted Project

Jul 29 2019

czhang added a comment to D64179: [CodeGen] Define an interface for the new pass manager..

ping.

Jul 29 2019, 11:59 AM · Restricted Project

Jul 23 2019

czhang added a comment to D64681: Stop IR Dumps occurring after MachineVerifier.

Seems like the same reasoning could apply to any type of immutable pass, not just verifier passes. It seems a little ad-hoc to single out the machine verifier pass for IR dumping. The benefit of treating all immutable passes this way is that one can simply disable printing based on class.

Jul 23 2019, 9:26 AM · Restricted Project

Jul 15 2019

czhang updated the diff for D64183: [NewPM] Port MachineModuleInfo to the new pass manager..

More potential null pointer dereferences. That should be all of them.

Jul 15 2019, 11:54 AM · Restricted Project
czhang updated the diff for D64183: [NewPM] Port MachineModuleInfo to the new pass manager..

Fix potential null pointer derefences.

Jul 15 2019, 10:50 AM · Restricted Project
czhang added reviewers for D64189: Allow llc to run passes under the new pass manager one at a time.: fedor.sergeev, philip.pfaffe, chandlerc.
Jul 15 2019, 10:31 AM · Restricted Project
czhang added reviewers for D64188: [NewPM] Port the MIR Printing pass to new pass manager.: philip.pfaffe, fedor.sergeev, chandlerc.
Jul 15 2019, 10:31 AM · Restricted Project
czhang added reviewers for D64187: [NewPM] Port the MachineCSE pass to the new PM.: fedor.sergeev, chandlerc, philip.pfaffe.
Jul 15 2019, 10:31 AM · Restricted Project
czhang added a comment to D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..

Thanks for reviewing! Since this change is dependent on the first patch in my series fitting the new pass manager in CodeGen here: https://reviews.llvm.org/D64179, would you mind taking a look at that as well? The entire patch series: https://reviews.llvm.org/D63890

Jul 15 2019, 10:31 AM · Restricted Project
czhang retitled D64185: [NewPM] Port FinalizeISel to the new pass manager. from [NewPM] Port ExpandISelPseudos to the new pass manager. to [NewPM] Port FinalizeISel to the new pass manager..
Jul 15 2019, 10:24 AM · Restricted Project
czhang added reviewers for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager.: philip.pfaffe, chandlerc, fedor.sergeev.
Jul 15 2019, 10:24 AM · Restricted Project
czhang added reviewers for D64183: [NewPM] Port MachineModuleInfo to the new pass manager.: fedor.sergeev, philip.pfaffe, chandlerc.
Jul 15 2019, 10:22 AM · Restricted Project
czhang added reviewers for D64179: [CodeGen] Define an interface for the new pass manager.: fedor.sergeev, philip.pfaffe, chandlerc.
Jul 15 2019, 10:22 AM · Restricted Project

Jul 10 2019

czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Jul 10 2019, 2:51 PM · Restricted Project, Restricted Project, Restricted Project
czhang updated the diff for D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Hoist constant initializer check and rebase

Jul 10 2019, 2:46 PM · Restricted Project, Restricted Project, Restricted Project

Jul 9 2019

czhang added inline comments to D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 9 2019, 10:10 AM · Restricted Project
czhang updated the diff for D64188: [NewPM] Port the MIR Printing pass to new pass manager..

Alphabetize

Jul 9 2019, 10:09 AM · Restricted Project
czhang updated the diff for D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..

Rebase

Jul 9 2019, 10:04 AM · Restricted Project
czhang updated the diff for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..

another style comment

Jul 9 2019, 10:03 AM · Restricted Project
czhang updated the diff for D64189: Allow llc to run passes under the new pass manager one at a time..

Rebase

Jul 9 2019, 9:58 AM · Restricted Project
czhang updated the diff for D64188: [NewPM] Port the MIR Printing pass to new pass manager..

Rebase

Jul 9 2019, 9:58 AM · Restricted Project
czhang updated the diff for D64187: [NewPM] Port the MachineCSE pass to the new PM..

Rebase

Jul 9 2019, 9:55 AM · Restricted Project
czhang updated the diff for D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..

Rebase

Jul 9 2019, 9:55 AM · Restricted Project
czhang updated the diff for D64185: [NewPM] Port FinalizeISel to the new pass manager..

Rebase

Jul 9 2019, 9:54 AM · Restricted Project
czhang updated the diff for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..

Rebase & address style comments.

Jul 9 2019, 9:53 AM · Restricted Project
czhang updated the diff for D64183: [NewPM] Port MachineModuleInfo to the new pass manager..

Remove whitespace noise

Jul 9 2019, 9:53 AM · Restricted Project

Jul 8 2019

czhang added a comment to D63890: [CodeGen] First steps at porting CodeGen to new pass manager,.

Patch series rebased. Thanks to @arsenm the test-suite no longer has any failures.

Jul 8 2019, 5:54 PM · Restricted Project
czhang updated the diff for D64188: [NewPM] Port the MIR Printing pass to new pass manager..

rebase & clang-format

Jul 8 2019, 5:53 PM · Restricted Project
czhang updated the diff for D64187: [NewPM] Port the MachineCSE pass to the new PM..

rebase & clang-format

Jul 8 2019, 5:53 PM · Restricted Project
czhang updated the diff for D64189: Allow llc to run passes under the new pass manager one at a time..

rebase & run-new-pass > run-pass-new & clang-format

Jul 8 2019, 5:53 PM · Restricted Project
czhang updated the diff for D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..

rebase & clang-format

Jul 8 2019, 5:53 PM · Restricted Project
czhang updated the diff for D64185: [NewPM] Port FinalizeISel to the new pass manager..

rebase (renamed pass) & clang-format

Jul 8 2019, 5:53 PM · Restricted Project
czhang updated the diff for D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..

rebase & clang-format

Jul 8 2019, 5:49 PM · Restricted Project
czhang updated the diff for D64183: [NewPM] Port MachineModuleInfo to the new pass manager..

rebase & clang-format

Jul 8 2019, 5:49 PM · Restricted Project
czhang updated the diff for D64179: [CodeGen] Define an interface for the new pass manager..

rebase & clang-format

Jul 8 2019, 5:46 PM · Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Jul 8 2019, 10:38 AM · Restricted Project, Restricted Project, Restricted Project

Jul 3 2019

czhang abandoned D63890: [CodeGen] First steps at porting CodeGen to new pass manager,.

This patch has been split up, with follow up work porting more passes (ending with the llc changes needed to actually drive the new PM) here.

Jul 3 2019, 6:42 PM · Restricted Project
czhang created D64189: Allow llc to run passes under the new pass manager one at a time..
Jul 3 2019, 6:39 PM · Restricted Project
czhang created D64188: [NewPM] Port the MIR Printing pass to new pass manager..
Jul 3 2019, 6:38 PM · Restricted Project
czhang created D64187: [NewPM] Port the MachineCSE pass to the new PM..
Jul 3 2019, 6:37 PM · Restricted Project
czhang created D64185: [NewPM] Port FinalizeISel to the new pass manager..
Jul 3 2019, 6:37 PM · Restricted Project
czhang created D64186: [NewPM] Port MachineDominatorTree analysis to the new PM..
Jul 3 2019, 6:37 PM · Restricted Project
czhang created D64183: [NewPM] Port MachineModuleInfo to the new pass manager..
Jul 3 2019, 6:37 PM · Restricted Project
czhang created D64184: [NewPM] Port MachineCopyPropagation to the new pass manager..
Jul 3 2019, 6:37 PM · Restricted Project
czhang abandoned D64182: [CodeGen] Define an interface for the new pass manager..
Jul 3 2019, 6:37 PM · Restricted Project
czhang created D64182: [CodeGen] Define an interface for the new pass manager..
Jul 3 2019, 6:33 PM · Restricted Project
czhang created D64180: [CodeGen] Define an interface for the new pass manager..
Jul 3 2019, 6:30 PM · Restricted Project
czhang created D64179: [CodeGen] Define an interface for the new pass manager..
Jul 3 2019, 6:30 PM · Restricted Project
czhang created D64178: [CodeGen] Define an interface for the new pass manager..
Jul 3 2019, 5:53 PM · Restricted Project

Jun 27 2019

czhang retitled D63890: [CodeGen] First steps at porting CodeGen to new pass manager, from [CodeGen] Define an interface for the new pass manager in CodeGen. to [CodeGen] First steps at porting CodeGen to new pass manager,.
Jun 27 2019, 1:05 PM · Restricted Project
czhang created D63890: [CodeGen] First steps at porting CodeGen to new pass manager,.
Jun 27 2019, 12:59 PM · Restricted Project
czhang added a comment to D62829: [clang-tidy] Check for dynamically initialized statics in headers..

ping

Jun 27 2019, 11:42 AM · Restricted Project, Restricted Project, Restricted Project

Jun 6 2019

czhang added a comment to D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Hmm, but there already is clang's -Wglobal-constructors, that fires on some of these:
https://godbolt.org/z/rSnNuu
You are sure those extra warning this check produces ontop of -Wglobal-constructors are correct?
If so, maybe -Wglobal-constructors should be extended instead?

Jun 6 2019, 4:55 PM · Restricted Project, Restricted Project, Restricted Project
czhang added inline comments to D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Jun 6 2019, 4:20 PM · Restricted Project, Restricted Project, Restricted Project
czhang updated the diff for D62829: [clang-tidy] Check for dynamically initialized statics in headers..

Addressed comments.

Jun 6 2019, 4:18 PM · Restricted Project, Restricted Project, Restricted Project

Jun 3 2019

czhang updated the summary of D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Jun 3 2019, 3:50 PM · Restricted Project, Restricted Project, Restricted Project
czhang created D62829: [clang-tidy] Check for dynamically initialized statics in headers..
Jun 3 2019, 3:49 PM · Restricted Project, Restricted Project, Restricted Project