[LLVMdev] DEBUG_TYPE (original) (raw)
Pete Cooper peter_cooper at apple.com
Fri Jul 3 14:20:37 PDT 2015
- Previous message: [LLVMdev] DEBUG_TYPE
- Next message: [LLVMdev] ORC and relocations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sent from my iPhone
On Jul 3, 2015, at 2:05 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
On 2015-Jul-03, at 13:53, Philip Reames <listmail at philipreames.com> wrote: No. DEBUGTYPE is used for grouping debug output and statistics. The DEBUGTYPE 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 “DEBUGTYPE” 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 wantDEBUG()
statements, and all three want to useblock-freq
. Haven't looked at the others you mentioned, but they could be similar. I believe there's also a DEBUG_WITH_TYPE which allows a specific invocation of DEBUG() to use the given type. Perhaps headers should be required to use that and headers shouldn't be allowed to define DEBUG_TYPE?
Pete
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
LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
- Previous message: [LLVMdev] DEBUG_TYPE
- Next message: [LLVMdev] ORC and relocations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]