about summary refs log tree commit diff
path: root/src/rt/sync/rust_thread.cpp
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-09-30 18:29:42 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-10-01 02:57:59 -0400
commit5e4ae4f45fab7ce1a984d5b5281e129f76486d10 (patch)
treebf425dc3058bea3c01093e2a4ddf15561d24547d /src/rt/sync/rust_thread.cpp
parent1dbc467fd957a0daf3fd935ccce0fc9ea5d1dcd8 (diff)
downloadrust-5e4ae4f45fab7ce1a984d5b5281e129f76486d10.tar.gz
rust-5e4ae4f45fab7ce1a984d5b5281e129f76486d10.zip
make small (<= size_of::<int>()) tuples immediate
    fn foo() -> (u32, u8, u8, u8, u8) {
        (4, 5, 6, 7, 8)
    }

Before:

    ; Function Attrs: nounwind uwtable
    define void @_ZN3foo18hbb616262f874f8daf4v0.0E({ i32, i8, i8, i8, i8 }* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
    "function top level":
      %2 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 0
      store i32 4, i32* %2, align 4
      %3 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 1
      store i8 5, i8* %3, align 4
      %4 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 2
      store i8 6, i8* %4, align 1
      %5 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 3
      store i8 7, i8* %5, align 2
      %6 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 4
      store i8 8, i8* %6, align 1
      ret void
    }

After:

    ; Function Attrs: nounwind readnone uwtable
    define { i32, i8, i8, i8, i8 } @_ZN3foo18hbb616262f874f8daf4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
    "function top level":
      ret { i32, i8, i8, i8, i8 } { i32 4, i8 5, i8 6, i8 7, i8 8 }
    }
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
0 files changed, 0 insertions, 0 deletions