On Wed, Sep 11, 2013 at 12:29 AM, Andrew Trick <atrick at apple.com> wrote:> > If that is the goal, then you only want the modules for Machine IR, and maybe some core analysis passes. The “Machine” modules you listed above include machine code analysis or transform passes that you probably don’t want. Pruning the list to basic IR support: > >> - MachineBasicBlock >> - MachineBranchProbabilityInfo >> - MachineCodeEmitter >> - MachineDominators >> - MachineFunctionAnalysis >> - MachineFunction >> - MachineFunctionPass >> - MachineFunctionPrinterPass >> - MachineInstrBundle >> - MachineInstr >> - MachineLoopInfo >> - MachineModuleInfo >> - MachineModuleInfoImpls >> - MachinePassRegistry >> - MachinePostDominators >> - MachineRegisterInfo >> - MachineSSAUpdater >> - MachineVerifierThanks for whittling the list down, Andrew. One question that has been nagging at me since I started looking into this is what to do about the dependency on libAnalysis? Some of these classes (eg. MachineFunctionPass are MachineLoopInfo) seem to have a hard dependency on the Pass class in libAnalysis. Is it acceptable to carry this dependency along to the new library? Or should we be aiming to eliminate this dependency like we are with the one on libCodeGen?> Note that Passes.h would need to be provided in include/llvm/Machine so > that targets can configure their pass pipeline. The pass ID’s are extern > declared for use with TargetPassConfig, but are defined as references to > the ID field inside the pass. Those ID’s might all need to live inside > libMachine if you do this. To get the layering right, there would need to be > two libraries in each target, lib<target>Machine for the target description, > and lib<target>Codegen for the pases--but we clearly don’t want this, > hence the Pass ID workaround.Thanks for pointing those out. -Ken
Hi, I did the Pass ID workaround by providing Passes.h in the include/llvm/Machine. But the question which is holding me up is that, as Ken Dyck was kind enough to point out, what should be done to the dependency on libAnalysis? The Machine passes are not only dependent on Passes class but also on others such as the ConstantFolding.h. Is it a possible solution to break this dependency or carry this dependency to the Machine library as well? Regards, Nitish B. -- View this message in context: http://llvm.1065342.n5.nabble.com/Extracting-libmachine-from-libcodegen-bug-1121-tp60984p62500.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Andrew Trick
2013-Nov-06 02:20 UTC
[LLVMdev] Extracting libmachine from libcodegen (bug 1121)
On Oct 27, 2013, at 10:11 PM, Nitish B <bestofnithish at gmail.com> wrote:> Hi, > I did the Pass ID workaround by providing Passes.h in the > include/llvm/Machine. But the question which is holding me up is that, as > Ken Dyck was kind enough to point out, what should be done to the dependency > on libAnalysis? The Machine passes are not only dependent on Passes class > but also on others such as the ConstantFolding.h. Is it a possible solution > to break this dependency or carry this dependency to the Machine library as > well?Ideally, libLLVMMachine should not depend on libLLVMAnalysis. I can understand if you need to do that as an intermediate step. ConstantFolding is not a good reason to do that though. What do people think about moving ConstantFolding into libLLVMCore? Makes sense to me. -Andy
Maybe Matching Threads
- [LLVMdev] Extracting libmachine from libcodegen (bug 1121)
- [LLVMdev] Extracting libmachine from libcodegen (bug 1121)
- [LLVMdev] Extracting libmachine from libcodegen (bug 1121)
- [LLVMdev] Move TargetRegisterInfo and TargetInstrInfo into libCodeGen
- [LLVMdev] Move TargetRegisterInfo and TargetInstrInfo into libCodeGen