This patch fixes another bug found when enabling partial inlining. The partial inliner does not check if the use of the function is a call use or not and blindly replace uses and forces inlining (of the wrong target). It can cause crashes during compile (e.g. with the test case)
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Yes, I was reducing the same. Some comments, but I had the same fix.
Are you running with -O3 or LTO? Where are you putting the inliner?
lib/Transforms/IPO/PartialInlining.cpp | ||
---|---|---|
89 | SmallVector<> maybe? (up to you) | |
96–97 | Is this bit needed? |
llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp | ||
---|---|---|
104 ↗ | (On Diff #96236) | Can you just call Function::hasAddressTaken instead? |
SmallVector<> maybe? (up to you)