In include/llvm/ADT/Statistic.h, the identifier “DEBUG_TYPE” is never defined. I’ve noticed it’s defined as different things in a few other header files, including llvm/Analysis/BlockFrequencyInfoImpl.h, llvm/Analysis/RegionInfoImpl.h, llvm/Support/UnicodeCharRanges.h, llvm/Transforms/InstCombine/InstCombineWorkList.h, and llvm/Transforms/Utils/SSAUpdaterImpl.h. Should I edit Statistic.h so that it includes one of those? If so, which one? If not, what should I do? Thanks, Peter Finn
No. DEBUG_TYPE is used for grouping debug output and statistics. The DEBUG_TYPE belongs in the source file. The fact it's in the other headers is suspicious and might be worth checking on. Philip On 07/03/2015 01:09 PM, Peter Finn wrote:> In include/llvm/ADT/Statistic.h, the identifier “DEBUG_TYPE” is never defined. I’ve noticed it’s defined as different things in a few other header files, including llvm/Analysis/BlockFrequencyInfoImpl.h, llvm/Analysis/RegionInfoImpl.h, llvm/Support/UnicodeCharRanges.h, llvm/Transforms/InstCombine/InstCombineWorkList.h, and llvm/Transforms/Utils/SSAUpdaterImpl.h. Should I edit Statistic.h so that it includes one of those? If so, which one? If not, what should I do? > > Thanks, > Peter Finn > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Okay then, how should I define it? Peter Sent from my iPhone> On Jul 3, 2015, at 4:53 PM, Philip Reames <listmail at philipreames.com> wrote: > > No. DEBUG_TYPE is used for grouping debug output and statistics. The DEBUG_TYPE belongs in the source file. The fact it's in the other headers is suspicious and might be worth checking on. > > Philip > >> On 07/03/2015 01:09 PM, Peter Finn wrote: >> In include/llvm/ADT/Statistic.h, the identifier “DEBUG_TYPE” is never defined. I’ve noticed it’s defined as different things in a few other header files, including llvm/Analysis/BlockFrequencyInfoImpl.h, llvm/Analysis/RegionInfoImpl.h, llvm/Support/UnicodeCharRanges.h, llvm/Transforms/InstCombine/InstCombineWorkList.h, and llvm/Transforms/Utils/SSAUpdaterImpl.h. Should I edit Statistic.h so that it includes one of those? If so, which one? If not, what should I do? >> >> Thanks, >> Peter Finn >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
> On 2015-Jul-03, at 13:53, Philip Reames <listmail at philipreames.com> wrote: > > No. DEBUG_TYPE is used for grouping debug output and statistics. The DEBUG_TYPE belongs in the source file. The fact it's in the other headers is suspicious and might be worth checking on.Might be. I think it sometimes makes sense.> Philip > > On 07/03/2015 01:09 PM, Peter Finn wrote: >> In include/llvm/ADT/Statistic.h, the identifier “DEBUG_TYPE” is never defined. I’ve noticed it’s defined as different things in a few other header files, including llvm/Analysis/BlockFrequencyInfoImpl.h,FWIW, this one really is a BFI implementation file: -- $ git grep -l llvm/Analysis/BlockFrequencyInfoImpl.h lib/Analysis/BlockFrequencyInfo.cpp lib/Analysis/BlockFrequencyInfoImpl.cpp lib/CodeGen/MachineBlockFrequencyInfo.cpp -- (Maybe it should get moved to lib/Analysis, and MBFI can access it via a relative path like `../Analysis/`? I'm not clear on the tradeoffs.) It has template functions that want `DEBUG()` statements, and all three want to use `block-freq`. Haven't looked at the others you mentioned, but they could be similar.>> llvm/Analysis/RegionInfoImpl.h, llvm/Support/UnicodeCharRanges.h, llvm/Transforms/InstCombine/InstCombineWorkList.h, and llvm/Transforms/Utils/SSAUpdaterImpl.h. Should I edit Statistic.h so that it includes one of those? If so, which one? If not, what should I do? >> >> Thanks, >> Peter Finn >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- Prefixing DEBUG messages with DEBUG_TYPE (was re: [PATCH] D13259: LLE 6/6: Add LoopLoadElimination pass)
- Prefixing DEBUG messages with DEBUG_TYPE (was re: [PATCH] D13259: LLE 6/6: Add LoopLoadElimination pass)
- [LLVMdev] Assert in BlockFrequency pass
- [LLVMdev] Assert in BlockFrequency pass
- Computing block profile weights