Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-16 Thread Chris Lattner
On Dec 15, 2006, at 6:11 PM, Jeff Cohen wrote: > I got it to work... I'll be committing shortly. I'm not sure what > the problem was, but it seems to have something to do with > resolving the overload of operator<< and almost certainly is a VC++ > bug. It won't accept a forward declared t

[llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Jeff Cohen
Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.41 -> 1.42 MachineBasicBlock.cpp updated: 1.37 -> 1.38 MachineInstr.cpp updated: 1.139 -> 1.140 --- Log message: The best unbreakage yet, addressing Bill's concerns. --- Diffs of the changes: (+30 -49) LiveInterval.cpp

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Jeff Cohen
I got it to work... I'll be committing shortly. I'm not sure what the problem was, but it seems to have something to do with resolving the overload of operator<< and almost certainly is a VC++ bug. It won't accept a forward declared type when it ought to. Chris Lattner wrote: > > On Dec 15, 2

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Chris Lattner
On Dec 15, 2006, at 3:58 PM, Jeff Cohen wrote: > I'll look into making this change. > > Part of the problem is that VC++ doesn't like *OS.stream() in a header > file when isn't included, even if the declaration of > std::basic_ostream shouldn't be needed (but doesn't have a problem > with > it

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Jeff Cohen
I'll look into making this change. Part of the problem is that VC++ doesn't like *OS.stream() in a header file when isn't included, even if the declaration of std::basic_ostream shouldn't be needed (but doesn't have a problem with it in a .cpp file, probably because it isn't inlined then). Th

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Chris Lattner
On Dec 15, 2006, at 3:31 PM, Bill Wendling wrote: > That's reasonable. So then a better solution would be to keep > everything in the .h file, but change operator<<(OStream&) to call > the "print()" function directly. So something like this: > > #include > > // ... > > OStream& operator<<(OStrea

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Bill Wendling
That's reasonable. So then a better solution would be to keep everything in the .h file, but change operator<<(OStream&) to call the "print()" function directly. So something like this: #include // ... OStream& operator<<(OStream &OS, const MachineBasicBlock &MBB) { if (*OS.stream()) MBB

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Jeff Cohen
Chris asked me to not include from header files, and to move stuff out of the header files if possible to make it so. Bill Wendling wrote: > Hold on. If you make these non-inlined, then the only chance for the > compiler to remove potentially dead code (when o.stream() == 0) is > through link

Re: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Bill Wendling
Hold on. If you make these non-inlined, then the only chance for the compiler to remove potentially dead code (when o.stream() == 0) is through link time optimizations. Because this is still compiled by GCC right now, this won't be done and debug outputs will still be in the code. That is,

[llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp MachineBasicBlock.cpp MachineInstr.cpp

2006-12-15 Thread Jeff Cohen
Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.40 -> 1.41 MachineBasicBlock.cpp updated: 1.36 -> 1.37 MachineInstr.cpp updated: 1.138 -> 1.139 --- Log message: An even better unbreakage... --- Diffs of the changes: (+24 -0) LiveInterval.cpp |7 +++ MachineBa