[PATCH] D37933: Prevent InstCombine from miscompiling `operator delete`

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 14:46:55 PDT 2017


davide added a comment.

Side note: instcombine speculates these calls to free using pattern matching.
In my opinion, it shouldn't. Hoisting shouldn't be done in instcombine, and hoisting shouldn't be done on a per-name basis. Presumably, the frontend should attach an attribute to this call to make sure they can be hoisted.
If there's not enough information in the frontend, then the middle-end should compute this information (the attribute) and then some pass should be responsible for the sinking/hoisting.


https://reviews.llvm.org/D37933





More information about the llvm-commits mailing list