@@ -537,6 +538,9 @@ class SampleContext {
assert(!Name.empty() && "Name is empty");
}
+ SampleContext(ProfileFuncRef Name)
david-xl wrote:
Name ->Func
https://github.com/llvm/llvm-project/pull/66164
@@ -0,0 +1,225 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -1048,27 +1052,29 @@ class FunctionSamples {
};
if (isDeclaration(SymbolMap.lookup(getFuncName( {
// Add to the import list only when it's defined out of module.
- S.insert(getGUID(getName()));
+ S.insert(getGUID());
}
// Import hot Call
@@ -1048,27 +1052,29 @@ class FunctionSamples {
};
if (isDeclaration(SymbolMap.lookup(getFuncName( {
// Add to the import list only when it's defined out of module.
- S.insert(getGUID(getName()));
+ S.insert(getGUID());
}
// Import hot Call
@@ -643,14 +648,11 @@ class SampleContext {
uint64_t getHashCode() const {
if (hasContext())
return hash_value(getContextFrames());
-
-// For non-context function name, use its MD5 as hash value, so that it is
-// consistent with the profile map's key.
-
@@ -0,0 +1,225 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -574,7 +578,7 @@ class SampleContext {
ContextStr = ContextStr.substr(1, ContextStr.size() - 2);
StringRef ContextRemain = ContextStr;
StringRef ChildContext;
-StringRef CalleeName;
+ProfileFuncRef CalleeName;
david-xl wrote:
CalleeName
@@ -0,0 +1,226 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -1048,27 +1052,29 @@ class FunctionSamples {
};
if (isDeclaration(SymbolMap.lookup(getFuncName( {
// Add to the import list only when it's defined out of module.
- S.insert(getGUID(getName()));
+ S.insert(getGUID());
}
// Import hot Call
@@ -715,7 +717,7 @@ class SampleContext {
private:
/// Mangled name of the function.
- StringRef Name;
+ ProfileFuncRef Name;
david-xl wrote:
Name --> Func
https://github.com/llvm/llvm-project/pull/66164
___
cf
@@ -1135,12 +1141,12 @@ class FunctionSamples {
/// translate \p Name in current FunctionSamples into its original name
/// by looking up in the function map GUIDToFuncNameMap.
/// If the original name doesn't exist in the map, return empty StringRef.
- StringRef getFunc
@@ -0,0 +1,225 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -574,7 +578,7 @@ class SampleContext {
ContextStr = ContextStr.substr(1, ContextStr.size() - 2);
StringRef ContextRemain = ContextStr;
StringRef ChildContext;
-StringRef CalleeName;
+ProfileFuncRef CalleeName;
david-xl wrote:
CalleeName
@@ -643,14 +648,11 @@ class SampleContext {
uint64_t getHashCode() const {
if (hasContext())
return hash_value(getContextFrames());
-
-// For non-context function name, use its MD5 as hash value, so that it is
-// consistent with the profile map's key.
-
@@ -0,0 +1,226 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -124,9 +124,27 @@ int __llvm_profile_merge_from_buffer(const char
*ProfileData,
SrcCountersEnd = SrcCountersStart +
Header->NumCounters * __llvm_profile_counter_entry_size();
SrcNameStart = SrcCountersEnd;
- SrcValueProfDataStart =
+ // This is to a
@@ -272,18 +279,26 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const
__llvm_profile_data *DataBegin,
const uint64_t NumCounters =
__llvm_profile_get_num_counters(CountersBegin, CountersEnd);
const uint64_t NamesSize = DebugInfoCorrelate ? 0 : NamesEnd - NamesBegin;
@@ -92,6 +92,19 @@ INSTR_PROF_DATA(const uint16_t, Int16ArrayTy,
NumValueSites[IPVK_Last+1], \
/* INSTR_PROF_DATA end. */
+#ifndef INSTR_PROF_VTABLE_DATA
+#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
+#else
+#define INSTR_PROF_VTABLE_DATA_DEFINED
+#endif
@@ -305,13 +320,24 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const
__llvm_profile_data *DataBegin,
/* Write the profile header. */
ProfDataIOVec IOVec[] = {{&Header, sizeof(__llvm_profile_header), 1, 0}};
+ // printf("Size of profile header is %d\n",
+ // (int)(size
@@ -686,9 +708,11 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
than WIN32 */
#define INSTR_PROF_DATA_COMMON __llvm_prf_data
#define INSTR_PROF_NAME_COMMON __llvm_prf_names
+#define INSTR_PROF_VNAME_COMMON __llvm_prf_vnames
david-xl wrote:
david-xl wrote:
The change looks good to me, but wait for other reviewers to chime in as well.
Also a good idea to run tests with sanitizers on.
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
@@ -1048,27 +1052,29 @@ class FunctionSamples {
};
if (isDeclaration(SymbolMap.lookup(getFuncName( {
// Add to the import list only when it's defined out of module.
- S.insert(getGUID(getName()));
+ S.insert(getGUID());
}
// Import hot Call
@@ -1048,27 +1052,29 @@ class FunctionSamples {
};
if (isDeclaration(SymbolMap.lookup(getFuncName( {
// Add to the import list only when it's defined out of module.
- S.insert(getGUID(getName()));
+ S.insert(getGUID());
}
// Import hot Call
https://github.com/david-xl commented:
Is there a need to have a separate vtable name section? Merging the vtable
names with function name table can make the implementation simpler.
https://github.com/llvm/llvm-project/pull/66825
___
cfe-commits mail
@@ -177,13 +195,22 @@ VALUE_PROF_FUNC_PARAM(uint32_t, CounterIndex,
Type::getInt32Ty(Ctx))
VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0, "indirect call target")
/* For memory intrinsic functions size profiling. */
VALUE_PROF_KIND(IPVK_MemOPSize, 1, "memory intrinsic functions si
https://github.com/david-xl edited
https://github.com/llvm/llvm-project/pull/66825
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl commented:
Is there a need to have a separate vtable name section? Merging the vtable
names with function name table can make the implementation simpler.
https://github.com/llvm/llvm-project/pull/66825
___
cfe-commits mail
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
@@ -0,0 +1,129 @@
+//===--- HashKeyMap.h - Wrapper for maps using hash value key ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -0,0 +1,129 @@
+//===--- HashKeyMap.h - Wrapper for maps using hash value key ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
david-xl wrote:
The performance win depends a lot on value distribution. For large copies,
using SIMD with nontemporal hint is the way to go.
https://github.com/llvm/llvm-project/pull/66825
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -27,10 +27,12 @@ class FileSystem;
struct PGOOptions {
enum PGOAction { NoAction, IRInstr, IRUse, SampleUse };
enum CSPGOAction { NoCSAction, CSIRInstr, CSIRUse };
+ enum class ColdFuncAttr { None, OptSize, MinSize, OptNone };
david-xl wrote:
Even thou
@@ -44,6 +46,7 @@ struct PGOOptions {
std::string MemoryProfile;
PGOAction Action;
CSPGOAction CSAction;
+ ColdFuncAttr ColdType;
david-xl wrote:
ColdType --> ColdOptType
https://github.com/llvm/llvm-project/pull/69030
_
@@ -27,10 +27,12 @@ class FileSystem;
struct PGOOptions {
enum PGOAction { NoAction, IRInstr, IRUse, SampleUse };
enum CSPGOAction { NoCSAction, CSIRInstr, CSIRUse };
+ enum class ColdFuncAttr { None, OptSize, MinSize, OptNone };
david-xl wrote:
None -->
@@ -0,0 +1,65 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -202,6 +202,18 @@ static cl::opt
cl::desc("Path to the profile remapping file."),
cl::Hidden);
+static cl::opt PGOColdFuncAttr(
+"pgo-cold-func-attr", cl::init(PGOOptions::ColdFuncAttr::None), cl::Hidden,
---
@@ -0,0 +1,65 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/david-xl approved this pull request.
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
davidxl added inline comments.
Comment at: clang/test/CodeGen/pr30188.c:3
@@ +2,3 @@
+
+// Check that optimizers are able to optimize the number of loads in the loop.
+// CHECK: load
Can you just do
... | grep load | count 3
Comment at: clang/
davidxl created this revision.
davidxl added reviewers: cfe-commits, bogner, silvas, xur.
See patch-1 for description
http://reviews.llvm.org/D12716
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/Backen
davidxl created this revision.
davidxl added reviewers: bogner, rsmith.
davidxl added subscribers: cfe-commits, llvm-commits.
Herald added subscribers: srhines, danalbert, tberghammer.
With PGO, the instrumented binary needs to dump __llvm_prf_data,
__llvm_prf_cnts, and __llvm_prf_names data sect
davidxl added a comment.
With this patch, 11M bytes (text section) can be shaved off clang build with
instrumentation.
http://reviews.llvm.org/D13319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
davidxl abandoned this revision.
davidxl added a comment.
Will split the patch into 3.
http://reviews.llvm.org/D13319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
davidxl created this revision.
davidxl added reviewers: rsmith, bogner.
davidxl added a subscriber: cfe-commits.
Herald added subscribers: srhines, danalbert, tberghammer.
This is the patch-1. Driver tests are also added. See
http://reviews.llvm.org/D13319 for description.
http://reviews.llvm.or
davidxl removed subscribers: tberghammer, danalbert, srhines.
davidxl updated this revision to Diff 36186.
http://reviews.llvm.org/D13326
Files:
include/clang/Driver/ToolChain.h
lib/Driver/SanitizerArgs.cpp
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib
davidxl updated this revision to Diff 36190.
davidxl added a comment.
fix broken test (by clang-format).
http://reviews.llvm.org/D13326
Files:
include/clang/Driver/ToolChain.h
lib/Driver/SanitizerArgs.cpp
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib
davidxl added a comment.
ThinLTO is a perfectly good term to indicate what it tries to accomplish.
InlineOnly will narrow its scope. For instance, there is no reason why thinLTO
can not do fast summary based WPA in the future.
http://reviews.llvm.org/D11908
_
davidxl updated this revision to Diff 36316.
davidxl added a comment.
I have modified the implementation to not use linker script, so this clang
patch becomes strictly refactoring with NFC. I think it is still a good thing
to have this in so that similar tunings like this can be done in the futu
davidxl added a subscriber: davidxl.
Comment at: include/clang/Driver/Options.td:685
@@ -684,1 +684,3 @@
def fno_lto : Flag<["-"], "fno-lto">, Group;
+def fthinlto : Flag<["-"], "fthinlto">, Flags<[CC1Option]>, Group;
+def fno_thinlto : Flag<["-"], "fno-thinlto">, Group;
davidxl added a subscriber: davidxl.
davidxl added a comment.
In libc++, placement new is used in many places. When selecting the buffer
size for the placed object, it uses the 'actual' size of the buffer including
the padding bytes from alignment, instead of the declared of the buffer. As a
r
davidxl added a comment.
We certainly need a fix without breaking ABI. Is there a ABI conformance test
for libcxx?
http://reviews.llvm.org/D12247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo
davidxl added a comment.
yes -- the intention of Yiran's patch is not to change the size/alignment of
the underlying storage, but to make the original padding space part of the type.
http://reviews.llvm.org/D12247
___
cfe-commits mailing list
cfe-c
davidxl abandoned this revision.
davidxl added a comment.
The refactoring is done by a previous patch already.
http://reviews.llvm.org/D13326
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
davidxl added a comment.
It turns out previous refactoring by another commit only covers half of the
work.
Will update the patch with Justin's comments and commit after testing.
http://reviews.llvm.org/D13326
___
cfe-commits mailing list
cfe-commi
davidxl updated this revision to Diff 38091.
davidxl added a comment.
Updated patch.
http://reviews.llvm.org/D13326
Files:
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
Index: lib/Driver/Tools.cpp
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250994: clang driver toolchain refactoring (authored by
davidxl).
Changed prior to commit:
http://reviews.llvm.org/D13326?vs=38091&id=38092#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13326
Fi
davidxl created this revision.
davidxl added a reviewer: bogner.
davidxl added a subscriber: cfe-commits.
Currently when profile instrumentation is on, the compiler emits a runtime hook
use function (__llvm_profile_runtime_use) for every module that is
instrumented. The generated function refere
davidxl created this revision.
davidxl added reviewers: vsk, silvas.
davidxl added a subscriber: cfe-commits.
Added documentation for %h and %m specifiers. %m specifier which specifies
the number of copies is not documented yet (treated as internal for now)
https://reviews.llvm.org/D22593
File
davidxl updated this revision to Diff 64759.
davidxl added a comment.
Fixed a typo
https://reviews.llvm.org/D22593
Files:
docs/UsersManual.rst
Index: docs/UsersManual.rst
===
--- docs/UsersManual.rst
+++ docs/UsersManual.rst
@@
davidxl added inline comments.
Comment at: docs/UsersManual.rst:1500
@@ +1499,3 @@
+ name. When this specifier is used, the profiler runtime will substitute
``%m``
+ with a unique integer identifier associated with the instrumented binary.
Multiple
+ profiles dumped from
davidxl updated this revision to Diff 64793.
davidxl added a comment.
Addressed review comments.
I still think %4m etc is an advanced feature that needs more explanation. We
can delay that to a later time.
https://reviews.llvm.org/D22593
Files:
docs/UsersManual.rst
Index: docs/UsersManual.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276207: [Profile] Document new profile file name modifiers
(authored by davidxl).
Changed prior to commit:
https://reviews.llvm.org/D22593?vs=64793&id=64794#toc
Repository:
rL LLVM
https://reviews.l
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
Repository:
rL LLVM
https://reviews.llvm.org/D22608
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-b
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276517: [Profile] Use a flag to enable PGO rather than the
profraw filename (authored by davidxl).
Changed prior to commit:
https://reviews.llvm.org/D22608?vs=64812&id=65216#toc
Repository:
rL LLVM
davidxl added inline comments.
Comment at: include/clang/Frontend/CodeGenOptions.h:234
@@ +233,3 @@
+
+ /// \brief Check if IR profile instrumenation is on.
+ bool hasProfileIRInstr() const {
typo: instrumentation
http://reviews.llvm.org/D15829
davidxl created this revision.
davidxl added a reviewer: vsk.
davidxl added subscribers: llvm-commits, cfe-commits.
For compiler generated assignment operator that is not trivial (calling base
class operator=()), Clang FE assign region counters to the function body but
does not emit profile coun
davidxl updated this revision to Diff 47150.
davidxl added a comment.
Updated test case.
Another test case in profile-rt (pending) is : http://reviews.llvm.org/D16974
http://reviews.llvm.org/D16947
Files:
lib/CodeGen/CGClass.cpp
test/Profile/def-assignop.cpp
Index: test/Profile/def-assign
davidxl updated this revision to Diff 47217.
davidxl added a comment.
Simplified test case suggested by Vedant.
http://reviews.llvm.org/D16947
Files:
lib/CodeGen/CGClass.cpp
test/Profile/def-assignop.cpp
Index: test/Profile/def-assignop.cpp
=
davidxl updated this revision to Diff 47239.
davidxl added a comment.
Further simplify tests according to David B's comment.
http://reviews.llvm.org/D16947
Files:
lib/CodeGen/CGClass.cpp
test/Profile/def-assignop.cpp
Index: test/Profile/def-assignop.cpp
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260270: [PGO] Fix issue: explicitly defaulted assignop is
not profiled (authored by davidxl).
Changed prior to commit:
http://reviews.llvm.org/D16947?vs=47239&id=47351#toc
Repository:
rL LLVM
http:/
davidxl added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:150
@@ -149,2 +149,3 @@
- if (!CodeGenOpts.InstrProfileInput.empty()) {
+ if (!CodeGenOpts.hasProfileIRInstr() &&
+ !CodeGenOpts.InstrProfileInput.empty()) {
Better to use if (CodeGe
davidxl added inline comments.
Comment at: include/clang/Frontend/CodeGenOptions.h:83
@@ -82,2 +82,3 @@
enum ProfileInstrKind {
ProfileNoInstr,// No instrumentation.
+ProfileClangInstr, // Clang instrumentation to generate execution counts
Maybe Pr
davidxl added a comment.
Looks good to me -- and it makes the profile-gen and profile-use's cc1 option
handling consistent. Please check with Sean or Justin just in case before
proceeding.
http://reviews.llvm.org/D15829
___
cfe-commits mailing li
davidxl accepted this revision.
davidxl added a reviewer: davidxl.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
http://reviews.llvm.org/D19612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llv
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: lib/CodeGen/CoverageMappingGen.cpp:468
@@ +467,3 @@
+MostRecentLocation == getEndOfFileOrMacro(MostRecentLocation) &&
+isRegionAlreadyAdded(
davidxl added a comment.
Strictly speaking, this patch requires a version bump of the indexed format.
The profile reader also needs to adjust the FunctionHash computation (either
using 0 or simple function hash) based on the version of the profile data.
Check with Justin/vsk to see if it is imp
davidxl added inline comments.
Comment at: lib/CodeGen/CodeGenPGO.cpp:758
@@ -757,1 +757,3 @@
+ if (dyn_cast(ValuePtr))
+return;
Is it the bitcast guaranteed to be already stripped here?
Repository:
rL LLVM
http://reviews.llvm.org/D18636
___
davidxl added inline comments.
Comment at: lib/CodeGen/CodeGenPGO.cpp:791
@@ +790,3 @@
+// Create PGOFuncName meta data.
+llvm::Function *F = ValueSite->getFunction();
+if (!llvm::getPGOFuncNameMetadata(*F))
This may not be the best place do set the da
davidxl added a comment.
I like the direction this patch is going. Will look into details soon.
http://reviews.llvm.org/D19299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
davidxl added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:636
@@ -640,1 +635,3 @@
+ case Builtin::BI__builtin_unpredictable:
case Builtin::BI__builtin_expect: {
+// Always return the first argument. LLVM does not handle these builtins.
Can this
davidxl added inline comments.
Comment at: lib/CodeGen/CodeGenPGO.cpp:47
@@ +46,3 @@
+ // Create PGOFuncName meta data.
+ if (!llvm::getPGOFuncNameMetadata(*Fn))
+llvm::createPGOFuncNameMetadata(*Fn);
This check be folded into the creator. The creator interf
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
http://reviews.llvm.org/D19299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
http://reviews.llvm.org/D18624
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
davidxl added inline comments.
Comment at: include/clang/Driver/Options.td:507
@@ +506,3 @@
+Group, Flags<[DriverOption]>, MetaVarName<"">,
+HelpText<"Set to be the default profile output file (overridden by
LLVM_PROFILE_FILE env var)">;
+def fpgo_apply_EQ : Joined<["-"]
davidxl added a comment.
I should have brought it up earlier, but I forgot.I think a better (and
simpler) proposal is to make -fprofile-generate and -fprofile-use turn on IR
based PGO.
-fprofile-generate and -fprofile-use options were introduced by Diego (cc'ed)
recently for GCC option com
davidxl added a comment.
Please also update user manual: docs/UserManual.rst
Comment at: test/Driver/clang_f_opts.c:90
@@ -89,3 +89,2 @@
// RUN: %clang -### -S -fprofile-instr-generate=file
-fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN
%s
-//
davidxl added inline comments.
Comment at: lib/Driver/Tools.cpp:3596
@@ -3576,3 +3595,3 @@
Args.hasFlag(options::OPT_fprofile_generate,
-options::OPT_fno_profile_instr_generate, false) ||
+options::OPT_fno_profile_generate, false) ||
davidxl accepted this revision.
davidxl added a comment.
lgtm
Repository:
rL LLVM
https://reviews.llvm.org/D21823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
davidxl added a comment.
I think we just need one cc1 option -fprofile-instrument-use-path=<>. An
overloaded setPGOInstrumenter method can peak at the profile header and get the
Profile flavor.
http://reviews.llvm.org/D17737
___
cfe-commits maili
davidxl accepted this revision.
davidxl added a comment.
lgtm
http://reviews.llvm.org/D17737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
101 - 200 of 368 matches
Mail list logo