1/1
taildup-heapallocsite.ll
| | Authored by akhuang on Oct 17 2019, 1:52 PM. Event TimelineHerald added a project: Restricted Project. rnk added inline comments. This revision is now accepted and ready to land. akhuang retitled this revision from Add an instruction marker field to the ExtraInfo in MachineInstrs. to Add a heap alloc site marker field to the ExtraInfo in MachineInstrs.. rnk accepted this revision. rnk added inline comments. This revision was automatically updated to reflect the committed changes. Path | Size |
---|
| | | | | 19 lines | | 62 lines | | | | | | 16 lines | | 2 lines | | 32 lines | | 20 lines | | 153 lines | | | | 7 lines | | 8 lines | | | | 43 lines | | 21 lines | | | | 145 lines |
Commit | Tree | Parents | Author | Summary | Date |
---|
e1c8fb3d7b46 | 7e11001ff106 | b739cc01ae3a | Amy Huang | Add unit tests for MachineInstr extra info and remove assert | Oct 24 2019, 3:04 PM | b739cc01ae3a | 6913d7002ccd | 35d196c7dbf4 | Amy Huang | Clang format | Oct 21 2019, 10:02 AM | 35d196c7dbf4 | 0299885d1fa6 | 52dc406efc71 | Amy Huang | Add an instruction marker field to the ExtraInfo in MachineInstrs. (Show More…) | Oct 16 2019, 4:50 PM |
|
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.