[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-13 Thread Ellis Hoag via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG800bf8ed29fb: [InstrProf] Attach debug info to counters (authored by ellis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-13 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 394097. ellis added a comment. Rebase and test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-07 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 392576. ellis added a comment. Fix MachO profile dumping code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-07 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added a comment. This change for the profile writer looks good to me! Before signing it off, I'd like to hear any other suggestions or opinions from @davidxl @MaskRay @alanphipps since this is technically the very first change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-07 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 392471. ellis added a comment. Add a proper warning and simplify compiler-rt profile writer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565 Files:

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-05 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingWriter.c:299 + if (DebugInfoCorrelate) { +ProfDataIOVec IOVecData[] = { Should it be down after `__llvm_write_binary_ids` below although it doesn't do anything in general? I

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-03 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 391780. ellis added a comment. Add warning when debug info is missing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-03 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:961 + DB.finalize(); +} + } kyulee wrote: > I think when `-debug-info-correlate` is used without debug info, we should > fail or emit a warning here

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-02 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:961 + DB.finalize(); +} + } I think when `-debug-info-correlate` is used without debug info, we should fail or emit a warning here instead of silently

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-30 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 390855. ellis added a comment. Emit metadata as `ConstantAsMetadata` instead of the more complicated `DIExpression`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-30 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingWriter.c:273 - if (!DataSize) + if (!CountersSize) return 0; kyulee wrote: > Is it no diff change? I wonder if there is a case where `CountersSize` is 0 > but not `DataSize`

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-30 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added inline comments. Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:851 + addString(AnnotationDie, dwarf::DW_AT_const_value, Value->getString()); +else if (const auto *Expr = dyn_cast(ValueOp)) + addConstantValue( It checks an

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-29 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingWriter.c:273 - if (!DataSize) + if (!CountersSize) return 0; Is it no diff change? I wonder if there is a case where `CountersSize` is 0 but not `DataSize` from a value

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-29 Thread Ellis Hoag via Phabricator via cfe-commits
ellis created this revision. Herald added subscribers: ormris, wenlei, hiraditya. ellis edited the summary of this revision. ellis added reviewers: MaskRay, alanphipps, wenlei, kyulee, davidxl. ellis edited the summary of this revision. ellis published this revision for review. Herald added