[LLVMdev] Does getelementptr get optimized in compile-time?

Journeyer J. Joh oosaprogrammer at gmail.com
Wed Jan 2 21:08:14 PST 2013


Hello List,

I've got a question about getelementptr.

I've been told that getelementptr is evaluated in compile-time NOT in run-time.

So I tested it with clang web compiler below.
http://llvm.org/demo/index.cgi

But with LTO nor Standard, neither one optimize getelementptr out.

Does getelementptr get evaluated in compile-time?
Or doesn't it get executed in run-time? (I believed so. Now I am wondering.)

Thank you in advance.
-- 
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------



More information about the llvm-dev mailing list