Previously in OpenMPOpt we did not correctly inherit the calling
convention of the callee when creating new OpenMP runtime calls. This
created issues when the calling convention was changed during
GlobalOpt but a new call was creating without the correct calling
convention. This lead to the call being replaced with a poison value in
InstCombine due to undefined behaviour and causing large portions of
the program to be incorrectly eliminated. This patch correctly inherits
the existing calling convention from the callee.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
are there any other createCall calls we might need to update?
llvm/lib/Transforms/IPO/OpenMPOpt.cpp | ||
---|---|---|
3254–3256 | Unrelated: don't we need debug loc here too? |
Comment Actions
There are other locations we should probably include, places where we call CallInst::Create directly.
llvm/lib/Transforms/IPO/OpenMPOpt.cpp | ||
---|---|---|
3254–3256 | Could probably include it. |
Unrelated: don't we need debug loc here too?