Because we internalize early, we can potentially mark a bunch of functions as norecurse. Do this before globalopt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253451
91177308-0d34-0410-b5e6-
96231b3b80d8
PM.add(createIPSCCPPass());
// Now that we internalized some globals, see if we can hack on them!
+ PM.add(createFunctionAttrsPass()); // Add norecurse if possible.
PM.add(createGlobalOptimizerPass());
// Linking modules together can lead to duplicated global constants, only
target triple = "x86_64-apple-darwin"
+declare i32 @bar()
+
define i32 @foo() {
- ret i32 7
+ %a = call i32 @bar()
+ ret i32 %a
}
define i32 @main() {