Ideas on compiler performance improvement?


#1

Today I made a really trivial Web server using the new Actix web framework.

extern crate actix_web;

use actix_web::{server, App, HttpRequest, Responder, Result};
use actix_web::http::Method;
use actix_web::fs::NamedFile;

use std::path::PathBuf;
use std::fs::{metadata, create_dir};

fn public_dir(req: HttpRequest) -> impl Responder {
    let r: Result<NamedFile> = (move || {
        let mut p = PathBuf::new();
        p.push("public");
        let p1:PathBuf = req.match_info().query("tail")?;
        p.push(p1);
        Ok(NamedFile::open(p)?)
    })();
    r
}

fn main() -> Result<()> {
    metadata("public")
        .or_else(|_| {
            create_dir("public")?;
            metadata("public")
        })?;

    server::new(|| {
        App::new()
            .resource("/", |r| r.method(Method::GET).f(public_dir))
    })
    .bind("0.0.0.0:3010")
    .expect("Cannot bind to port 3010")
    .run();
    Ok(())
}

Surprisingly this small program takes more than 2 minutes to compile in Raspberry Pi 2.

I wanted to know what makes it so slow so I run the following command:

cargo rustc -- -Ztime-passes -Ztime-llvm-passes -Zhir-stats

Here is what I get:

  time: 0.004; rss: 37MB	parsing

PRE EXPANSION AST STATS

Name                Accumulated Size         Count     Item Size
----------------------------------------------------------------
Mod                               16             1            16
TyParamBound                      40             1            40
Local                             72             3            24
Block                            120             5            24
FnDecl                           144             6            24
Stmt                             208            13            16
Pat                              288             6            48
Ty                               396             9            44
PathSegment                      708            59            12
Item                           1_216             8           152
Expr                           2_880            60            48
----------------------------------------------------------------
Total                          6_088

  time: 0.001; rss: 40MB	garbage collect incremental cache directory
  time: 0.000; rss: 40MB	recursion limit
  time: 0.000; rss: 40MB	crate injection
  time: 0.000; rss: 40MB	plugin loading
  time: 0.000; rss: 40MB	background load prev dep-graph
  time: 0.000; rss: 40MB	plugin registration
    time: 1.744; rss: 130MB	expand crate
    time: 0.000; rss: 130MB	check unused macros
  time: 1.745; rss: 130MB	expansion
  time: 0.000; rss: 130MB	maybe building test harness
  time: 0.000; rss: 130MB	maybe creating a macro crate
  time: 0.000; rss: 130MB	creating allocators

POST EXPANSION AST STATS

Name                Accumulated Size         Count     Item Size
----------------------------------------------------------------
Mod                               16             1            16
TyParamBound                      40             1            40
Local                             72             3            24
Attribute                        120             2            60
Block                            120             5            24
FnDecl                           144             6            24
Stmt                             208            13            16
Pat                              288             6            48
Ty                               396             9            44
PathSegment                      744            62            12
Item                           1_520            10           152
Expr                           2_880            60            48
----------------------------------------------------------------
Total                          6_548

  time: 0.000; rss: 130MB	AST validation
  time: 0.157; rss: 137MB	name resolution
  time: 0.000; rss: 137MB	complete gated feature checking
  time: 0.000; rss: 137MB	blocked while dep-graph loading finishes

HIR STATS

Name                Accumulated Size         Count     Item Size
----------------------------------------------------------------
Mod                               12             1            12
Decl                              36             3            12
TyParamBound                      60             1            60
Local                            108             3            36
FnDecl                           120             6            20
Stmt                             128             8            16
Block                            160             5            32
Arm                              192             8            24
Attribute                        360             6            60
QPath                            660            55            12
Ty                               780            13            60
Pat                            1_056            22            48
Item                           2_108            17           124
PathSegment                    2_148           179            12
Path                           2_600            65            40
Expr                           4_656            97            48
----------------------------------------------------------------
Total                         15_184

  time: 0.006; rss: 138MB	lowering ast -> hir
  time: 0.000; rss: 138MB	early lint checks
  time: 0.005; rss: 138MB	indexing hir
  time: 0.000; rss: 138MB	load query result cache
  time: 0.000; rss: 138MB	looking for entry point
  time: 0.000; rss: 138MB	looking for plugin registrar
  time: 0.000; rss: 138MB	loop checking
  time: 0.001; rss: 148MB	attribute checking
  time: 0.003; rss: 148MB	stability checking
  time: 0.011; rss: 152MB	type collecting
  time: 0.000; rss: 152MB	outlives testing
  time: 0.000; rss: 152MB	impl wf inference
  time: 0.000; rss: 152MB	coherence checking
  time: 0.000; rss: 152MB	variance testing
  time: 0.005; rss: 152MB	wf checking
  time: 0.000; rss: 152MB	item-types checking
  time: 1.453; rss: 195MB	item-bodies checking
  time: 0.089; rss: 196MB	rvalue promotion
  time: 0.005; rss: 196MB	privacy checking
  time: 0.000; rss: 196MB	intrinsic checking
  time: 0.002; rss: 196MB	match checking
  time: 0.000; rss: 196MB	liveness checking
  time: 0.077; rss: 196MB	borrow checking
  time: 0.000; rss: 196MB	MIR borrow checking
  time: 0.000; rss: 196MB	dumping chalk-like clauses
  time: 0.000; rss: 196MB	MIR effect checking
  time: 0.000; rss: 196MB	death checking
  time: 0.000; rss: 196MB	unused lib feature checking
  time: 0.005; rss: 197MB	lint checking
  time: 0.022; rss: 197MB	resolving dependency formats
    time: 0.001; rss: 197MB	write metadata
    time: 10.837; rss: 250MB	monomorphization collection
    time: 0.673; rss: 267MB	codegen unit partitioning
    time: 0.000; rss: 267MB	write allocator module
    time: 0.108; rss: 273MB	llvm function passes [3ayaeypdcro9d6yk]
    time: 0.043; rss: 273MB	llvm module passes [3ayaeypdcro9d6yk]
    time: 0.108; rss: 279MB	llvm function passes [1im38lueib99jsk0]
    time: 0.054; rss: 279MB	llvm module passes [1im38lueib99jsk0]
    time: 0.169; rss: 284MB	llvm function passes [9elsx31vb4it187]
    time: 0.042; rss: 285MB	llvm module passes [9elsx31vb4it187]
    time: 3.594; rss: 286MB	codegen passes [3ayaeypdcro9d6yk]
    time: 0.055; rss: 285MB	llvm function passes [1e7rzgou8tyd0y10]
    time: 0.023; rss: 285MB	llvm module passes [1e7rzgou8tyd0y10]
    time: 3.455; rss: 289MB	codegen passes [1im38lueib99jsk0]
    time: 0.074; rss: 288MB	llvm function passes [2z2zpz0san1zs1ms]
    time: 0.023; rss: 288MB	llvm module passes [2z2zpz0san1zs1ms]
    time: 2.517; rss: 290MB	codegen passes [1e7rzgou8tyd0y10]
    time: 0.057; rss: 288MB	llvm function passes [4avfh8a54f1c8k6m]
    time: 0.021; rss: 288MB	llvm module passes [4avfh8a54f1c8k6m]
    time: 4.112; rss: 290MB	codegen passes [9elsx31vb4it187]
    time: 0.146; rss: 287MB	llvm function passes [16u6js6g0l3k1ic6]
    time: 0.029; rss: 288MB	llvm module passes [16u6js6g0l3k1ic6]
    time: 2.696; rss: 288MB	codegen passes [2z2zpz0san1zs1ms]
    time: 0.071; rss: 287MB	llvm function passes [4do4hw5xda3frguk]
    time: 0.033; rss: 287MB	llvm module passes [4do4hw5xda3frguk]
    time: 1.907; rss: 288MB	codegen passes [4avfh8a54f1c8k6m]
    time: 0.043; rss: 287MB	llvm function passes [3qeiqh1t9h813iml]
    time: 0.017; rss: 287MB	llvm module passes [3qeiqh1t9h813iml]
    time: 1.714; rss: 291MB	codegen passes [3qeiqh1t9h813iml]
    time: 0.069; rss: 289MB	llvm function passes [54zsfc7sp7jyb1vn]
    time: 0.016; rss: 289MB	llvm module passes [54zsfc7sp7jyb1vn]
    time: 2.558; rss: 290MB	codegen passes [4do4hw5xda3frguk]
    time: 0.047; rss: 288MB	llvm function passes [1wpg2ruh59v7sg9j]
    time: 0.027; rss: 288MB	llvm module passes [1wpg2ruh59v7sg9j]
    time: 4.547; rss: 292MB	codegen passes [16u6js6g0l3k1ic6]
    time: 0.063; rss: 290MB	llvm function passes [2epeb27wvrjbfq36]
    time: 0.023; rss: 290MB	llvm module passes [2epeb27wvrjbfq36]
    time: 1.645; rss: 290MB	codegen passes [1wpg2ruh59v7sg9j]
    time: 0.051; rss: 290MB	llvm function passes [pfj81dp1ipe0hwf]
    time: 0.030; rss: 290MB	llvm module passes [pfj81dp1ipe0hwf]
    time: 2.199; rss: 291MB	codegen passes [54zsfc7sp7jyb1vn]
    time: 0.058; rss: 291MB	llvm function passes [vpbpnff9uk7ha66]
    time: 0.023; rss: 291MB	llvm module passes [vpbpnff9uk7ha66]
    time: 1.970; rss: 292MB	codegen passes [2epeb27wvrjbfq36]
    time: 1.845; rss: 291MB	codegen passes [pfj81dp1ipe0hwf]
    time: 0.113; rss: 290MB	llvm function passes [4ypvbwho0bu5tnww]
    time: 0.022; rss: 290MB	llvm module passes [4ypvbwho0bu5tnww]
    time: 1.534; rss: 291MB	codegen passes [vpbpnff9uk7ha66]
    time: 0.039; rss: 291MB	llvm function passes [3wta9ctgdrpkmlpr]
    time: 0.008; rss: 291MB	llvm module passes [3wta9ctgdrpkmlpr]
    time: 0.047; rss: 292MB	llvm function passes [m547aoa8mvf7y83]
    time: 0.012; rss: 292MB	llvm module passes [m547aoa8mvf7y83]
    time: 0.944; rss: 293MB	codegen passes [3wta9ctgdrpkmlpr]
    time: 0.029; rss: 292MB	llvm function passes [t4hfrtkfqt17y2z]
    time: 0.012; rss: 292MB	llvm module passes [t4hfrtkfqt17y2z]
    time: 1.637; rss: 293MB	codegen passes [m547aoa8mvf7y83]
    time: 1.125; rss: 292MB	codegen passes [t4hfrtkfqt17y2z]
    time: 0.043; rss: 292MB	llvm function passes [3ah7z1jggairdm79]
    time: 0.015; rss: 292MB	llvm module passes [3ah7z1jggairdm79]
    time: 0.045; rss: 292MB	llvm function passes [1u6mxbnlimtx2dbg]
    time: 0.016; rss: 292MB	llvm module passes [1u6mxbnlimtx2dbg]
    time: 3.886; rss: 294MB	codegen passes [4ypvbwho0bu5tnww]
    time: 0.041; rss: 293MB	llvm function passes [3l7ef6u6r09mzrs3]
    time: 1.225; rss: 292MB	codegen passes [3ah7z1jggairdm79]
    time: 0.089; rss: 292MB	llvm module passes [3l7ef6u6r09mzrs3]
    time: 0.033; rss: 292MB	llvm function passes [4wwcxtjjr60lahsa]
    time: 0.011; rss: 292MB	llvm module passes [4wwcxtjjr60lahsa]
    time: 1.462; rss: 293MB	codegen passes [1u6mxbnlimtx2dbg]
    time: 0.749; rss: 293MB	codegen passes [4wwcxtjjr60lahsa]
    time: 0.105; rss: 291MB	llvm function passes [4yh8x2b62dcih00t]
    time: 0.027; rss: 291MB	llvm module passes [4yh8x2b62dcih00t]
    time: 0.024; rss: 291MB	llvm function passes [1rnt618l5epcaf5a]
    time: 0.007; rss: 291MB	llvm module passes [1rnt618l5epcaf5a]
    time: 1.576; rss: 292MB	codegen passes [3l7ef6u6r09mzrs3]
    time: 0.040; rss: 289MB	llvm function passes [1zmw044vi5ql5ynv]
    time: 0.089; rss: 289MB	llvm module passes [1zmw044vi5ql5ynv]
    time: 0.903; rss: 291MB	codegen passes [1rnt618l5epcaf5a]
    time: 0.051; rss: 291MB	llvm function passes [49a7n47po4ttqjl7]
    time: 0.038; rss: 291MB	llvm module passes [49a7n47po4ttqjl7]
    time: 1.002; rss: 294MB	codegen passes [49a7n47po4ttqjl7]
    time: 1.614; rss: 293MB	codegen passes [1zmw044vi5ql5ynv]
    time: 0.042; rss: 292MB	llvm function passes [3iac7qosq7cdj7ze]
    time: 0.021; rss: 292MB	llvm function passes [5i9q6t42804mh8w]
    time: 0.005; rss: 292MB	llvm module passes [5i9q6t42804mh8w]
    time: 0.025; rss: 292MB	llvm module passes [3iac7qosq7cdj7ze]
    time: 2.997; rss: 293MB	codegen passes [4yh8x2b62dcih00t]
    time: 0.031; rss: 291MB	llvm function passes [4i8p38gfz91qqzof]
    time: 0.011; rss: 291MB	llvm module passes [4i8p38gfz91qqzof]
    time: 0.697; rss: 292MB	codegen passes [5i9q6t42804mh8w]
    time: 0.037; rss: 291MB	llvm function passes [pqmjx25qpxkduz7]
    time: 0.012; rss: 291MB	llvm module passes [pqmjx25qpxkduz7]
    time: 1.323; rss: 292MB	codegen passes [3iac7qosq7cdj7ze]
    time: 0.028; rss: 292MB	llvm function passes [ik2rilm329dy28u]
    time: 0.015; rss: 292MB	llvm module passes [ik2rilm329dy28u]
    time: 1.006; rss: 293MB	codegen passes [4i8p38gfz91qqzof]
    time: 0.020; rss: 292MB	llvm function passes [n847vnkjamrby94]
    time: 0.005; rss: 292MB	llvm module passes [n847vnkjamrby94]
    time: 1.057; rss: 292MB	codegen passes [pqmjx25qpxkduz7]
    time: 0.042; rss: 292MB	llvm function passes [63mmpc50mjcb0lb]
    time: 0.038; rss: 292MB	llvm module passes [63mmpc50mjcb0lb]
    time: 0.880; rss: 293MB	codegen passes [ik2rilm329dy28u]
    time: 0.698; rss: 292MB	codegen passes [n847vnkjamrby94]
    time: 0.026; rss: 291MB	llvm function passes [1aj47m1b0rduvv7b]
    time: 0.007; rss: 291MB	llvm module passes [1aj47m1b0rduvv7b]
    time: 0.029; rss: 292MB	llvm function passes [2w6xsa2hbi53xhak]
    time: 0.008; rss: 292MB	llvm module passes [2w6xsa2hbi53xhak]
    time: 1.068; rss: 292MB	codegen passes [63mmpc50mjcb0lb]
    time: 0.028; rss: 292MB	llvm function passes [og01rbiopm1cu8i]
    time: 0.012; rss: 292MB	llvm module passes [og01rbiopm1cu8i]
    time: 0.897; rss: 292MB	codegen passes [1aj47m1b0rduvv7b]
    time: 0.938; rss: 292MB	codegen passes [2w6xsa2hbi53xhak]
    time: 0.717; rss: 292MB	codegen passes [og01rbiopm1cu8i]
    time: 0.069; rss: 293MB	llvm function passes [e19kx9t7xhzajfl]
    time: 0.010; rss: 293MB	llvm module passes [e19kx9t7xhzajfl]
    time: 0.368; rss: 293MB	llvm function passes [1y16o1qfye96o7m0]
    time: 0.116; rss: 293MB	llvm module passes [1y16o1qfye96o7m0]
    time: 0.021; rss: 293MB	llvm function passes [33sllueens23fmze]
    time: 0.014; rss: 293MB	llvm module passes [33sllueens23fmze]
    time: 0.898; rss: 293MB	codegen passes [e19kx9t7xhzajfl]
    time: 0.029; rss: 294MB	llvm function passes [44jzh8v98s38kfp1]
    time: 0.009; rss: 294MB	llvm module passes [44jzh8v98s38kfp1]
    time: 0.662; rss: 294MB	codegen passes [33sllueens23fmze]
    time: 0.035; rss: 293MB	llvm function passes [z9ox7biyn1otfln]
    time: 0.010; rss: 293MB	llvm module passes [z9ox7biyn1otfln]
    time: 0.782; rss: 294MB	codegen passes [44jzh8v98s38kfp1]
    time: 0.025; rss: 294MB	llvm function passes [3vh9336q333cfjhr]
    time: 0.011; rss: 294MB	llvm module passes [3vh9336q333cfjhr]
    time: 0.938; rss: 295MB	codegen passes [z9ox7biyn1otfln]
    time: 0.620; rss: 295MB	codegen passes [3vh9336q333cfjhr]
    time: 0.032; rss: 294MB	llvm function passes [1a9wsvye4qeh5apm]
    time: 0.011; rss: 294MB	llvm module passes [1a9wsvye4qeh5apm]
    time: 0.035; rss: 296MB	llvm function passes [45pc7c65foh9i35f]
    time: 0.007; rss: 296MB	llvm module passes [45pc7c65foh9i35f]
    time: 0.891; rss: 297MB	codegen passes [1a9wsvye4qeh5apm]
    time: 0.020; rss: 296MB	llvm function passes [3ysg602ly0el3m63]
    time: 0.007; rss: 296MB	llvm module passes [3ysg602ly0el3m63]
    time: 0.927; rss: 297MB	codegen passes [45pc7c65foh9i35f]
    time: 0.029; rss: 296MB	llvm function passes [3u743tclnbsnk7zp]
    time: 0.020; rss: 296MB	llvm module passes [3u743tclnbsnk7zp]
    time: 0.692; rss: 297MB	codegen passes [3ysg602ly0el3m63]
    time: 0.016; rss: 296MB	llvm function passes [47dqcamjlp23ma80]
    time: 0.005; rss: 296MB	llvm module passes [47dqcamjlp23ma80]
    time: 0.471; rss: 297MB	codegen passes [47dqcamjlp23ma80]
    time: 0.018; rss: 297MB	llvm function passes [r5omkko2zyx5xap]
    time: 0.005; rss: 297MB	llvm module passes [r5omkko2zyx5xap]
    time: 0.789; rss: 297MB	codegen passes [3u743tclnbsnk7zp]
    time: 0.016; rss: 296MB	llvm function passes [5205e1onhko1v9bb]
    time: 0.005; rss: 296MB	llvm module passes [5205e1onhko1v9bb]
    time: 0.674; rss: 296MB	codegen passes [r5omkko2zyx5xap]
    time: 0.052; rss: 297MB	llvm function passes [3oqznv5oym7l3m4e]
    time: 0.013; rss: 297MB	llvm module passes [3oqznv5oym7l3m4e]
    time: 0.627; rss: 297MB	codegen passes [5205e1onhko1v9bb]
    time: 0.018; rss: 297MB	llvm function passes [1e698527iprj2v8f]
    time: 0.006; rss: 297MB	llvm module passes [1e698527iprj2v8f]
    time: 0.624; rss: 298MB	codegen passes [1e698527iprj2v8f]
    time: 0.024; rss: 298MB	llvm function passes [4j9vzo6uszl0ad8r]
    time: 0.006; rss: 298MB	llvm module passes [4j9vzo6uszl0ad8r]
    time: 0.929; rss: 299MB	codegen passes [3oqznv5oym7l3m4e]
    time: 0.016; rss: 298MB	llvm function passes [2b24hho08cq4aukg]
    time: 0.010; rss: 298MB	llvm module passes [2b24hho08cq4aukg]
    time: 0.446; rss: 298MB	codegen passes [2b24hho08cq4aukg]
    time: 0.022; rss: 298MB	llvm function passes [2jqywn86b2gsqohu]
    time: 0.005; rss: 298MB	llvm module passes [2jqywn86b2gsqohu]
    time: 0.798; rss: 298MB	codegen passes [4j9vzo6uszl0ad8r]
    time: 0.015; rss: 298MB	llvm function passes [4us7tkktbggereb2]
    time: 0.005; rss: 298MB	llvm module passes [4us7tkktbggereb2]
    time: 0.012; rss: 298MB	llvm function passes [4b0rseqhn6u1s2ea]
    time: 0.004; rss: 298MB	llvm module passes [4b0rseqhn6u1s2ea]
    time: 0.505; rss: 300MB	codegen passes [2jqywn86b2gsqohu]
    time: 0.568; rss: 299MB	codegen passes [4us7tkktbggereb2]
    time: 0.012; rss: 297MB	llvm function passes [2v7n9pbfhhkz7toe]
    time: 0.004; rss: 297MB	llvm module passes [2v7n9pbfhhkz7toe]
    time: 0.363; rss: 298MB	codegen passes [4b0rseqhn6u1s2ea]
    time: 0.012; rss: 298MB	llvm function passes [4p9o0qx09p8j383i]
    time: 0.002; rss: 298MB	llvm module passes [4p9o0qx09p8j383i]
    time: 0.241; rss: 299MB	codegen passes [2v7n9pbfhhkz7toe]
    time: 0.019; rss: 298MB	llvm function passes [5f5jc0oo6c9dh2oo]
    time: 0.006; rss: 298MB	llvm module passes [5f5jc0oo6c9dh2oo]
    time: 0.430; rss: 299MB	codegen passes [4p9o0qx09p8j383i]
    time: 0.022; rss: 299MB	llvm function passes [6uqu2rdchdi02t1]
    time: 0.006; rss: 299MB	llvm module passes [6uqu2rdchdi02t1]
    time: 0.434; rss: 299MB	codegen passes [5f5jc0oo6c9dh2oo]
    time: 0.009; rss: 299MB	llvm function passes [v2k8nd5hir4pd8n]
    time: 0.004; rss: 299MB	llvm module passes [v2k8nd5hir4pd8n]
    time: 0.279; rss: 299MB	codegen passes [v2k8nd5hir4pd8n]
    time: 0.016; rss: 299MB	llvm function passes [4j8ah6ajvhc7l0d6]
    time: 0.003; rss: 299MB	llvm module passes [4j8ah6ajvhc7l0d6]
    time: 0.644; rss: 301MB	codegen passes [6uqu2rdchdi02t1]
    time: 0.010; rss: 300MB	llvm function passes [2qttctn0wcix5x2]
    time: 0.007; rss: 300MB	llvm module passes [2qttctn0wcix5x2]
    time: 0.281; rss: 300MB	codegen passes [2qttctn0wcix5x2]
    time: 0.479; rss: 300MB	codegen passes [4j8ah6ajvhc7l0d6]
    time: 0.023; rss: 300MB	llvm function passes [35a0x8f7rhy3adti]
    time: 0.016; rss: 300MB	llvm module passes [35a0x8f7rhy3adti]
    time: 0.021; rss: 301MB	llvm function passes [4vw2nfr4flvkrd36]
    time: 0.005; rss: 301MB	llvm module passes [4vw2nfr4flvkrd36]
    time: 0.698; rss: 302MB	codegen passes [35a0x8f7rhy3adti]
    time: 0.012; rss: 300MB	llvm function passes [1o80id2q0u32107p]
    time: 0.004; rss: 300MB	llvm module passes [1o80id2q0u32107p]
    time: 0.536; rss: 302MB	codegen passes [4vw2nfr4flvkrd36]
    time: 0.012; rss: 301MB	llvm function passes [2monnrckozedkjr1]
    time: 0.004; rss: 301MB	llvm module passes [2monnrckozedkjr1]
    time: 0.310; rss: 301MB	codegen passes [1o80id2q0u32107p]
    time: 0.011; rss: 301MB	llvm function passes [2alhsodu732zefx5]
    time: 0.004; rss: 301MB	llvm module passes [2alhsodu732zefx5]
    time: 0.323; rss: 301MB	codegen passes [2monnrckozedkjr1]
    time: 0.015; rss: 301MB	llvm function passes [4f1paai8aokjf4ti]
    time: 0.011; rss: 301MB	llvm module passes [4f1paai8aokjf4ti]
    time: 0.350; rss: 302MB	codegen passes [2alhsodu732zefx5]
    time: 0.012; rss: 301MB	llvm function passes [kszai26leddh1lg]
    time: 0.004; rss: 301MB	llvm module passes [kszai26leddh1lg]
    time: 0.346; rss: 301MB	codegen passes [4f1paai8aokjf4ti]
    time: 0.011; rss: 301MB	llvm function passes [31e9u5rfx4qypy0b]
    time: 0.010; rss: 301MB	llvm module passes [31e9u5rfx4qypy0b]
    time: 0.380; rss: 301MB	codegen passes [kszai26leddh1lg]
    time: 0.029; rss: 301MB	llvm function passes [4qmekq0j2coeneu7]
    time: 0.008; rss: 301MB	llvm module passes [4qmekq0j2coeneu7]
    time: 0.402; rss: 301MB	codegen passes [31e9u5rfx4qypy0b]
    time: 0.008; rss: 301MB	llvm function passes [5fvsz8m06l59jdgq]
    time: 0.005; rss: 301MB	llvm module passes [5fvsz8m06l59jdgq]
    time: 0.232; rss: 302MB	codegen passes [5fvsz8m06l59jdgq]
    time: 0.019; rss: 303MB	llvm function passes [1fxq14vrn4hmbyv6]
    time: 0.006; rss: 303MB	llvm module passes [1fxq14vrn4hmbyv6]
    time: 0.639; rss: 306MB	codegen passes [4qmekq0j2coeneu7]
    time: 0.018; rss: 306MB	llvm function passes [8xzrsc1ux72v29j]
    time: 0.003; rss: 306MB	llvm module passes [8xzrsc1ux72v29j]
    time: 0.507; rss: 309MB	codegen passes [1fxq14vrn4hmbyv6]
    time: 0.017; rss: 309MB	llvm function passes [4rvqg4qxotbg9oin]
    time: 0.003; rss: 309MB	llvm module passes [4rvqg4qxotbg9oin]
    time: 0.415; rss: 309MB	codegen passes [8xzrsc1ux72v29j]
    time: 0.009; rss: 309MB	llvm function passes [4f5ymw06a6pp6ky8]
    time: 0.003; rss: 309MB	llvm module passes [4f5ymw06a6pp6ky8]
    time: 12.364; rss: 299MB	codegen passes [1y16o1qfye96o7m0]
    time: 0.227; rss: 298MB	codegen passes [4f5ymw06a6pp6ky8]
    time: 0.015; rss: 298MB	llvm function passes [1xv9cup0b7gi43fd]
    time: 0.003; rss: 298MB	llvm module passes [1xv9cup0b7gi43fd]
    time: 0.440; rss: 298MB	codegen passes [4rvqg4qxotbg9oin]
    time: 0.009; rss: 297MB	llvm function passes [572s75j4mn6jrd9p]
    time: 0.009; rss: 298MB	llvm module passes [572s75j4mn6jrd9p]
    time: 0.007; rss: 298MB	llvm function passes [267350d7deu1hz85]
    time: 0.002; rss: 298MB	llvm module passes [267350d7deu1hz85]
    time: 0.357; rss: 298MB	codegen passes [1xv9cup0b7gi43fd]
    time: 0.008; rss: 296MB	llvm function passes [2lyh15q6cjwzy18c]
    time: 0.002; rss: 296MB	llvm module passes [2lyh15q6cjwzy18c]
    time: 0.213; rss: 296MB	codegen passes [267350d7deu1hz85]
    time: 0.010; rss: 296MB	llvm function passes [3ik0x0hz6l66cx38]
    time: 0.003; rss: 296MB	llvm module passes [3ik0x0hz6l66cx38]
    time: 0.383; rss: 296MB	codegen passes [572s75j4mn6jrd9p]
    time: 0.241; rss: 296MB	codegen passes [2lyh15q6cjwzy18c]
    time: 0.014; rss: 296MB	llvm function passes [4j44pcbpewgm1elw]
    time: 0.219; rss: 296MB	codegen passes [3ik0x0hz6l66cx38]
    time: 0.019; rss: 296MB	llvm module passes [4j44pcbpewgm1elw]
    time: 0.015; rss: 296MB	llvm function passes [43v6g0y2xsxoggnt]
    time: 0.003; rss: 296MB	llvm module passes [43v6g0y2xsxoggnt]
    time: 0.269; rss: 297MB	codegen passes [4j44pcbpewgm1elw]
    time: 0.009; rss: 297MB	llvm function passes [57k06xfugllsc526]
    time: 0.003; rss: 296MB	llvm module passes [57k06xfugllsc526]
    time: 0.008; rss: 296MB	llvm function passes [1ryjcgqbxvflkf53]
    time: 0.004; rss: 296MB	llvm module passes [1ryjcgqbxvflkf53]
    time: 0.233; rss: 296MB	codegen passes [57k06xfugllsc526]
    time: 0.390; rss: 297MB	codegen passes [43v6g0y2xsxoggnt]
    time: 0.245; rss: 297MB	codegen passes [1ryjcgqbxvflkf53]
    time: 0.013; rss: 297MB	llvm function passes [3rf6apwr5rc5zixx]
    time: 0.002; rss: 297MB	llvm module passes [3rf6apwr5rc5zixx]
    time: 0.014; rss: 298MB	llvm function passes [yip03rcxnrfbwoq]
    time: 0.002; rss: 298MB	llvm module passes [yip03rcxnrfbwoq]
    time: 0.310; rss: 298MB	codegen passes [3rf6apwr5rc5zixx]
    time: 0.009; rss: 297MB	llvm function passes [3171x0bwu82dptu7]
    time: 0.001; rss: 297MB	llvm module passes [3171x0bwu82dptu7]
    time: 0.007; rss: 298MB	llvm function passes [3i1lvh2a7ywnogc]
    time: 0.003; rss: 298MB	llvm module passes [3i1lvh2a7ywnogc]
    time: 0.303; rss: 298MB	codegen passes [yip03rcxnrfbwoq]
    time: 0.180; rss: 298MB	codegen passes [3171x0bwu82dptu7]
    time: 0.184; rss: 297MB	codegen passes [3i1lvh2a7ywnogc]
    time: 0.010; rss: 297MB	llvm function passes [kprgsqsx7ftbhmo]
    time: 0.001; rss: 297MB	llvm module passes [kprgsqsx7ftbhmo]
    time: 0.011; rss: 297MB	llvm function passes [48ht9xid9pqidlrb]
    time: 0.005; rss: 297MB	llvm module passes [48ht9xid9pqidlrb]
    time: 0.005; rss: 298MB	llvm function passes [19e0lo1q53gb9pi2]
    time: 0.003; rss: 298MB	llvm module passes [19e0lo1q53gb9pi2]
    time: 0.255; rss: 298MB	codegen passes [kprgsqsx7ftbhmo]
    time: 0.102; rss: 297MB	codegen passes [19e0lo1q53gb9pi2]
    time: 0.243; rss: 297MB	codegen passes [48ht9xid9pqidlrb]
    time: 0.012; rss: 297MB	llvm function passes [289xy36ov65dlp20]
    time: 0.002; rss: 297MB	llvm module passes [289xy36ov65dlp20]
    time: 0.013; rss: 297MB	llvm function passes [3x1tbjhs11z8cd0u]
    time: 0.004; rss: 298MB	llvm module passes [3x1tbjhs11z8cd0u]
    time: 0.301; rss: 298MB	codegen passes [289xy36ov65dlp20]
    time: 0.006; rss: 297MB	llvm function passes [1s3socv0drccut20]
    time: 0.002; rss: 297MB	llvm module passes [1s3socv0drccut20]
    time: 0.004; rss: 297MB	llvm function passes [3u0ivuk8dvjdh8cj]
    time: 0.002; rss: 297MB	llvm module passes [3u0ivuk8dvjdh8cj]
    time: 0.172; rss: 297MB	codegen passes [1s3socv0drccut20]
    time: 0.008; rss: 295MB	llvm function passes [2ceiqq9qy0zs723u]
    time: 0.010; rss: 296MB	llvm module passes [2ceiqq9qy0zs723u]
    time: 0.169; rss: 296MB	codegen passes [3u0ivuk8dvjdh8cj]
    time: 0.004; rss: 296MB	llvm function passes [y08g5q2x813c4wx]
    time: 0.002; rss: 296MB	llvm module passes [y08g5q2x813c4wx]
    time: 0.335; rss: 297MB	codegen passes [3x1tbjhs11z8cd0u]
    time: 0.007; rss: 296MB	llvm function passes [2oiwwqohid6mabhc]
    time: 0.002; rss: 296MB	llvm module passes [2oiwwqohid6mabhc]
    time: 0.123; rss: 296MB	codegen passes [y08g5q2x813c4wx]
    time: 0.005; rss: 296MB	llvm function passes [2ukjh4ph10y7sc82]
    time: 0.003; rss: 296MB	llvm module passes [2ukjh4ph10y7sc82]
    time: 0.222; rss: 296MB	codegen passes [2ceiqq9qy0zs723u]
    time: 0.004; rss: 296MB	llvm function passes [28sq7p7uykf2zhlc]
    time: 0.001; rss: 296MB	llvm module passes [28sq7p7uykf2zhlc]
    time: 0.170; rss: 296MB	codegen passes [2oiwwqohid6mabhc]
    time: 0.004; rss: 296MB	llvm function passes [1o6b1la7g4jnv39b]
    time: 0.001; rss: 296MB	llvm module passes [1o6b1la7g4jnv39b]
    time: 0.119; rss: 296MB	codegen passes [2ukjh4ph10y7sc82]
    time: 0.101; rss: 296MB	codegen passes [28sq7p7uykf2zhlc]
    time: 0.117; rss: 296MB	codegen passes [1o6b1la7g4jnv39b]
    time: 0.015; rss: 296MB	llvm function passes [1wkh8r5el29kjnma]
    time: 0.004; rss: 296MB	llvm module passes [1wkh8r5el29kjnma]
    time: 0.006; rss: 296MB	llvm function passes [34gja0vt8q8p9eh6]
    time: 0.002; rss: 296MB	llvm module passes [34gja0vt8q8p9eh6]
    time: 0.005; rss: 296MB	llvm function passes [12ywmngkctbmushu]
    time: 0.008; rss: 296MB	llvm module passes [12ywmngkctbmushu]
    time: 0.189; rss: 296MB	codegen passes [34gja0vt8q8p9eh6]
    time: 0.128; rss: 296MB	codegen passes [12ywmngkctbmushu]
    time: 0.003; rss: 297MB	llvm function passes [1yxxal7dd9sxauzd]
    time: 0.004; rss: 297MB	llvm function passes [1bcqsa22wu6fdxi6]
    time: 0.001; rss: 297MB	llvm module passes [1yxxal7dd9sxauzd]
    time: 0.003; rss: 297MB	llvm module passes [1bcqsa22wu6fdxi6]
    time: 0.360; rss: 297MB	codegen passes [1wkh8r5el29kjnma]
    time: 0.090; rss: 297MB	codegen passes [1yxxal7dd9sxauzd]
    time: 0.092; rss: 298MB	codegen passes [1bcqsa22wu6fdxi6]
    time: 0.010; rss: 297MB	llvm function passes [20bfk39k58yisku1]
    time: 0.002; rss: 297MB	llvm module passes [20bfk39k58yisku1]
    time: 0.004; rss: 297MB	llvm function passes [5e84sgrgxzlsvt5t]
    time: 0.001; rss: 297MB	llvm module passes [5e84sgrgxzlsvt5t]
    time: 0.002; rss: 297MB	llvm function passes [436dotimmrgzkwfa]
    time: 0.001; rss: 297MB	llvm module passes [436dotimmrgzkwfa]
    time: 0.049; rss: 297MB	codegen passes [436dotimmrgzkwfa]
    time: 0.100; rss: 297MB	codegen passes [20bfk39k58yisku1]
    time: 0.112; rss: 297MB	codegen passes [5e84sgrgxzlsvt5t]
    time: 0.007; rss: 297MB	llvm function passes [20hjq3d7blas6wvx]
    time: 0.003; rss: 297MB	llvm module passes [20hjq3d7blas6wvx]
    time: 0.006; rss: 297MB	llvm function passes [1zlxkqmuhdjcaqn9]
    time: 0.002; rss: 297MB	llvm module passes [1zlxkqmuhdjcaqn9]
    time: 0.155; rss: 297MB	codegen passes [20hjq3d7blas6wvx]
    time: 0.006; rss: 297MB	llvm function passes [4iwxvmwbimr9bl6u]
    time: 0.002; rss: 297MB	llvm module passes [4iwxvmwbimr9bl6u]
    time: 0.165; rss: 297MB	codegen passes [1zlxkqmuhdjcaqn9]
    time: 0.148; rss: 297MB	codegen passes [4iwxvmwbimr9bl6u]
    time: 0.010; rss: 297MB	llvm function passes [3cel4qymbplfewfp]
    time: 0.002; rss: 297MB	llvm module passes [3cel4qymbplfewfp]
    time: 0.009; rss: 297MB	llvm function passes [572bgozz9kcwe4zq]
    time: 0.003; rss: 297MB	llvm module passes [572bgozz9kcwe4zq]
    time: 0.003; rss: 297MB	llvm function passes [98g0d9x8aw3akpe]
    time: 0.003; rss: 297MB	llvm module passes [98g0d9x8aw3akpe]
    time: 0.259; rss: 297MB	codegen passes [3cel4qymbplfewfp]
    time: 0.097; rss: 297MB	codegen passes [98g0d9x8aw3akpe]
    time: 0.004; rss: 297MB	llvm function passes [181cuta0v63atwcm]
    time: 0.002; rss: 297MB	llvm module passes [181cuta0v63atwcm]
    time: 0.005; rss: 297MB	llvm function passes [27xbs82n02ulns8n]
    time: 0.001; rss: 297MB	llvm module passes [27xbs82n02ulns8n]
    time: 0.105; rss: 297MB	codegen passes [181cuta0v63atwcm]
    time: 0.245; rss: 297MB	codegen passes [572bgozz9kcwe4zq]
    time: 0.108; rss: 297MB	codegen passes [27xbs82n02ulns8n]
    time: 0.009; rss: 297MB	llvm function passes [3ie3saambav68y3n]
    time: 0.002; rss: 297MB	llvm module passes [3ie3saambav68y3n]
    time: 0.005; rss: 297MB	llvm function passes [9o8voqb7wlciui8]
    time: 0.001; rss: 297MB	llvm module passes [9o8voqb7wlciui8]
    time: 0.111; rss: 297MB	codegen passes [9o8voqb7wlciui8]
    time: 0.008; rss: 297MB	llvm function passes [xxt6r8bujknjejo]
    time: 0.002; rss: 297MB	llvm module passes [xxt6r8bujknjejo]
    time: 0.239; rss: 298MB	codegen passes [3ie3saambav68y3n]
    time: 0.182; rss: 297MB	codegen passes [xxt6r8bujknjejo]
    time: 0.008; rss: 298MB	llvm function passes [55bitd67cfmwsmcr]
    time: 0.001; rss: 298MB	llvm module passes [55bitd67cfmwsmcr]
    time: 0.005; rss: 298MB	llvm function passes [5a7agjq4x6w85db7]
    time: 0.003; rss: 298MB	llvm module passes [5a7agjq4x6w85db7]
    time: 0.020; rss: 298MB	llvm function passes [3hfnnvlph5ozv32c]
    time: 0.001; rss: 298MB	llvm module passes [3hfnnvlph5ozv32c]
    time: 0.126; rss: 298MB	codegen passes [5a7agjq4x6w85db7]
    time: 0.003; rss: 298MB	llvm function passes [1cbkk1ulraumk09l]
    time: 0.001; rss: 298MB	llvm module passes [1cbkk1ulraumk09l]
    time: 0.111; rss: 298MB	codegen passes [3hfnnvlph5ozv32c]
    time: 0.202; rss: 298MB	codegen passes [55bitd67cfmwsmcr]
    time: 0.007; rss: 298MB	llvm function passes [4eq62wcb8nn7c66a]
    time: 0.002; rss: 298MB	llvm module passes [4eq62wcb8nn7c66a]
    time: 0.003; rss: 298MB	llvm function passes [3q34xpb5kw6a1q3u]
    time: 0.004; rss: 298MB	llvm module passes [3q34xpb5kw6a1q3u]
    time: 0.100; rss: 298MB	codegen passes [1cbkk1ulraumk09l]
    time: 0.004; rss: 298MB	llvm function passes [3guvv8qofnub2kgz]
    time: 0.001; rss: 298MB	llvm module passes [3guvv8qofnub2kgz]
    time: 0.079; rss: 298MB	codegen passes [3q34xpb5kw6a1q3u]
    time: 0.003; rss: 297MB	llvm function passes [fep3y2ztm7a7e6t]
    time: 0.001; rss: 297MB	llvm module passes [fep3y2ztm7a7e6t]
    time: 0.162; rss: 297MB	codegen passes [4eq62wcb8nn7c66a]
    time: 0.005; rss: 297MB	llvm function passes [4sw9hz7i7fiueihz]
    time: 0.113; rss: 297MB	codegen passes [3guvv8qofnub2kgz]
    time: 0.001; rss: 297MB	llvm module passes [4sw9hz7i7fiueihz]
    time: 0.102; rss: 297MB	codegen passes [fep3y2ztm7a7e6t]
    time: 0.004; rss: 297MB	llvm function passes [2unz9jvcwexn6tgu]
    time: 0.001; rss: 297MB	llvm module passes [2unz9jvcwexn6tgu]
    time: 0.002; rss: 297MB	llvm function passes [4f95cjyhxcjrjbkp]
    time: 0.001; rss: 297MB	llvm module passes [4f95cjyhxcjrjbkp]
    time: 0.151; rss: 297MB	codegen passes [4sw9hz7i7fiueihz]
    time: 0.054; rss: 297MB	codegen passes [4f95cjyhxcjrjbkp]
    time: 0.104; rss: 297MB	codegen passes [2unz9jvcwexn6tgu]
    time: 0.006; rss: 297MB	llvm function passes [1fc09ypj0i2nuif5]
    time: 0.002; rss: 297MB	llvm module passes [1fc09ypj0i2nuif5]
    time: 0.002; rss: 297MB	llvm function passes [4a6dgwgsyclvnmy1]
    time: 0.001; rss: 297MB	llvm module passes [4a6dgwgsyclvnmy1]
    time: 0.004; rss: 297MB	llvm function passes [4xuhwz5yy6q4gvgg]
    time: 0.045; rss: 297MB	codegen passes [4a6dgwgsyclvnmy1]
    time: 0.002; rss: 297MB	llvm module passes [4xuhwz5yy6q4gvgg]
    time: 0.155; rss: 297MB	codegen passes [1fc09ypj0i2nuif5]
    time: 0.109; rss: 297MB	codegen passes [4xuhwz5yy6q4gvgg]
    time: 0.010; rss: 297MB	llvm function passes [3wi52k84jaobqvok]
    time: 0.001; rss: 297MB	llvm module passes [3wi52k84jaobqvok]
    time: 0.003; rss: 297MB	llvm function passes [28bq1dj995ggw8bg]
    time: 0.001; rss: 297MB	llvm module passes [28bq1dj995ggw8bg]
    time: 0.083; rss: 297MB	codegen passes [28bq1dj995ggw8bg]
    time: 0.007; rss: 298MB	llvm function passes [39ncfjxmuxsnvefn]
    time: 0.001; rss: 298MB	llvm module passes [39ncfjxmuxsnvefn]
    time: 0.218; rss: 298MB	codegen passes [3wi52k84jaobqvok]
    time: 0.007; rss: 298MB	llvm function passes [ukufkol9vvsetmp]
    time: 0.002; rss: 298MB	llvm module passes [ukufkol9vvsetmp]
    time: 0.152; rss: 298MB	codegen passes [39ncfjxmuxsnvefn]
    time: 0.003; rss: 298MB	llvm function passes [3v2ylmkburu2dlnw]
    time: 0.001; rss: 298MB	llvm module passes [3v2ylmkburu2dlnw]
    time: 0.004; rss: 298MB	llvm function passes [c6lbtaiefvx3wya]
    time: 0.002; rss: 298MB	llvm module passes [c6lbtaiefvx3wya]
    time: 0.069; rss: 298MB	codegen passes [3v2ylmkburu2dlnw]
    time: 0.001; rss: 298MB	llvm function passes [1y9pk6a2vlv6am7n]
    time: 0.001; rss: 298MB	llvm module passes [1y9pk6a2vlv6am7n]
    time: 0.158; rss: 298MB	codegen passes [ukufkol9vvsetmp]
    time: 0.069; rss: 297MB	codegen passes [1y9pk6a2vlv6am7n]
    time: 0.137; rss: 297MB	codegen passes [c6lbtaiefvx3wya]
    time: 0.008; rss: 297MB	llvm function passes [10c11n9bbq0xxbke]
    time: 0.001; rss: 297MB	llvm module passes [10c11n9bbq0xxbke]
    time: 0.003; rss: 297MB	llvm function passes [d6p2df93qm1h3gm]
    time: 0.001; rss: 297MB	llvm module passes [d6p2df93qm1h3gm]
    time: 0.054; rss: 298MB	codegen passes [d6p2df93qm1h3gm]
    time: 0.003; rss: 298MB	llvm function passes [5c7at1lpj4vdl9ay]
    time: 0.001; rss: 298MB	llvm module passes [5c7at1lpj4vdl9ay]
    time: 0.003; rss: 298MB	llvm function passes [21fp79fdakrpxgtz]
    time: 0.001; rss: 298MB	llvm module passes [21fp79fdakrpxgtz]
    time: 0.187; rss: 298MB	codegen passes [10c11n9bbq0xxbke]
    time: 0.087; rss: 298MB	codegen passes [5c7at1lpj4vdl9ay]
    time: 0.077; rss: 298MB	codegen passes [21fp79fdakrpxgtz]
    time: 0.006; rss: 298MB	llvm function passes [3krdx1uunvj0cqf0]
    time: 0.001; rss: 298MB	llvm module passes [3krdx1uunvj0cqf0]
    time: 0.003; rss: 298MB	llvm function passes [2b80ew7dd0x1f55k]
    time: 0.001; rss: 298MB	llvm module passes [2b80ew7dd0x1f55k]
    time: 0.002; rss: 298MB	llvm function passes [281z0bsdmcy5ob88]
    time: 0.001; rss: 298MB	llvm module passes [281z0bsdmcy5ob88]
    time: 0.079; rss: 298MB	codegen passes [2b80ew7dd0x1f55k]
    time: 0.002; rss: 298MB	llvm function passes [j88x78foflefssm]
    time: 0.001; rss: 298MB	llvm module passes [j88x78foflefssm]
    time: 0.057; rss: 298MB	codegen passes [281z0bsdmcy5ob88]
    time: 0.003; rss: 298MB	llvm function passes [4kn420pr0tn0z18x]
    time: 0.001; rss: 298MB	llvm module passes [4kn420pr0tn0z18x]
    time: 0.125; rss: 298MB	codegen passes [3krdx1uunvj0cqf0]
    time: 0.003; rss: 298MB	llvm function passes [2k5e5e3lnqi2lghs]
    time: 0.001; rss: 298MB	llvm module passes [2k5e5e3lnqi2lghs]
    time: 0.071; rss: 298MB	codegen passes [j88x78foflefssm]
    time: 0.003; rss: 298MB	llvm function passes [4sel3pbs0q0za62o]
    time: 0.002; rss: 298MB	llvm module passes [4sel3pbs0q0za62o]
    time: 0.073; rss: 298MB	codegen passes [4kn420pr0tn0z18x]
    time: 0.003; rss: 298MB	llvm function passes [2lch9qtnw21euqm6]
    time: 0.001; rss: 298MB	llvm module passes [2lch9qtnw21euqm6]
    time: 0.082; rss: 298MB	codegen passes [2k5e5e3lnqi2lghs]
    time: 0.002; rss: 298MB	llvm function passes [3g94tobrpgum5dk6]
    time: 0.001; rss: 298MB	llvm module passes [3g94tobrpgum5dk6]
    time: 0.083; rss: 298MB	codegen passes [4sel3pbs0q0za62o]
    time: 0.002; rss: 298MB	llvm function passes [4c92ilerwslsd6a]
    time: 0.001; rss: 298MB	llvm module passes [4c92ilerwslsd6a]
    time: 0.056; rss: 298MB	codegen passes [3g94tobrpgum5dk6]
    time: 0.089; rss: 298MB	codegen passes [2lch9qtnw21euqm6]
    time: 0.054; rss: 298MB	codegen passes [4c92ilerwslsd6a]
    time: 0.007; rss: 298MB	llvm function passes [58obdilhk3rtglcy]
    time: 0.001; rss: 298MB	llvm module passes [58obdilhk3rtglcy]
    time: 0.001; rss: 298MB	llvm function passes [254v2mmh2l0pl4a]
    time: 0.001; rss: 298MB	llvm module passes [254v2mmh2l0pl4a]
    time: 0.034; rss: 298MB	codegen passes [254v2mmh2l0pl4a]
    time: 0.003; rss: 298MB	llvm function passes [2rxh8qma2qd26e60]
    time: 0.001; rss: 298MB	llvm module passes [2rxh8qma2qd26e60]
    time: 0.002; rss: 298MB	llvm function passes [3iwq3wvme2u0mr3y]
    time: 0.001; rss: 298MB	llvm module passes [3iwq3wvme2u0mr3y]
    time: 0.048; rss: 298MB	codegen passes [3iwq3wvme2u0mr3y]
    time: 0.002; rss: 298MB	llvm function passes [4rzh6npf1tuwcxx9]
    time: 0.001; rss: 298MB	llvm module passes [4rzh6npf1tuwcxx9]
    time: 0.094; rss: 298MB	codegen passes [2rxh8qma2qd26e60]
    time: 0.051; rss: 298MB	codegen passes [4rzh6npf1tuwcxx9]
    time: 0.205; rss: 298MB	codegen passes [58obdilhk3rtglcy]
    time: 0.007; rss: 298MB	llvm function passes [2gkuzypc3u1itz1n]
    time: 0.001; rss: 298MB	llvm module passes [2gkuzypc3u1itz1n]
    time: 0.002; rss: 298MB	llvm function passes [48721dc4k5qxei0u]
    time: 0.001; rss: 298MB	llvm module passes [48721dc4k5qxei0u]
    time: 0.001; rss: 298MB	llvm function passes [48e1hrx7a3wsxlv1]
    time: 0.001; rss: 298MB	llvm module passes [48e1hrx7a3wsxlv1]
    time: 0.048; rss: 298MB	codegen passes [48721dc4k5qxei0u]
    time: 0.040; rss: 298MB	codegen passes [48e1hrx7a3wsxlv1]
    time: 0.002; rss: 298MB	llvm function passes [51s1w397y42gpez1]
    time: 0.001; rss: 298MB	llvm module passes [51s1w397y42gpez1]
    time: 0.002; rss: 298MB	llvm function passes [2qhkzqx5zqexj20y]
    time: 0.001; rss: 298MB	llvm module passes [2qhkzqx5zqexj20y]
    time: 0.038; rss: 298MB	codegen passes [2qhkzqx5zqexj20y]
    time: 0.042; rss: 298MB	codegen passes [51s1w397y42gpez1]
    time: 0.157; rss: 298MB	codegen passes [2gkuzypc3u1itz1n]
    time: 0.008; rss: 298MB	llvm function passes [4zzb98ievhs5qgf9]
    time: 0.001; rss: 298MB	llvm module passes [4zzb98ievhs5qgf9]
    time: 0.003; rss: 298MB	llvm function passes [52ddc7y99ux3gcvb]
    time: 0.003; rss: 298MB	llvm module passes [52ddc7y99ux3gcvb]
    time: 0.002; rss: 298MB	llvm function passes [1jnlhyxj59jycbjv]
    time: 0.002; rss: 298MB	llvm module passes [1jnlhyxj59jycbjv]
    time: 0.049; rss: 298MB	codegen passes [1jnlhyxj59jycbjv]
    time: 0.002; rss: 298MB	llvm function passes [4d5b7slbdk5lqa6o]
    time: 0.001; rss: 298MB	llvm module passes [4d5b7slbdk5lqa6o]
    time: 0.085; rss: 298MB	codegen passes [52ddc7y99ux3gcvb]
    time: 0.002; rss: 298MB	llvm function passes [mc6hgequk6elf30]
    time: 0.001; rss: 298MB	llvm module passes [mc6hgequk6elf30]
    time: 0.160; rss: 298MB	codegen passes [4zzb98ievhs5qgf9]
    time: 0.058; rss: 298MB	codegen passes [4d5b7slbdk5lqa6o]
    time: 0.049; rss: 298MB	codegen passes [mc6hgequk6elf30]
    time: 0.008; rss: 298MB	llvm function passes [38ps4pa181wsnsy9]
    time: 0.001; rss: 298MB	llvm function passes [452sz8czbye6005z]
    time: 0.001; rss: 298MB	llvm module passes [38ps4pa181wsnsy9]
    time: 0.001; rss: 298MB	llvm module passes [452sz8czbye6005z]
    time: 0.002; rss: 298MB	llvm function passes [40slw9fy48obg631]
    time: 0.001; rss: 298MB	llvm module passes [40slw9fy48obg631]
    time: 0.038; rss: 298MB	codegen passes [452sz8czbye6005z]
    time: 0.037; rss: 298MB	codegen passes [40slw9fy48obg631]
    time: 0.004; rss: 298MB	llvm function passes [mb501chi8fnqgmm]
    time: 0.001; rss: 298MB	llvm module passes [mb501chi8fnqgmm]
    time: 0.001; rss: 298MB	llvm function passes [1um484vjuu3ha50h]
    time: 0.000; rss: 298MB	llvm module passes [1um484vjuu3ha50h]
    time: 0.002; rss: 298MB	llvm function passes [2v8w73vzu6yvld98]
    time: 0.002; rss: 298MB	llvm module passes [2v8w73vzu6yvld98]
    time: 0.041; rss: 298MB	codegen passes [1um484vjuu3ha50h]
    time: 0.069; rss: 298MB	codegen passes [mb501chi8fnqgmm]
    time: 0.001; rss: 298MB	llvm function passes [2zkily7g6ekg7qb6]
    time: 0.001; rss: 298MB	llvm module passes [2zkily7g6ekg7qb6]
    time: 0.052; rss: 298MB	codegen passes [2v8w73vzu6yvld98]
    time: 0.001; rss: 298MB	llvm function passes [2xnvmuhjbhd7vxcm]
    time: 0.001; rss: 298MB	llvm module passes [2xnvmuhjbhd7vxcm]
    time: 0.033; rss: 298MB	codegen passes [2zkily7g6ekg7qb6]
    time: 0.003; rss: 298MB	llvm function passes [1kduva7sc7em934m]
    time: 0.161; rss: 298MB	codegen passes [38ps4pa181wsnsy9]
    time: 0.002; rss: 298MB	llvm module passes [1kduva7sc7em934m]
    time: 0.032; rss: 298MB	codegen passes [2xnvmuhjbhd7vxcm]
    time: 0.080; rss: 298MB	codegen passes [1kduva7sc7em934m]
    time: 0.011; rss: 298MB	llvm function passes [8n5lnckn5hfrxm0]
    time: 0.001; rss: 298MB	llvm module passes [8n5lnckn5hfrxm0]
    time: 0.002; rss: 298MB	llvm function passes [4xq48u46a1pwiqn7]
    time: 0.001; rss: 298MB	llvm module passes [4xq48u46a1pwiqn7]
    time: 0.001; rss: 298MB	llvm function passes [4duuwqmycme546tx]
    time: 0.001; rss: 298MB	llvm module passes [4duuwqmycme546tx]
    time: 0.036; rss: 298MB	codegen passes [4duuwqmycme546tx]
    time: 0.058; rss: 298MB	codegen passes [4xq48u46a1pwiqn7]
    time: 0.001; rss: 298MB	llvm function passes [3n00wdv0cc9xhmhc]
    time: 0.001; rss: 298MB	llvm module passes [3n00wdv0cc9xhmhc]
    time: 0.004; rss: 298MB	llvm function passes [55ezy8i7h0n87k30]
    time: 0.001; rss: 298MB	llvm module passes [55ezy8i7h0n87k30]
    time: 0.040; rss: 298MB	codegen passes [3n00wdv0cc9xhmhc]
    time: 0.082; rss: 298MB	codegen passes [55ezy8i7h0n87k30]
    time: 0.229; rss: 299MB	codegen passes [8n5lnckn5hfrxm0]
    time: 0.007; rss: 298MB	llvm function passes [4evzkpljbt9iq1pm]
    time: 0.001; rss: 298MB	llvm module passes [4evzkpljbt9iq1pm]
    time: 0.004; rss: 298MB	llvm function passes [10ljsns07zxfhirc]
    time: 0.003; rss: 298MB	llvm module passes [10ljsns07zxfhirc]
    time: 0.001; rss: 298MB	llvm function passes [243kyvh9tdawdzh4]
    time: 0.000; rss: 298MB	llvm module passes [243kyvh9tdawdzh4]
    time: 0.023; rss: 298MB	codegen passes [243kyvh9tdawdzh4]
    time: 0.133; rss: 298MB	codegen passes [4evzkpljbt9iq1pm]
    time: 0.003; rss: 298MB	llvm function passes [56dly8q07ws8ucdq]
    time: 0.001; rss: 298MB	llvm module passes [56dly8q07ws8ucdq]
    time: 0.087; rss: 298MB	codegen passes [10ljsns07zxfhirc]
    time: 0.003; rss: 298MB	llvm function passes [33hbbtmmc0jr14rx]
    time: 0.059; rss: 298MB	codegen passes [56dly8q07ws8ucdq]
    time: 0.001; rss: 298MB	llvm module passes [33hbbtmmc0jr14rx]
    time: 0.002; rss: 298MB	llvm function passes [50aolrukvb727mli]
    time: 0.001; rss: 298MB	llvm module passes [50aolrukvb727mli]
    time: 0.001; rss: 298MB	llvm function passes [nnkp0md22vsaj3o]
    time: 0.001; rss: 298MB	llvm module passes [nnkp0md22vsaj3o]
    time: 0.069; rss: 298MB	codegen passes [33hbbtmmc0jr14rx]
    time: 0.047; rss: 298MB	codegen passes [50aolrukvb727mli]
    time: 0.001; rss: 298MB	llvm function passes [23tqyymcb18u96mb]
    time: 0.001; rss: 298MB	llvm module passes [23tqyymcb18u96mb]
    time: 0.053; rss: 298MB	codegen passes [nnkp0md22vsaj3o]
    time: 0.024; rss: 298MB	codegen passes [23tqyymcb18u96mb]
    time: 0.005; rss: 298MB	llvm function passes [24oq00rw7yn5nukv]
    time: 0.001; rss: 298MB	llvm module passes [24oq00rw7yn5nukv]
    time: 0.001; rss: 298MB	llvm function passes [3rngp6bm2u2q5z0y]
    time: 0.001; rss: 298MB	llvm module passes [3rngp6bm2u2q5z0y]
    time: 0.001; rss: 298MB	llvm function passes [3upnvjl30cozukpz]
    time: 0.001; rss: 298MB	llvm module passes [3upnvjl30cozukpz]
    time: 0.027; rss: 298MB	codegen passes [3upnvjl30cozukpz]
    time: 0.039; rss: 298MB	codegen passes [3rngp6bm2u2q5z0y]
    time: 0.001; rss: 298MB	llvm function passes [5f84i8pq0tllacpi]
    time: 0.002; rss: 298MB	llvm function passes [1vut2eft6nlujjxr]
    time: 0.001; rss: 298MB	llvm module passes [5f84i8pq0tllacpi]
    time: 0.001; rss: 298MB	llvm module passes [1vut2eft6nlujjxr]
    time: 0.030; rss: 298MB	codegen passes [5f84i8pq0tllacpi]
    time: 0.002; rss: 298MB	llvm function passes [g4vv0270pdgumyv]
    time: 0.001; rss: 298MB	llvm module passes [g4vv0270pdgumyv]
    time: 0.046; rss: 298MB	codegen passes [1vut2eft6nlujjxr]
    time: 0.001; rss: 298MB	llvm function passes [1q4fuxrivb5plqy2]
    time: 0.001; rss: 298MB	llvm module passes [1q4fuxrivb5plqy2]
    time: 0.147; rss: 298MB	codegen passes [24oq00rw7yn5nukv]
    time: 0.048; rss: 298MB	codegen passes [g4vv0270pdgumyv]
    time: 0.002; rss: 298MB	llvm function passes [2lmd7lkv2gkwgchh]
    time: 0.001; rss: 298MB	llvm module passes [2lmd7lkv2gkwgchh]
    time: 0.044; rss: 298MB	codegen passes [1q4fuxrivb5plqy2]
    time: 0.050; rss: 298MB	codegen passes [2lmd7lkv2gkwgchh]
    time: 0.005; rss: 298MB	llvm function passes [38tak1by0gyw3xru]
    time: 0.001; rss: 298MB	llvm module passes [38tak1by0gyw3xru]
    time: 0.002; rss: 298MB	llvm function passes [5beqqbexwb143v6a]
    time: 0.001; rss: 298MB	llvm module passes [5beqqbexwb143v6a]
    time: 0.042; rss: 298MB	codegen passes [5beqqbexwb143v6a]
    time: 0.003; rss: 298MB	llvm function passes [3m9jlb8iw20nkgi3]
    time: 0.001; rss: 298MB	llvm module passes [3m9jlb8iw20nkgi3]
    time: 0.001; rss: 298MB	llvm function passes [3o3fsnotfg98ognz]
    time: 0.001; rss: 298MB	llvm module passes [3o3fsnotfg98ognz]
    time: 0.093; rss: 298MB	codegen passes [38tak1by0gyw3xru]
    time: 0.001; rss: 298MB	llvm function passes [4bh7qn98hnyxv8ix]
    time: 0.001; rss: 298MB	llvm module passes [4bh7qn98hnyxv8ix]
    time: 0.028; rss: 298MB	codegen passes [3o3fsnotfg98ognz]
    time: 0.028; rss: 298MB	codegen passes [4bh7qn98hnyxv8ix]
    time: 0.061; rss: 298MB	codegen passes [3m9jlb8iw20nkgi3]
    time: 0.007; rss: 298MB	llvm function passes [4bwka44cn8t3u4h3]
    time: 0.001; rss: 298MB	llvm module passes [4bwka44cn8t3u4h3]
    time: 0.003; rss: 298MB	llvm function passes [4wvz8rvm44h2209w]
    time: 0.001; rss: 298MB	llvm module passes [4wvz8rvm44h2209w]
    time: 0.001; rss: 298MB	llvm function passes [mz7vgmcf23rofcc]
    time: 0.001; rss: 298MB	llvm module passes [mz7vgmcf23rofcc]
    time: 0.034; rss: 298MB	codegen passes [mz7vgmcf23rofcc]
    time: 0.064; rss: 298MB	codegen passes [4wvz8rvm44h2209w]
    time: 0.145; rss: 298MB	codegen passes [4bwka44cn8t3u4h3]
    time: 0.001; rss: 298MB	llvm function passes [1k0skm6dn0tige6a]
    time: 0.000; rss: 298MB	llvm module passes [1k0skm6dn0tige6a]
    time: 0.007; rss: 298MB	llvm function passes [wlsuvuni7urb6of]
    time: 0.001; rss: 298MB	llvm module passes [wlsuvuni7urb6of]
    time: 0.020; rss: 298MB	codegen passes [1k0skm6dn0tige6a]
    time: 0.002; rss: 298MB	llvm function passes [3ldk0i2zxftngav8]
    time: 0.001; rss: 298MB	llvm module passes [3ldk0i2zxftngav8]
    time: 0.002; rss: 298MB	llvm function passes [49qmpuk8w1opmi5q]
    time: 0.001; rss: 298MB	llvm module passes [49qmpuk8w1opmi5q]
    time: 0.042; rss: 298MB	codegen passes [3ldk0i2zxftngav8]
    time: 0.002; rss: 298MB	llvm function passes [5fb90dmb0en1xs9h]
    time: 0.001; rss: 298MB	llvm module passes [5fb90dmb0en1xs9h]
    time: 0.050; rss: 298MB	codegen passes [49qmpuk8w1opmi5q]
    time: 0.003; rss: 298MB	llvm function passes [5omsdfxl4lpypz2]
    time: 0.001; rss: 298MB	llvm module passes [5omsdfxl4lpypz2]
    time: 0.055; rss: 298MB	codegen passes [5fb90dmb0en1xs9h]
    time: 0.146; rss: 298MB	codegen passes [wlsuvuni7urb6of]
    time: 0.001; rss: 298MB	llvm function passes [4p7rndqhoioh88q2]
    time: 0.001; rss: 298MB	llvm module passes [4p7rndqhoioh88q2]
    time: 0.035; rss: 298MB	codegen passes [4p7rndqhoioh88q2]
    time: 0.096; rss: 298MB	codegen passes [5omsdfxl4lpypz2]
    time: 0.004; rss: 298MB	llvm function passes [4r50uh0pzylr3pak]
    time: 0.001; rss: 298MB	llvm module passes [4r50uh0pzylr3pak]
    time: 0.088; rss: 298MB	codegen passes [4r50uh0pzylr3pak]
    time: 0.004; rss: 298MB	llvm function passes [4umw6mrogxnyzdcs]
    time: 0.001; rss: 298MB	llvm module passes [4umw6mrogxnyzdcs]
    time: 0.001; rss: 298MB	llvm function passes [17erb31xn70viq4b]
    time: 0.001; rss: 298MB	llvm module passes [17erb31xn70viq4b]
    time: 0.001; rss: 298MB	llvm function passes [184d329tddhoqyjv]
    time: 0.001; rss: 298MB	llvm module passes [184d329tddhoqyjv]
    time: 0.031; rss: 298MB	codegen passes [17erb31xn70viq4b]
    time: 0.001; rss: 298MB	llvm function passes [1e4bmjbiko963ark]
    time: 0.001; rss: 298MB	llvm module passes [1e4bmjbiko963ark]
    time: 0.028; rss: 298MB	codegen passes [184d329tddhoqyjv]
    time: 0.029; rss: 298MB	codegen passes [1e4bmjbiko963ark]
    time: 0.093; rss: 298MB	codegen passes [4umw6mrogxnyzdcs]
    time: 0.002; rss: 298MB	llvm function passes [1ygj72qs8o1veaeq]
    time: 0.001; rss: 298MB	llvm module passes [1ygj72qs8o1veaeq]
    time: 0.001; rss: 298MB	llvm function passes [2yf0izvq9wmxs9a5]
    time: 0.001; rss: 298MB	llvm module passes [2yf0izvq9wmxs9a5]
    time: 0.001; rss: 298MB	llvm function passes [3l7raohhiozlwsbz]
    time: 0.001; rss: 298MB	llvm module passes [3l7raohhiozlwsbz]
    time: 0.025; rss: 298MB	codegen passes [2yf0izvq9wmxs9a5]
    time: 0.042; rss: 298MB	codegen passes [1ygj72qs8o1veaeq]
    time: 0.027; rss: 298MB	codegen passes [3l7raohhiozlwsbz]
    time: 0.001; rss: 298MB	llvm function passes [jbcqvwaq3mnqbg3]
    time: 0.000; rss: 298MB	llvm module passes [jbcqvwaq3mnqbg3]
    time: 0.001; rss: 298MB	llvm function passes [xpmnhrswrwqect6]
    time: 0.001; rss: 298MB	llvm module passes [xpmnhrswrwqect6]
    time: 0.001; rss: 298MB	llvm function passes [15kq92zzbmxot4k9]
    time: 0.001; rss: 298MB	llvm module passes [15kq92zzbmxot4k9]
    time: 0.036; rss: 298MB	codegen passes [jbcqvwaq3mnqbg3]
    time: 0.030; rss: 298MB	codegen passes [xpmnhrswrwqect6]
    time: 0.030; rss: 298MB	codegen passes [15kq92zzbmxot4k9]
    time: 0.007; rss: 298MB	llvm function passes [5b1vh7iwaxrgdt9b]
    time: 0.001; rss: 298MB	llvm module passes [5b1vh7iwaxrgdt9b]
    time: 0.001; rss: 298MB	llvm function passes [180g2xq91idx094l]
    time: 0.001; rss: 298MB	llvm module passes [180g2xq91idx094l]
    time: 0.001; rss: 298MB	llvm function passes [19rokj29ksdl0eq2]
    time: 0.001; rss: 298MB	llvm module passes [19rokj29ksdl0eq2]
    time: 0.021; rss: 298MB	codegen passes [19rokj29ksdl0eq2]
    time: 0.036; rss: 298MB	codegen passes [180g2xq91idx094l]
    time: 0.001; rss: 298MB	llvm function passes [42f6vhrycid75ydu]
    time: 0.001; rss: 298MB	llvm function passes [46wi7y51giegmklo]
    time: 0.001; rss: 298MB	llvm module passes [42f6vhrycid75ydu]
    time: 0.001; rss: 298MB	llvm module passes [46wi7y51giegmklo]
    time: 0.001; rss: 298MB	llvm function passes [sd3ak9f4uaqbrdw]
    time: 0.001; rss: 298MB	llvm module passes [sd3ak9f4uaqbrdw]
    time: 0.027; rss: 298MB	codegen passes [42f6vhrycid75ydu]
    time: 0.001; rss: 298MB	llvm function passes [25hsgddnxdtr7jwt]
    time: 0.001; rss: 298MB	llvm module passes [25hsgddnxdtr7jwt]
    time: 0.039; rss: 298MB	codegen passes [46wi7y51giegmklo]
    time: 0.129; rss: 298MB	codegen passes [5b1vh7iwaxrgdt9b]
    time: 0.021; rss: 298MB	codegen passes [25hsgddnxdtr7jwt]
    time: 0.045; rss: 298MB	codegen passes [sd3ak9f4uaqbrdw]
    time: 0.001; rss: 298MB	llvm function passes [3hqog9w8xm9yaq16]
    time: 0.001; rss: 298MB	llvm function passes [1dqvxks6k2bzkxe]
    time: 0.001; rss: 298MB	llvm module passes [1dqvxks6k2bzkxe]
    time: 0.019; rss: 298MB	llvm module passes [3hqog9w8xm9yaq16]
    time: 0.001; rss: 298MB	llvm function passes [2q5257pdh5222n7q]
    time: 0.001; rss: 298MB	llvm module passes [2q5257pdh5222n7q]
    time: 0.031; rss: 298MB	codegen passes [1dqvxks6k2bzkxe]
    time: 0.025; rss: 298MB	codegen passes [2q5257pdh5222n7q]
    time: 0.002; rss: 298MB	llvm function passes [4gyy6jzsnyd1wkpq]
    time: 0.029; rss: 298MB	codegen passes [3hqog9w8xm9yaq16]
    time: 0.001; rss: 298MB	llvm module passes [4gyy6jzsnyd1wkpq]
    time: 0.001; rss: 298MB	llvm function passes [4z25l7yhw8jwymns]
    time: 0.000; rss: 298MB	llvm module passes [4z25l7yhw8jwymns]
    time: 0.002; rss: 298MB	llvm function passes [3m12ownkyh5rbrgo]
    time: 0.001; rss: 298MB	llvm module passes [3m12ownkyh5rbrgo]
    time: 0.018; rss: 298MB	codegen passes [4z25l7yhw8jwymns]
    time: 0.001; rss: 298MB	llvm function passes [49lx1q7cxvpykyv0]
    time: 0.001; rss: 298MB	llvm module passes [49lx1q7cxvpykyv0]
    time: 0.052; rss: 298MB	codegen passes [4gyy6jzsnyd1wkpq]
    time: 0.030; rss: 298MB	codegen passes [49lx1q7cxvpykyv0]
    time: 0.041; rss: 298MB	codegen passes [3m12ownkyh5rbrgo]
    time: 0.002; rss: 298MB	llvm function passes [4wk7l3tq8336z8oq]
    time: 0.001; rss: 298MB	llvm module passes [4wk7l3tq8336z8oq]
    time: 0.001; rss: 298MB	llvm function passes [1eldthk14htjpe8q]
    time: 0.000; rss: 298MB	llvm module passes [1eldthk14htjpe8q]
    time: 0.001; rss: 298MB	llvm function passes [oa3rad818d8sgn4]
    time: 0.001; rss: 298MB	llvm module passes [oa3rad818d8sgn4]
    time: 0.019; rss: 298MB	codegen passes [1eldthk14htjpe8q]
    time: 0.020; rss: 298MB	codegen passes [oa3rad818d8sgn4]
    time: 0.000; rss: 298MB	llvm function passes [1zeawhkbeobww1zn]
    time: 0.000; rss: 298MB	llvm module passes [1zeawhkbeobww1zn]
    time: 0.001; rss: 298MB	llvm function passes [2wy6gihek33unzzq]
    time: 0.001; rss: 298MB	llvm module passes [2wy6gihek33unzzq]
    time: 0.048; rss: 298MB	codegen passes [4wk7l3tq8336z8oq]
    time: 0.001; rss: 298MB	llvm function passes [3i5rga4vs82n6cyj]
    time: 0.001; rss: 298MB	llvm module passes [3i5rga4vs82n6cyj]
    time: 0.025; rss: 298MB	codegen passes [1zeawhkbeobww1zn]
    time: 0.001; rss: 298MB	llvm function passes [4oc10dk278mpk1vy]
    time: 0.001; rss: 298MB	llvm module passes [4oc10dk278mpk1vy]
    time: 0.035; rss: 298MB	codegen passes [2wy6gihek33unzzq]
    time: 0.001; rss: 298MB	llvm function passes [3lv604npd6fa7bb9]
    time: 0.001; rss: 298MB	llvm module passes [3lv604npd6fa7bb9]
    time: 0.028; rss: 298MB	codegen passes [4oc10dk278mpk1vy]
    time: 0.038; rss: 298MB	codegen passes [3i5rga4vs82n6cyj]
    time: 0.019; rss: 298MB	codegen passes [3lv604npd6fa7bb9]
    time: 0.005; rss: 298MB	llvm function passes [gamgf6n10b0b0d]
    time: 0.001; rss: 298MB	llvm module passes [gamgf6n10b0b0d]
    time: 0.001; rss: 298MB	llvm function passes [1lp1gf5ss8hjzpo7]
    time: 0.000; rss: 298MB	llvm module passes [1lp1gf5ss8hjzpo7]
    time: 0.001; rss: 298MB	llvm function passes [27m0uwtwfmnqpen1]
    time: 0.001; rss: 298MB	llvm module passes [27m0uwtwfmnqpen1]
    time: 0.033; rss: 298MB	codegen passes [1lp1gf5ss8hjzpo7]
    time: 0.001; rss: 298MB	llvm function passes [4bro8i2eu9dn8hoh]
    time: 0.000; rss: 298MB	llvm module passes [4bro8i2eu9dn8hoh]
    time: 0.034; rss: 298MB	codegen passes [27m0uwtwfmnqpen1]
    time: 0.001; rss: 298MB	llvm function passes [229xyyh7ct8bv2d0]
    time: 0.000; rss: 298MB	llvm module passes [229xyyh7ct8bv2d0]
    time: 0.001; rss: 298MB	llvm function passes [wiopcl4mxq9dzh]
    time: 0.001; rss: 298MB	llvm module passes [wiopcl4mxq9dzh]
    time: 0.035; rss: 298MB	codegen passes [4bro8i2eu9dn8hoh]
    time: 0.001; rss: 298MB	llvm function passes [3u6nccrq67gq4elp]
    time: 0.000; rss: 298MB	llvm module passes [3u6nccrq67gq4elp]
    time: 0.030; rss: 298MB	codegen passes [229xyyh7ct8bv2d0]
    time: 0.028; rss: 298MB	codegen passes [wiopcl4mxq9dzh]
    time: 0.001; rss: 298MB	llvm function passes [4nsssliqxrwywdh7]
    time: 0.000; rss: 298MB	llvm module passes [4nsssliqxrwywdh7]
    time: 0.114; rss: 298MB	codegen passes [gamgf6n10b0b0d]
    time: 0.022; rss: 298MB	codegen passes [4nsssliqxrwywdh7]
    time: 0.035; rss: 298MB	codegen passes [3u6nccrq67gq4elp]
    time: 0.001; rss: 298MB	llvm function passes [4xofagoc7mlaflgw]
    time: 0.000; rss: 298MB	llvm module passes [4xofagoc7mlaflgw]
    time: 0.000; rss: 298MB	llvm function passes [26secoe6hyf0by4w]
    time: 0.000; rss: 298MB	llvm module passes [26secoe6hyf0by4w]
    time: 0.001; rss: 298MB	llvm function passes [4enfahcapc0v7efs]
    time: 0.000; rss: 298MB	llvm module passes [4enfahcapc0v7efs]
    time: 0.001; rss: 298MB	llvm function passes [u3fpqyaix172plm]
    time: 0.000; rss: 298MB	llvm module passes [u3fpqyaix172plm]
    time: 0.018; rss: 298MB	codegen passes [26secoe6hyf0by4w]
    time: 54.650; rss: 298MB	codegen to LLVM IR
    time: 0.000; rss: 298MB	assert dep graph
    time: 0.026; rss: 298MB	codegen passes [4xofagoc7mlaflgw]
    time: 0.023; rss: 298MB	codegen passes [4enfahcapc0v7efs]
    time: 0.001; rss: 298MB	llvm function passes [spyjbt69vcsrx9q]
    time: 0.000; rss: 298MB	llvm module passes [spyjbt69vcsrx9q]
    time: 0.000; rss: 298MB	llvm function passes [4ams3bbhvdexg6a0]
    time: 0.000; rss: 298MB	llvm module passes [4ams3bbhvdexg6a0]
    time: 0.019; rss: 298MB	codegen passes [spyjbt69vcsrx9q]
    time: 0.029; rss: 298MB	codegen passes [u3fpqyaix172plm]
    time: 0.016; rss: 298MB	codegen passes [4ams3bbhvdexg6a0]
  time: 53.608; rss: 298MB	LLVM passes
            time: 0.004; rss: 298MB	encode_query_results for rustc::ty::queries::type_of
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::generics_of
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::predicates_of
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::used_trait_imports
            time: 0.002; rss: 298MB	encode_query_results for rustc::ty::queries::typeck_tables_of
            time: 0.006; rss: 298MB	encode_query_results for rustc::ty::queries::codegen_fulfill_obligation
            time: 0.001; rss: 298MB	encode_query_results for rustc::ty::queries::optimized_mir
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::unsafety_check_result
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::borrowck
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::mir_borrowck
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::mir_const_qualif
            time: 0.004; rss: 298MB	encode_query_results for rustc::ty::queries::def_symbol_name
            time: 0.000; rss: 298MB	encode_query_results for rustc::ty::queries::const_is_rvalue_promotable_to_static
            time: 0.012; rss: 299MB	encode_query_results for rustc::ty::queries::symbol_name
            time: 0.000; rss: 299MB	encode_query_results for rustc::ty::queries::check_match
            time: 0.002; rss: 299MB	encode_query_results for rustc::ty::queries::codegen_fn_attrs
            time: 0.039; rss: 301MB	encode_query_results for rustc::ty::queries::specialization_graph_of
          time: 0.414; rss: 301MB	encode query results
        time: 0.563; rss: 307MB	serialize query result cache
      time: 0.588; rss: 305MB	persist query result cache
          time: 0.041; rss: 307MB	getting serialized graph
          time: 0.289; rss: 326MB	encoding serialized graph
        time: 0.336; rss: 316MB	encode dep-graph
      time: 0.398; rss: 295MB	persist dep-graph
    time: 0.986; rss: 295MB	serialize dep graph
  time: 68.615; rss: 295MB	codegen
  time: 0.004; rss: 258MB	serialize work products
    time: 68.317; rss: 253MB	running linker
  time: 68.346; rss: 252MB	linking

My impress is that the time was spent on generating code for the crates. I understand this is needed because we have generic versions of functions provided by the crates so the compiler will need to generate code for each of them.

But as it seems like every single line change requires the compiler to generate all codes from all crates, I feel there are a lot of space to enhance. Why can’t those generated code being cached and have some signature to identify themselves, so if the change of code does not affecting them just reuse them?

Also, the code generation seems took only 1 minute so it is only half of the story. The other half is “linking”, which is not divided into smaller parts. Is this just the time that gcc runs? If so, I think it is worth to move the linking part to pure rust so we can apply the same cache for this step.

(for those who wanted to try the code - the code above is not actually working and is still in development, but the following is a working version - but still missing MIME type headers)

extern crate actix_web;

use actix_web::{server, App, HttpRequest, Responder, Result};
use actix_web::http::Method;
use actix_web::fs::NamedFile;

use std::path::PathBuf;
use std::fs::{metadata, create_dir};

fn public_dir(req: HttpRequest) -> impl Responder {
    let r: Result<NamedFile> = (move || {
        let mut p = PathBuf::new();
        p.push("public");
        let p1:PathBuf = req.match_info().query("tail")?;
        p.push(p1);
        println!("serving {:?}", p);
        Ok(NamedFile::open(p)?)
    })();
    r
}

fn main() -> Result<()> {
    metadata("public")
        .or_else(|_| {
            create_dir("public")?;
            metadata("public")
        })?;

    server::new(|| {
        App::new()
            .resource("/{tail:.*}", |r| r.method(Method::GET).f(public_dir))
    })
    .bind("0.0.0.0:3010")
    .expect("Cannot bind to port 3010")
    .run();
    Ok(())
}

#2

The code that is generated in ./target/ is effectively a cache. Try building again without running cargo clean in between, and I think you’ll find that it takes much less time than the first time.


#3

I never run cargo clean at all, but it still took 2 mins every time I made changes.

I know that ./target exists for caching purpose though. However it just seems like a code base for code generation, and every code change makes it generates variants of the generic functions.


#4

What you describe is called „Incremental compilation“ and is being heavily worked on. Some parts of it already landed, and new improvements land every version ‒ so, to get the best out of it, it is generally good to use a new version of the compiler (or even nightly). Doing these changes inside the huge codebase of rustc is not that simple, so it takes time. I’m not sure if the version you have turns the feature on by default.

That being said, raspi is generally a slow device and rustc is heavy. Maybe if you cross-compile you’ll get better user experience.


#5

You can see that I am actually using Nightly - those -Z options only available on Nightly.

I know RPi is a relatively slower platform, but the same thing happen to my other (bigger) project as well. So this is why I am asking.


#6

Can you run the command with -Zincremental-info after doing a small change?

EDIT: and with -Zhuman-readable-cgu-names


#7

I compiled the same small program in my desktop computer (Windows 10), it took 15 seconds for a “cached” build. This is much better but still under expectation.


#8

The change I made: remove indent for the public directory detection.

...
    metadata("public")
    .or_else(|_| {
        create_dir("public")?;
        metadata("public")
    })?;
...

command:

cargo rustc -- -Zincremental-info -Zhuman-readable-cgu-names > out1

output:

[incremental] session directory: 267 files hard-linked
[incremental] session directory: 0 files copied
[incremental]
[incremental] DepGraph Statistics
[incremental] ------------------------------------------------------------------------------------------
[incremental]
[incremental] Total Node Count: 171673
[incremental] Total Edge Count: 764762
[incremental] Total Edge Reads: 3168224
[incremental] Total Duplicate Edge Reads: 2861522
[incremental]
[incremental]  Node Kind                           | Node Frequency   | Node Count  | Avg. Edge Count  |
[incremental] -------------------------------------|------------------|-------------|------------------|
[incremental]  Layout                              |            11.0% |       18904 |              1.6 |
[incremental]  TypeOfItem                          |            11.0% |       18847 |              1.2 |
[incremental]  ImplementationsOfTrait              |             9.2% |       15876 |              1.0 |
[incremental]  ImplTraitRef                        |             6.7% |       11420 |              1.1 |
[incremental]  ImplParent                          |             6.4% |       10915 |              1.0 |
[incremental]  TraitSelect                         |             4.5% |        7742 |              5.8 |
[incremental]  InstanceSymbolName                  |             4.2% |        7244 |              9.8 |
[incremental]  EvaluateObligation                  |             3.8% |        6471 |              1.0 |
[incremental]  ItemAttrs                           |             3.0% |        5205 |              1.0 |
[incremental]  GenericsOfItem                      |             2.3% |        3889 |              1.0 |
[incremental]  IsSized                             |             1.8% |        3025 |              2.1 |
[incremental]  AdtDefOfItem                        |             1.7% |        2929 |              3.0 |
[incremental]  TraitOfItem                         |             1.7% |        2853 |              1.0 |
[incremental]  InstanceDefSizeEstimate             |             1.6% |        2801 |              1.0 |
[incremental]  NormalizeTyAfterErasingRegions      |             1.6% |        2705 |              1.9 |
[incremental]  AssociatedItems                     |             1.5% |        2640 |              1.0 |
[incremental]  FnSignature                         |             1.4% |        2450 |              1.3 |
[incremental]  DescribeDef                         |             1.3% |        2312 |              1.0 |
[incremental]  ItemChildren                        |             1.3% |        2280 |              1.0 |
[incremental]  MirOptimized                        |             1.3% |        2271 |              1.9 |
[incremental]  IsMirAvailable                      |             1.3% |        2265 |              1.0 |
[incremental]  CodegenFnAttrs                      |             1.3% |        2265 |              2.0 |
[incremental]  IsForeignItem                       |             1.3% |        2264 |              1.0 |
[incremental]  IsReachableNonGeneric               |             1.3% |        2263 |              1.0 |
[incremental]  SymbolName                          |             1.3% |        2252 |              4.6 |
[incremental]  NeedsDrop                           |             1.3% |        2170 |              2.7 |
[incremental]  PredicatesOfItem                    |             1.3% |        2153 |              1.0 |
[incremental]  IsCopy                              |             1.2% |        2037 |              2.1 |
[incremental]  FulfillObligation                   |             1.1% |        1812 |              8.4 |
[incremental]  ConstEval                           |             1.1% |        1807 |             18.3 |
[incremental]  EraseRegionsTy                      |             1.0% |        1743 |              2.3 |
[incremental]  DefSpan                             |             0.9% |        1591 |              1.0 |
[incremental]  UpstreamMonomorphizationsFor        |             0.8% |        1356 |              1.0 |
[incremental]  IsConstFn                           |             0.7% |        1275 |              1.0 |
[incremental]  MirShim                             |             0.7% |        1158 |             10.3 |
[incremental]  NormalizeProjectionTy               |             0.6% |         947 |             12.8 |
[incremental]  IsFreeze                            |             0.5% |         933 |              2.1 |
[incremental]  IsCodegenedItem                     |             0.5% |         801 |              1.0 |
[incremental]  AssociatedItemDefIds                |             0.4% |         755 |              1.0 |
[incremental]  ImplPolarity                        |             0.4% |         748 |              1.0 |
[incremental]  SizedConstraint                     |             0.4% |         746 |              3.0 |
[incremental]  ParamEnv                            |             0.4% |         676 |              2.6 |
[incremental]  AdtDestructor                       |             0.4% |         620 |              5.2 |
[incremental]  DtorckConstraint                    |             0.2% |         293 |              7.4 |
[incremental]  CodegenUnit                         |             0.2% |         264 |              1.0 |
[incremental]  CompileCodegenUnit                  |             0.2% |         264 |           1147.8 |
[incremental]  ImplDefaultness                     |             0.1% |         183 |              1.0 |
[incremental]  SuperPredicatesOfItem               |             0.1% |         138 |              1.0 |
[incremental]  NativeLibraries                     |             0.1% |         127 |              1.0 |
[incremental]  CrateName                           |             0.1% |         127 |              1.0 |
[incremental]  ExportedSymbols                     |             0.1% |         127 |             27.3 |
[incremental]  IsPanicRuntime                      |             0.1% |         127 |              1.0 |
[incremental]  CrateDisambiguator                  |             0.1% |         127 |              1.0 |
[incremental]  OriginalCrateName                   |             0.1% |         127 |              1.0 |
[incremental]  IsCompilerBuiltins                  |             0.1% |         127 |              1.0 |
[incremental]  IsSanitizerRuntime                  |             0.1% |         126 |              1.0 |
[incremental]  MissingExternCrateItem              |             0.1% |         126 |              1.0 |
[incremental]  MissingLangItems                    |             0.1% |         126 |              1.0 |
[incremental]  TraitImpls                          |             0.1% |         126 |            229.6 |
[incremental]  CrateMetadata                       |             0.1% |         126 |              0.0 |
[incremental]  DefinedLangItems                    |             0.1% |         126 |              1.0 |
[incremental]  IsProfilerRuntime                   |             0.1% |         126 |              1.0 |
[incremental]  DepKind                             |             0.1% |         126 |              1.0 |
[incremental]  UsedCrateSource                     |             0.1% |         126 |              1.0 |
[incremental]  IsNoBuiltins                        |             0.1% |         126 |              1.0 |
[incremental]  ObjectSafety                        |             0.1% |         125 |             26.9 |
[incremental]  GetPanicStrategy                    |             0.1% |         124 |              1.0 |
[incremental]  TraitDefOfItem                      |             0.1% |         117 |              1.0 |
[incremental]  SpecializationGraph                 |             0.1% |         103 |            212.9 |
[incremental]  Visibility                          |             0.0% |          58 |              1.0 |
[incremental]  VtableMethods                       |             0.0% |          42 |             30.3 |
[incremental]  ReachableNonGenerics                |             0.0% |          38 |              2.0 |
[incremental]  LookupDeprecationEntry              |             0.0% |          32 |              1.0 |
[incremental]  DropckOutlives                      |             0.0% |          26 |             23.5 |
[incremental]  ItemVariances                       |             0.0% |          21 |              1.0 |
[incremental]  ExternCrate                         |             0.0% |          20 |              1.0 |
[incremental]  HirBody                             |             0.0% |          18 |              0.0 |
[incremental]  HasTypeckTables                     |             0.0% |          18 |              1.0 |
[incremental]  Hir                                 |             0.0% |          18 |              0.0 |
[incremental]  LookupStability                     |             0.0% |          17 |              1.0 |
[incremental]  ObjectLifetimeDefaults              |             0.0% |          17 |              1.0 |
[incremental]  CheckItemWellFormed                 |             0.0% |          17 |              2.2 |
[incremental]  InherentImpls                       |             0.0% |          13 |              1.0 |
[incremental]  MaybeUnusedTraitImport              |             0.0% |          13 |              0.0 |
[incremental]  ConstIsRvaluePromotableToStatic     |             0.0% |           7 |              1.9 |
[incremental]  RegionScopeTree                     |             0.0% |           6 |              1.3 |
[incremental]  Specializes                         |             0.0% |           6 |             14.2 |
[incremental]  TypeckTables                        |             0.0% |           6 |            151.7 |
[incremental]  RvaluePromotableMap                 |             0.0% |           6 |             37.0 |
[incremental]  MirValidated                        |             0.0% |           6 |             26.5 |
[incremental]  CheckMatch                          |             0.0% |           6 |             10.0 |
[incremental]  MirBorrowCheck                      |             0.0% |           6 |              3.0 |
[incremental]  MirBuilt                            |             0.0% |           6 |             28.8 |
[incremental]  UsedTraitImports                    |             0.0% |           6 |              1.0 |
[incremental]  BorrowCheck                         |             0.0% |           6 |             25.5 |
[incremental]  MirConst                            |             0.0% |           6 |             67.8 |
[incremental]  Freevars                            |             0.0% |           6 |              0.0 |
[incremental]  UnsafetyCheckResult                 |             0.0% |           6 |              8.7 |
[incremental]  CoerceUnsizedInfo                   |             0.0% |           4 |              1.0 |
[incremental]  IsUnreachableLocalDefinition        |             0.0% |           4 |              1.0 |
[incremental]  SubstituteNormalizeAndTestPredicates|             0.0% |           2 |              2.0 |
[incremental]  ExternModStmtCnum                   |             0.0% |           2 |              0.0 |
[incremental]  PluginRegistrarFn                   |             0.0% |           2 |              1.0 |
[incremental]  InScopeTraits                       |             0.0% |           2 |              0.0 |
[incremental]  Reachability                        |             0.0% |           1 |              3.0 |
[incremental]  CollectAndPartitionMonoItems        |             0.0% |           1 |              1.0 |
[incremental]  CoherenceInherentImplOverlapCheck   |             0.0% |           1 |              1.0 |
[incremental]  PostorderCnums                      |             0.0% |           1 |              0.0 |
[incremental]  UpstreamMonomorphizations           |             0.0% |           1 |            127.0 |
[incremental]  CrateVariances                      |             0.0% |           1 |              1.0 |
[incremental]  MaybeUnusedExternCrates             |             0.0% |           1 |              0.0 |
[incremental]  CrateHash                           |             0.0% |           1 |              0.0 |
[incremental]  LinkArgs                            |             0.0% |           1 |              1.0 |
[incremental]  NamedRegion                         |             0.0% |           1 |              1.0 |
[incremental]  OutputFilenames                     |             0.0% |           1 |              0.0 |
[incremental]  Features                            |             0.0% |           1 |              0.0 |
[incremental]  PrivacyAccessLevels                 |             0.0% |           1 |              1.0 |
[incremental]  ModuleExports                       |             0.0% |           1 |              0.0 |
[incremental]  MirKeys                             |             0.0% |           1 |              3.0 |
[incremental]  TypeckBodiesKrate                   |             0.0% |           1 |              9.0 |
[incremental]  Coherence                           |             0.0% |           1 |              1.0 |
[incremental]  TargetFeaturesWhitelist             |             0.0% |           1 |              0.0 |
[incremental]  LintLevels                          |             0.0% |           1 |              1.0 |
[incremental]  CoherenceCheckTrait                 |             0.0% |           1 |              2.0 |
[incremental]  VisibleParentMap                    |             0.0% |           1 |           2407.0 |
[incremental]  StabilityIndex                      |             0.0% |           1 |              1.0 |
[incremental]  AllLocalTraitImpls                  |             0.0% |           1 |              0.0 |
[incremental]  AllCrateNums                        |             0.0% |           1 |              0.0 |
[incremental]  ResolveLifetimes                    |             0.0% |           1 |              8.0 |
[incremental]  Krate                               |             0.0% |           1 |              0.0 |
[incremental]  MirConstQualif                      |             0.0% |           1 |              1.0 |
[incremental]  GetLangItems                        |             0.0% |           1 |              0.0 |
[incremental] ------------------------------------------------------------------------------------------
[incremental]
[incremental] Re-using 0 out of 264 modules

hightlight: [incremental] Re-using 0 out of 264 modules

The good part is, when you have errors, 99% of the time you get the error message instantly. When you are waiting, you are very likely witnessing a successful build. This makes me feels better when waiting, and allows me to sit back and have a rest, then think about the next step of coding.


#9

Yeah, that seems like some kind of bug. Do you also get no re-use on mainstream platforms too (i.e. not on the RasPi)?


#11

Same procedure, for nightly-x86_64-pc-windows-msvc,

[incremental]
[incremental] DepGraph Statistics
[incremental] ------------------------------------------------------------------------------------------
[incremental]
[incremental] Total Node Count: 212892
[incremental] Total Edge Count: 842795
[incremental] Total Edge Reads: 3838804
[incremental] Total Duplicate Edge Reads: 3027006
[incremental]
[incremental]  Node Kind                           | Node Frequency   | Node Count  | Avg. Edge Count  |
[incremental] -------------------------------------|------------------|-------------|------------------|
[incremental]  TypeOfItem                          |            15.4% |       32691 |              1.3 |
[incremental]  ImplTraitRef                        |             9.7% |       20700 |              1.1 |
[incremental]  ImplParent                          |             9.5% |       20203 |              1.0 |
[incremental]  Layout                              |             8.9% |       18878 |              1.7 |
[incremental]  ImplementationsOfTrait              |             7.8% |       16506 |              1.0 |
[incremental]  ItemAttrs                           |             4.6% |        9812 |              1.0 |
[incremental]  AdtDefOfItem                        |             3.5% |        7544 |              3.0 |
[incremental]  InstanceSymbolName                  |             3.4% |        7244 |              9.8 |
[incremental]  EvaluateObligation                  |             3.0% |        6477 |              1.0 |
[incremental]  TraitSelect                         |             2.0% |        4293 |              6.5 |
[incremental]  GenericsOfItem                      |             1.8% |        3858 |              1.0 |
[incremental]  ItemChildren                        |             1.6% |        3414 |              1.0 |
[incremental]  IsSized                             |             1.4% |        3063 |              2.0 |
[incremental]  TraitOfItem                         |             1.3% |        2828 |              1.0 |
[incremental]  InstanceDefSizeEstimate             |             1.3% |        2806 |              1.0 |
[incremental]  NormalizeTyAfterErasingRegions      |             1.3% |        2693 |              1.9 |
[incremental]  AssociatedItems                     |             1.2% |        2639 |              1.0 |
[incremental]  FnSignature                         |             1.1% |        2443 |              1.3 |
[incremental]  DescribeDef                         |             1.1% |        2265 |              1.0 |
[incremental]  IsForeignItem                       |             1.1% |        2259 |              1.0 |
[incremental]  CodegenFnAttrs                      |             1.1% |        2259 |              2.0 |
[incremental]  IsReachableNonGeneric               |             1.1% |        2258 |              1.0 |
[incremental]  SymbolName                          |             1.1% |        2254 |              4.6 |
[incremental]  MirOptimized                        |             1.1% |        2236 |              1.9 |
[incremental]  IsMirAvailable                      |             1.0% |        2229 |              1.0 |
[incremental]  NeedsDrop                           |             1.0% |        2161 |              2.8 |
[incremental]  PredicatesOfItem                    |             1.0% |        2149 |              1.0 |
[incremental]  IsCopy                              |             0.9% |        2016 |              2.1 |
[incremental]  IsDllimportForeignItem              |             0.9% |        1861 |              1.0 |
[incremental]  FulfillObligation                   |             0.9% |        1815 |              8.4 |
[incremental]  ConstEval                           |             0.8% |        1743 |             18.5 |
[incremental]  DefSpan                             |             0.7% |        1565 |              1.0 |
[incremental]  UpstreamMonomorphizationsFor        |             0.6% |        1357 |              1.0 |
[incremental]  EraseRegionsTy                      |             0.6% |        1323 |              2.3 |
[incremental]  IsConstFn                           |             0.6% |        1279 |              1.0 |
[incremental]  MirShim                             |             0.5% |        1165 |             10.4 |
[incremental]  NormalizeProjectionTy               |             0.4% |         947 |             12.8 |
[incremental]  IsFreeze                            |             0.4% |         927 |              2.1 |
[incremental]  IsCodegenedItem                     |             0.4% |         796 |              1.0 |
[incremental]  AssociatedItemDefIds                |             0.4% |         756 |              1.0 |
[incremental]  SizedConstraint                     |             0.4% |         756 |              3.0 |
[incremental]  ImplPolarity                        |             0.3% |         742 |              1.0 |
[incremental]  ParamEnv                            |             0.3% |         690 |              2.6 |
[incremental]  AdtDestructor                       |             0.3% |         615 |              5.3 |
[incremental]  DtorckConstraint                    |             0.1% |         285 |              7.5 |
[incremental]  CompileCodegenUnit                  |             0.1% |         263 |           1161.3 |
[incremental]  CodegenUnit                         |             0.1% |         263 |              1.0 |
[incremental]  ImplDefaultness                     |             0.1% |         183 |              1.0 |
[incremental]  SuperPredicatesOfItem               |             0.1% |         138 |              1.0 |
[incremental]  CrateName                           |             0.1% |         132 |              1.0 |
[incremental]  IsCompilerBuiltins                  |             0.1% |         132 |              1.0 |
[incremental]  CrateDisambiguator                  |             0.1% |         132 |              1.0 |
[incremental]  OriginalCrateName                   |             0.1% |         132 |              1.0 |
[incremental]  NativeLibraries                     |             0.1% |         132 |              1.0 |
[incremental]  IsPanicRuntime                      |             0.1% |         132 |              1.0 |
[incremental]  ExportedSymbols                     |             0.1% |         132 |             34.5 |
[incremental]  UsedCrateSource                     |             0.1% |         131 |              1.0 |
[incremental]  IsProfilerRuntime                   |             0.1% |         131 |              1.0 |
[incremental]  IsNoBuiltins                        |             0.1% |         131 |              1.0 |
[incremental]  CrateMetadata                       |             0.1% |         131 |              0.0 |
[incremental]  MissingLangItems                    |             0.1% |         131 |              1.0 |
[incremental]  MissingExternCrateItem              |             0.1% |         131 |              1.0 |
[incremental]  IsSanitizerRuntime                  |             0.1% |         131 |              1.0 |
[incremental]  DefinedLangItems                    |             0.1% |         131 |              1.0 |
[incremental]  DepKind                             |             0.1% |         131 |              1.0 |
[incremental]  GetPanicStrategy                    |             0.1% |         129 |              1.0 |
[incremental]  TraitImpls                          |             0.1% |         126 |            344.5 |
[incremental]  ObjectSafety                        |             0.1% |         125 |             26.9 |
[incremental]  TraitDefOfItem                      |             0.1% |         117 |              1.0 |
[incremental]  SpecializationGraph                 |             0.0% |         103 |            393.3 |
[incremental]  Visibility                          |             0.0% |          44 |              1.0 |
[incremental]  VtableMethods                       |             0.0% |          42 |             30.3 |
[incremental]  DllimportForeignItems               |             0.0% |          37 |              2.0 |
[incremental]  ReachableNonGenerics                |             0.0% |          37 |              2.0 |
[incremental]  ForeignModules                      |             0.0% |          37 |              1.0 |
[incremental]  LookupDeprecationEntry              |             0.0% |          32 |              1.0 |
[incremental]  LookupStability                     |             0.0% |          27 |              1.0 |
[incremental]  ExternCrate                         |             0.0% |          19 |              1.0 |
[incremental]  HirBody                             |             0.0% |          18 |              0.0 |
[incremental]  Hir                                 |             0.0% |          18 |              0.0 |
[incremental]  HasTypeckTables                     |             0.0% |          17 |              1.0 |
[incremental]  CheckItemWellFormed                 |             0.0% |          17 |              2.2 |
[incremental]  DropckOutlives                      |             0.0% |          17 |             34.9 |
[incremental]  ObjectLifetimeDefaults              |             0.0% |          17 |              1.0 |
[incremental]  ItemVariances                       |             0.0% |          13 |              1.1 |
[incremental]  MaybeUnusedTraitImport              |             0.0% |          13 |              0.0 |
[incremental]  InherentImpls                       |             0.0% |          11 |              1.0 |
[incremental]  ConstIsRvaluePromotableToStatic     |             0.0% |           7 |              1.9 |
[incremental]  UnsafetyCheckResult                 |             0.0% |           6 |              8.2 |
[incremental]  CheckMatch                          |             0.0% |           6 |              9.8 |
[incremental]  MirBuilt                            |             0.0% |           6 |             24.8 |
[incremental]  Freevars                            |             0.0% |           6 |              0.0 |
[incremental]  MirBorrowCheck                      |             0.0% |           6 |              3.0 |
[incremental]  RvaluePromotableMap                 |             0.0% |           6 |             31.3 |
[incremental]  UsedTraitImports                    |             0.0% |           6 |              1.0 |
[incremental]  MirValidated                        |             0.0% |           6 |             23.8 |
[incremental]  BorrowCheck                         |             0.0% |           6 |             21.3 |
[incremental]  RegionScopeTree                     |             0.0% |           6 |              1.3 |
[incremental]  TypeckTables                        |             0.0% |           6 |            130.7 |
[incremental]  MirConst                            |             0.0% |           6 |             56.0 |
[incremental]  Specializes                         |             0.0% |           5 |             15.4 |
[incremental]  IsUnreachableLocalDefinition        |             0.0% |           4 |              1.0 |
[incremental]  CoerceUnsizedInfo                   |             0.0% |           4 |              1.0 |
[incremental]  PluginRegistrarFn                   |             0.0% |           2 |              1.0 |
[incremental]  InScopeTraits                       |             0.0% |           2 |              0.0 |
[incremental]  ExternModStmtCnum                   |             0.0% |           2 |              0.0 |
[incremental]  SubstituteNormalizeAndTestPredicates|             0.0% |           2 |              2.0 |
[incremental]  Features                            |             0.0% |           1 |              0.0 |
[incremental]  CoherenceInherentImplOverlapCheck   |             0.0% |           1 |              1.0 |
[incremental]  CrateHash                           |             0.0% |           1 |              0.0 |
[incremental]  StabilityIndex                      |             0.0% |           1 |              1.0 |
[incremental]  GetLangItems                        |             0.0% |           1 |              0.0 |
[incremental]  LintLevels                          |             0.0% |           1 |              1.0 |
[incremental]  Reachability                        |             0.0% |           1 |              3.0 |
[incremental]  PrivacyAccessLevels                 |             0.0% |           1 |              1.0 |
[incremental]  TargetFeaturesWhitelist             |             0.0% |           1 |              0.0 |
[incremental]  AllCrateNums                        |             0.0% |           1 |              0.0 |
[incremental]  LinkArgs                            |             0.0% |           1 |              1.0 |
[incremental]  TypeckBodiesKrate                   |             0.0% |           1 |              9.0 |
[incremental]  CrateVariances                      |             0.0% |           1 |              1.0 |
[incremental]  CollectAndPartitionMonoItems        |             0.0% |           1 |              1.0 |
[incremental]  Coherence                           |             0.0% |           1 |              1.0 |
[incremental]  MaybeUnusedExternCrates             |             0.0% |           1 |              0.0 |
[incremental]  Krate                               |             0.0% |           1 |              0.0 |
[incremental]  CoherenceCheckTrait                 |             0.0% |           1 |              2.0 |
[incremental]  PostorderCnums                      |             0.0% |           1 |              0.0 |
[incremental]  OutputFilenames                     |             0.0% |           1 |              0.0 |
[incremental]  MirConstQualif                      |             0.0% |           1 |              1.0 |
[incremental]  AllLocalTraitImpls                  |             0.0% |           1 |              0.0 |
[incremental]  VisibleParentMap                    |             0.0% |           1 |           3546.0 |
[incremental]  ResolveLifetimes                    |             0.0% |           1 |              6.0 |
[incremental]  UpstreamMonomorphizations           |             0.0% |           1 |            132.0 |
[incremental]  ModuleExports                       |             0.0% |           1 |              0.0 |
[incremental] ------------------------------------------------------------------------------------------
[incremental]
[incremental] Re-using 0 out of 263 modules

Same thing: [incremental] Re-using 0 out of 263 modules


#12

Keep in mind that it is expected that +/- 50% of compile time is spent in LLVM code generation, because that is a very slow process, not to mention single-threaded (this is a pretty big waste of potential resources anno 2018). As the rest of rustc gets faster, the expectation should be that that percentage is going to increase.

Personally I’d love to see LLVM tossed in favor of a more principled approach (buggy C++ code that unexpectedly breaks stable rustc is not my idea of principled, and just wastes goodwill among users). That principled approach would then enable things like multi-threaded compiler passes where conceptually feasible. With LLVM, I don’t see this happening for the next 5+ years, because of the architecture alone.

The problem with “swapping out LLVM” is that a lot of time is spent on it, in the order ot 10s of man-years by now. Thus it is not so easily replicated. That said, I think it is still worthwhile as I cannot fathom a world that is still hampered by outdated single-threaded programming models* in about 10 years, and at very fundamental levels to boot (optimization, code generation, linking).

*Contrast this with a problem that is inherently serial, in which case using multi-threadedness can only hurt performance.


#13

I thought that LLVM more or less recently gained the ability to do do some optimization in parallel (“multiple CGUs” (code generation units) is the technical term for this I always see on rustc issues) and linking in parallel (that was part of what “ThinLTO” does, and why it was a blocker for enabling multiple CGUs by default, right?). Is there some other part of LLVM you’re referring to?


#14

I wasn’t aware it gained these capabilities. In the face of this news, LLVM’s poor performance is even less excusable. Perhaps it needs to be explicitly activated by consuming projects (e.g. rustc)?


#15

My understanding was that it has been enabled: https://github.com/rust-lang/rust/issues/45320


#16

Ah now I see what you mean. I think there is a miscommunication. What I was saying is that LLVM itself is single-threaded, and AFAIK that is still true. The issue you’re referring to looks like it’s about making the best of that mad single-threaded world, by inventing the concept of “code gen units”. Each code gen unit drives LLVM serially on its own, and works together with the rest to gain some multithreaded capability for rustc.

I can’t be 100% certain without designing, writing and running benchmarks, but I’m pretty sure that this is a rather suboptimal result, although it is definitely better than no multithreading at all (e.g. setting the number of code gen units to 1).


#17

We’ve long been using a multi-process architecture at CERN for data processing. Here are the main take-aways:

  • That’s certainly the easiest way to port an existing single-threaded codebase to multi-core hardware.
  • Synchronization performance is meh compared with what one can eachieve with threads, but it may not matter since well-designed “embarrassingly parallel” applications do not need to synchronize often.
  • Main reason why we’re now switching to multi-threading is that this design is memory-inefficient. Its memory usage scales linearly (as it’s hard to share state between processes, you end up duplicating it), which on modern memory-constrained machines is too much, and it trashes caches like a pig.

#18

The community consensus on this in an earlier discussion seemed to come to the conclusion that reimplementing LLVM was not reasonably feasible or worthwhile and that something like Cretonne should be pursued as a possible way forward:


#19

With LLVM, I don’t see this happening for the next 5+ years, because of the architecture alone.

It actually happened 5 years ago but it wasn’t merged. Intel parallelized LLVM backend code generation, for the reason which is basically same as Rust. In their words, “Our business need to compile C/C++ source files into LLVM IR and link them into a big BC file; the big BC file is then compiled into binary code on different arch/target devices”.

http://lists.llvm.org/pipermail/llvm-dev/2013-July/063795.html

I find this extremely unfortunate but what can I do.


#20

That really is too bad, and makes it even less likely to happen within LLVM itself. That does make something more focused like Cretonne even more interesting though, I’d say.


#21

So, if I am right, the LLVM step is the bottleneck at the moment. It is confirmed by my outputs above: it looks like it can take up to 4 seconds for a single code unit. This is not a lot but I have 264 code units so the total is not negligible.

Now my question is: why do we need so many code units to be sent to LLVM? If I understand right, after monopolization the MIR code should be ready to link: all generic function variants are generated, all type sizes are calculated, so all references inside Rust is already resolvable, only those references to c libs are remain unknown (for example, glibc references or kernel.dll references).

So in theory we can put all code units together, remove dead codes to reduce the size, and then run the LLVM IR generator for the single code unit, and finally send to LLVM. This may also help the next time comsuming step in my case: the linker step also takes a long time for 264 code units.