search for: madiyaan

Displaying 9 results from an estimated 9 matches for "madiyaan".

2009 Sep 17
2
[LLVMdev] Forcing function inline not working
...2reg If it does work for you, can you tell me the exact flags you used for clang or llvm-gcc to produce the .bc file and the exact flags you specified when you invoked opt? Does the inlining happen at clang level or after opt? Dale Johannesen wrote: > > > On Sep 16, 2009, at 6:55 PM, madiyaan wrote: > >> >> I have the following code: >> >> static inline void foo() __attribute((always_inline)); >> >> int a; >> static inline void foo() >> { >> a++; >> } >> >> int main(int argc, char *argv[]) >> { >>...
2009 Sep 17
0
[LLVMdev] Forcing function inline not working
On Sep 16, 2009, at 6:55 PM, madiyaan wrote: > > I have the following code: > > static inline void foo() __attribute((always_inline)); > > int a; > static inline void foo() > { > a++; > } > > int main(int argc, char *argv[]) > { > foo(); > return 0; > } This works fine in current sou...
2009 Sep 17
0
[LLVMdev] Forcing function inline not working
...gv) nounwind { entry: call void @foo() ret i32 0 } define linkonce_odr void @foo() nounwind alwaysinline { entry: %tmp = load i32* @a ; <i32> [#uses=1] %inc = add i32 %tmp, 1 ; <i32> [#uses=1] store i32 %inc, i32* @a ret void } Javier On Thu, 17 Sep 2009 09:45:14 -0700 (PDT), madiyaan <ahmadsharif at hotmail.com> wrote: > Thanks for your message. However, even with using version 2.5 of llvm the > function is not inlined. Can you try this with your llvm with the same opt > flags, which are as follows? > > -O3 -debug-only=inline -mem2reg > > If it does...
2009 Sep 17
2
[LLVMdev] Forcing function inline not working
I have the following code: static inline void foo() __attribute((always_inline)); int a; static inline void foo() { a++; } int main(int argc, char *argv[]) { foo(); return 0; } However, the code generated by llvm 2.4 toolchain does not inline this function. opt retains the function call. Here is the output when I try to compile with -debug-only=inline:
2008 Sep 20
0
[LLVMdev] Run-time optimization using profile data
On Sat, Sep 20, 2008 at 12:12 PM, madiyaan <ahmadsharif at hotmail.com> wrote: > Hello: > > I am new to llvm. I am looking for an example somewhere, or a > walkthrough/guide on how to do runtime optimization using llvm. Ideally, I > would like to: > > 1. Compile the program from C to LLVM or native with LLVM infor...
2008 Sep 30
2
[LLVMdev] Inserting MachineBasicBlock(s) before a MachineBasicBlock
I want to be able to do two things with LLVM (both just before code emission): 1. Insert a MachineBasicBlock just before a MachineBasicBlock. There is a function called AddPredecessor(). However, the comment says that it does not update the actual CFG. I want to redirect all CFG edges that are incoming to this MachineBasicBlock to the new one I create, and add just one outgoing edge (no branch)
2008 Sep 20
2
[LLVMdev] Run-time optimization using profile data
Hello: I am new to llvm. I am looking for an example somewhere, or a walkthrough/guide on how to do runtime optimization using llvm. Ideally, I would like to: 1. Compile the program from C to LLVM or native with LLVM information embedded in the binary. 2. Run the binary under LLVM's interpreter, and profile the data. I hope LLVM has support for all this, and I don't have to insert my own
2008 Nov 02
0
[LLVMdev] Strange behaviour with profile data loading
Hello: I am following the example code in BasicBlockPlacement.cpp. That transformation relies on basic block execution frequencies that have been read from a profile file. This is how it loads the profile data: 1. In getAnalysisUsage, it calls addRequired<ProfileInfo>(), and 2. In the runOnFunction, it calls getAnalysis<ProfileInfo>() which returns a ProfileInfo object pointer.
2008 Dec 04
0
[LLVMdev] Dumping profile information at an arbitrary point in time
Hello: I have been able to successfully add a profiling pass to my PassManager. I now want to dump this profile information arbitrary (like maybe after 1 second of running the program). The problem is that the profile functions are in a separate library which is loaded dynamically. I cannot call: EdgeProfAtExitHandler(); directly because of linker problems (EdgeProfAtExitHandler() is