aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm2cpp/CppWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-29 05:15:47 +0000
committerChris Lattner <sabre@nondot.org>2008-03-29 05:15:47 +0000
commit97ae12a98845c44807b4ee833d86c0b4d2521d05 (patch)
treedee38bd74984f4b18ae76b115358258ab89e70cb /tools/llvm2cpp/CppWriter.cpp
parentd22fe2b51f553f7eca200cd22b9e2247f9aea2ff (diff)
change iterator invalidation avoidance to just move the iterator backward
when something changes, instead of moving forward. This allows us to simplify memset lowering, inserting the memset at the end of the range of stuff we're touching instead of at the start. This, in turn, allows us to make use of the addressing instructions already used in the function instead of inserting our own. For example, we now codegen: %tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 ) instead of: %tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] %ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1] call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 ) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp/CppWriter.cpp')
0 files changed, 0 insertions, 0 deletions