summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.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
commit4311ad2daecfbdb584d6db4fd5716d3f9b674f81 (patch)
treebe0399d25c23c62cd4232085dd5449639ca393fe /clang/lib/CodeGen/CodeGenModule.cpp
parentac95515741692bd61e4ea774b9ad3c7a9b414149 (diff)
downloadbcm5719-llvm-4311ad2daecfbdb584d6db4fd5716d3f9b674f81.tar.gz
bcm5719-llvm-4311ad2daecfbdb584d6db4fd5716d3f9b674f81.zip
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 ) llvm-svn: 48940
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud