diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-15 00:58:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-15 00:58:53 +0000 |
commit | 33930ad7bdfbc4c351e5677d1102c3af24787c6e (patch) | |
tree | cdfee884203d2a2808c7029a301b49800379eac3 /llvm/lib/Transforms/LevelRaise.cpp | |
parent | 969d6fbcee30a3e82e102beb53d14e7c3cbc8bb6 (diff) | |
download | bcm5719-llvm-33930ad7bdfbc4c351e5677d1102c3af24787c6e.tar.gz bcm5719-llvm-33930ad7bdfbc4c351e5677d1102c3af24787c6e.zip |
Improve codegen for the LLVM offsetof/sizeof "operator". Before we compiled
this LLVM function:
int %foo() {
ret int cast (int** getelementptr (int** null, int 1) to int)
}
into:
foo:
mov %EAX, 0
lea %EAX, DWORD PTR [%EAX + 4]
ret
now we compile it into:
foo:
mov %EAX, 4
ret
This sequence is frequently generated by the MSIL front-end, and soon the malloc lowering pass and
Java front-ends as well..
-Chris
llvm-svn: 14834
Diffstat (limited to 'llvm/lib/Transforms/LevelRaise.cpp')
0 files changed, 0 insertions, 0 deletions