"willreturn" function attribute guarantees a function to come back to the call site. Therefore, this attribute can be used in isGuaranteedToTransferExecutionToSuccessor.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Could you run this with the LLVM test suite [0]?
Do you see a difference in statistics, compile time and/or runtime?
If you don't have a computer to do so, let me know.
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4290 ↗ | (On Diff #204901) | Can you keep and modify the comment instead? There are other possibilities specified to improve this and/or the willreturn deduction. |
I ran LLVM test suite but there was no significant difference in both execution time and runtime.
I want to see stats (NumFnWillReturn and etc.) but I don't know how to gather stats. I ran with TEST_SUITE_COLLECT_STATS=ON but I couldn't merge them. Can you tell me?
I think this looks fine with one request for change: We "decided" to use enum attributes not string attributes (for willreturn and others).
To seem real improvements we might need to use this function more (we will soon in the Attributor). Just to make sure, you enabled the attributor and willreturn deduction for your test, correct?
I think this looks fine with one request for change: We "decided" to use enum attributes not string attributes (for willreturn and others).
I'll fix it.
To seem real improvements we might need to use this function more (we will soon in the Attributor). Just to make sure, you enabled the attributor and willreturn deduction for your test, correct?
Yes. I confirmed in the report that willreturn is actually deduced.