I have been using LLVM/Clang and its Intermediate Representation(IR) for a while now. I have recently started working with GCC. I want to dump IR bitcode to a file, similar to (-flto -save-temps flag) in LLVM.
I can get gimple IR using '-fdump-tree-cfg-raw' flag while building, but with multiple input files, this generates an a '.gimple' file for each source.
To get the view of the entire program, in LLVM, I used '-flto -Wl,-plugin-opt=save-temps' in LDFLAGS. What is the correct way of getting the same behavior in GCC.
I tried using 'gcc -fdump-tree-cfg-raw -flto -save-temps src1.c main.c', but I do not get the combined IR file. The outputs include .o,.s,.i files for each source and .cfg file for each.