Printf lowering unconditionally visited every instruction in the module.
To make it faster in the common case where there are no printfs, look up
the printf function (if any) and iterate over its users instead.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 38680 Build 38679: arc lint + arc unit
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | ||
---|---|---|
574–575 | I can add braces of course (just around multi-line constructs, yeah?) but whose rule is that? I don't see it in the coding standards and clang-format didn't add them. | |
575 | I did consider that but the rest of the pass seems to be assuming CallInst, so it didn't seem worth generalizing here. |
LGTM
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | ||
---|---|---|
574–575 | clang-format apparently isn't capable of this. If it were up to me, braces would be include in 100% of contexts. the style guide doesn't actually say anything about this last I checked |
Braces