Replace the check of whether a GV has a section with the flag check
in the summary. This is in preparation for using the NoPromote flag
to convey other situations when we can't promote (e.g. locals used in
inline asm).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/Transforms/Utils/FunctionImportUtils.h | ||
---|---|---|
58 ↗ | (On Diff #76163) | Update doc. |
70 ↗ | (On Diff #76163) | Ditto. |
lib/Transforms/Utils/FunctionImportUtils.cpp | ||
206 ↗ | (On Diff #76163) | The flow to initialize the "DoPromote" is very difficult to process / follow here. We should seek some refactoring to make it more readable. |
lib/Transforms/Utils/FunctionImportUtils.cpp | ||
---|---|---|
206 ↗ | (On Diff #76163) | I passed in false here directly, since DoPromote would always be false and that will hopefully be clearer. |
Comment Actions
LGTM.
include/llvm/Transforms/Utils/FunctionImportUtils.h | ||
---|---|---|
44 ↗ | (On Diff #76180) | The name should be "shouldPromoteLocalToGlobal", the "do" added some cognitive load for me to read this patch (I'm not saying that it should be done as part of this patch, but either before or after would be a nice tweak). |
lib/Transforms/Utils/FunctionImportUtils.cpp | ||
70 ↗ | (On Diff #76180) | This SGV->getGUID() is the cause for the "DoPromote" right? |