- It fixes the problem that llvm.trap() not getting the nomerge attribute.
- It sets nomerge flag for the node if the instruction has nomerge arrtibute.
Fixes #53011
Differential D146164
Fix nomerge attribute not working with __builtin_trap(). zequanwu on Mar 15 2023, 1:00 PM. Authored by
Details
Fixes #53011
Diff Detail
Event TimelineComment Actions Since we're touching SelectionDAG, does GlobalISel also need updating?
Comment Actions
Comment Actions FYI: this attribute appears to not work on (at least) x86 and arm currently, because the backend also does some merging: https://godbolt.org/z/d43M83oax
Comment Actions Thanks for reporting it. I'll look into it later.
|
There are 496 calls to Builder.CreateCall in clang's CodeGen. Do they all need this change? If not, how can we be confident we've found all the ones that do? (From a quick check, at least MSVC's __fastfail builtin seems like it would also benefit from this handling.)
Would it be reasonable to make clang's CGBuilder do this for every call instruction we create?