[PATCH] D22666: Frontend: Fix mcount inlining bug
Hal Finkel via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 28 12:12:53 PDT 2016
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
Comments about the comment, but otherwise, LGTM.
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:789
@@ -796,1 +788,3 @@
+ // Since emitting mcount call here impacts optimization phase such as function
+ // inlining, we just mark an attribute to insert a mcount call in backend.
----------------
emitting mcount call -> emitting the mcount call
optimization phase -> optimizations
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:790
@@ +789,3 @@
+ // Since emitting mcount call here impacts optimization phase such as function
+ // inlining, we just mark an attribute to insert a mcount call in backend.
+ // Attribute "counting-function" is set to mcount function name which is
----------------
mark -> add
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:791
@@ +790,3 @@
+ // inlining, we just mark an attribute to insert a mcount call in backend.
+ // Attribute "counting-function" is set to mcount function name which is
+ // architecture dependent, and it is processed by CountingFunctionInserter.
----------------
Attribute -> The attribute
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:792
@@ -797,1 +791,3 @@
+ // Attribute "counting-function" is set to mcount function name which is
+ // architecture dependent, and it is processed by CountingFunctionInserter.
if (CGM.getCodeGenOpts().InstrumentForProfiling)
----------------
remove ", and is processed by CountingFunctionInserter". That's an implementation detail of the backend, which might change, and is irrelevant to the frontend.
https://reviews.llvm.org/D22666
More information about the cfe-commits
mailing list