This modification of the currently unused inter-procedural constant
propagation pass (IPConstantPropagation) shows how abstract call sites
enable optimization of callback calls alongside direct and indirect
calls. Through minimal changes, mostly dealing with the partial mapping
of callbacks, inter-procedural constant propagation was enabled for
callbacks, e.g., OpenMP runtime calls or pthreads_create.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/IPO/IPConstantPropagation.cpp | ||
---|---|---|
65 ↗ | (On Diff #180708) | "is invalid" probably isn't quite the right wording. Maybe: If we don't understand the use, bail? |
83 ↗ | (On Diff #180708) | Can you explain this bit? I don't understand the intention from the context. Why would it be legal to constant fold a thread dependent constant through a direct callee, but not an indirect callback callee? |
Comment Actions
LGTM w/one required follow up: the fact that callbacks don't have to execute on the same thread was not obvious from the LangRef wording approved. Please tweak wording to spell that out explicitly.