pub fn vcode_emit_finish() -> TimingToken
Expand description

VCode emission finalization

Examples found in repository?
src/machinst/buffer.rs (line 1276)
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
    pub fn finish(mut self) -> MachBufferFinalized<Stencil> {
        let _tt = timing::vcode_emit_finish();

        // Do any optimizations on branches at tail of buffer, as if we
        // had bound one last label.
        self.optimize_branches();

        self.finish_emission_maybe_forcing_veneers(false);

        let mut srclocs = self.srclocs;
        srclocs.sort_by_key(|entry| entry.start);

        MachBufferFinalized {
            data: self.data,
            relocs: self.relocs,
            traps: self.traps,
            call_sites: self.call_sites,
            srclocs,
            stack_maps: self.stack_maps,
            unwind_info: self.unwind_info,
        }
    }