projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf9964f
)
[Attributor][NFC] Avoid unnecessary string operations
author
Johannes Doerfert
<johannes@jdoerfert.de>
Tue, 7 Feb 2023 14:17:08 +0000
(06:17 -0800)
committer
Joseph Huber
<jhuber6@vols.utk.edu>
Fri, 10 Feb 2023 17:56:09 +0000
(11:56 -0600)
This caused multiple string operations which we don't need if we do not
create a profile.
llvm/lib/Transforms/IPO/Attributor.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/IPO/Attributor.cpp
b/llvm/lib/Transforms/IPO/Attributor.cpp
index
b11b881
..
69cd4e0
100644
(file)
--- a/
llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/
llvm/lib/Transforms/IPO/Attributor.cpp
@@
-2499,9
+2499,9
@@
ChangeStatus Attributor::run() {
}
ChangeStatus Attributor::updateAA(AbstractAttribute &AA) {
- TimeTraceScope TimeScope(
- AA.getName() + std::to_string(AA.getIRPosition().getPositionKind()) +
-
"::updateAA"
);
+ TimeTraceScope TimeScope(
"updateAA", [&]() {
+ return AA.getName() + std::to_string(AA.getIRPosition().getPositionKind());
+
}
);
assert(Phase == AttributorPhase::UPDATE &&
"We can update AA only in the update stage!");