In an env that reuses compiler instances for multiple compilations, this
omission results in non-deterministic assembly output (names of the
auto-generated labels) if the order or full set of Modules compiled
varies.
Details
Details
- Reviewers
bogner - Commits
- rG76b0ea7f2d5c: Reset NextFnNum in MachineModuleInfo::initialize
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Probably better to switch all of these to C++11 style default member initializers and remove initialize() entirely. This is obviously correct either way though.
Comment Actions
Oh, the MMI gets reused by the pass - to do this you'd need to also fix finalize() to properly clear these members (and maybe rename it reset() or so instead of tying this to the pass structure so tightly)
Comment Actions
It turns out someone already added C++11 default initializers but they're not used in this case. MachineModuleInfo could use some better commenting about its lifetime so I'll add that in a follow-up at the same time as renaming it