about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-05 08:41:39 -0700
committerbors <bors@rust-lang.org>2014-05-05 08:41:39 -0700
commit2be738ae36600e562fcfc9ed938e183875cd72ad (patch)
tree97b2539a920b43d36e96a8f632124ad867a08a64 /src/rustllvm/RustWrapper.cpp
parentecc18f34446cdecd42004be62805f84799733e72 (diff)
parentf62c753b8f7879607204bcf77491cc81baf9c2dc (diff)
downloadrust-2be738ae36600e562fcfc9ed938e183875cd72ad.tar.gz
rust-2be738ae36600e562fcfc9ed938e183875cd72ad.zip
auto merge of #13935 : thestinger/rust/noalias, r=pcwalton
This was removed because these could alias with `&const T` or `@mut T`
and those are now gone from the language. There are still aliasing
issues within local scopes, but this is correct for function parameters.

This also removes the no-op `noalias` marker on proc (not a pointer) and
leaves out the mention of #6750 because real type-based alias analysis
is not within the scope of best effort usage of the `noalias` attribute.

Test case:

    pub fn foo(x: &mut &mut u32) {
        **x = 5;
        **x = 5;
    }

Before:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      %2 = load i32** %0, align 8
      store i32 5, i32* %2, align 4
      ret void
    }

After:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** noalias nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      ret void
    }

Closes #12436
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions