diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-15 06:34:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-15 06:34:48 +0000 |
commit | ef423ebdd13d8fb9b44169853f4b066f8efdb118 (patch) | |
tree | 5713b8f16150e52b54d613c56cea9e40e094e86b /lib | |
parent | 2ba3b621495b89f45521e627554a40a9885899e7 (diff) | |
download | external_llvm-ef423ebdd13d8fb9b44169853f4b066f8efdb118.zip external_llvm-ef423ebdd13d8fb9b44169853f4b066f8efdb118.tar.gz external_llvm-ef423ebdd13d8fb9b44169853f4b066f8efdb118.tar.bz2 |
gvn now hoists this load out of the hot non-call path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/README.txt | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index e0cab2a..c19fd9c 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -1404,32 +1404,3 @@ void foo (int a, struct T b) //===---------------------------------------------------------------------===// -This C++ file: -void g(); struct A { int n; int m; A& operator++(void) { ++n; if (n == m) g(); -return *this; } A() : n(0), m(0) { } friend bool operator!=(A const& a1, -A const& a2) { return a1.n != a2.n; } }; void testfunction(A& iter) { A const -end; while (iter != end) ++iter; } - -Compiles down to: - -bb: ; preds = %bb3.backedge, %bb.nph - %.rle = phi i32 [ %1, %bb.nph ], [ %7, %bb3.backedge ] ; <i32> [#uses=1] - %4 = add i32 %.rle, 1 ; <i32> [#uses=2] - store i32 %4, i32* %0, align 4 - %5 = load i32* %3, align 4 ; <i32> [#uses=1] - %6 = icmp eq i32 %4, %5 ; <i1> [#uses=1] - br i1 %6, label %bb1, label %bb3.backedge - -bb1: ; preds = %bb - tail call void @_Z1gv() - br label %bb3.backedge - -bb3.backedge: ; preds = %bb, %bb1 - %7 = load i32* %0, align 4 ; <i32> [#uses=2] - - -The %7 load is partially redundant with the store of %4 to %0, GVN's PRE -should remove it, but it doesn't apply to memory objects. - -//===---------------------------------------------------------------------===// - |