llvm.org GIT mirror llvm / b886089
irbuilder is doing constant folding now by default, PR6092 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96502 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
534534 Read top-level expression:
535535 define double @""() {
536536 entry:
537 %addtmp = add double 4.000000e+00, 5.000000e+00
538 ret double %addtmp
537 ret double 9.000000e+00
539538 }
540539
541540
543542

Note how the parser turns the top-level expression into anonymous functions

544543 for us. This will be handy when we add JIT
545544 support in the next chapter. Also note that the code is very literally
546 transcribed, no optimizations are being performed. We will
545 transcribed, no optimizations are being performed except simple constant
546 folding done by IRBuilder. We will
547547 add optimizations explicitly in
548548 the next chapter.

549549