Add instruction marker to MachineInstr ExtraInfo. This does almost the
same thing as Pre/PostInstrSymbols, except that it doesn't create a label until
printing instructions. This allows for labels to be put around instructions that
are deleted/duplicated somewhere.
Use this marker to track heap alloc site call instructions.
Also undo the workaround in r375137.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=43479#add_comment
I don't think this map keyed on MachineInstr pointers will do the right thing in the presence of dead code elimination and code duplication.
For dead code elimination, it could have an ABA problem like the SelectionDAG nodes had before, where our solution was to clear the map after codegen. I think MachineInstr addresses can be recycled if a call is deleted and another instruction allocated at the same address.
For code duplication, are you sure this looks up the correct type? I would expect one of the instructions to not be present in here, and return a null DIType. For the taildup-heapallocsite.ll test case that I added, can you make sure that both S_HEAPALLOCSITE records use the same type indices?
I think you can store the DIType directly in the ExtraInfo struct and that will mean we don't need this anymore.