How to make when developing machine function pass ?


I am modifying X86RetpolineThunks.cpp.

X86RetpolineThunks.cpp 's location is llvm-src/lib/Target/X86.

Which target should I use , next time use clang test.c , I can see the difference .

I found that “make llc” doesn’t work.

And either “make LLVMX86CodeGen” doen’t work.

“make clang” waste a lot of time, even -j64.

Every time modifying the file of machine function pass ,
I have to wait for 1 min.

It drive me crazy.

Which “target” should use to “make” when developing machine function pass ?

Or is there other way to develop machine function pass?

Thank you.

One minute to recompile and relink one file is too long. There are ways to make incremental development significantly faster, and there have been a few threads about this on llvm-dev. This one came to mind:

If you search around, you can find some of the standard recommendations:

  • Use ninja instead of make
  • Use lld or gold instead of ld.bfd
  • Adjust debug info settings (-gmlt, split dwarf, or disable it)
  • Use external tablegen (probably not your problem)

Good luck!

The google groups link seems to work for me, but is broken when I am not logged into my Google account. >_> I mean this thread titled “debug build busts memory”:

Gold linker really speed up.
You help me a lot.
Thank you !!

I would keep going trying ninja~

Reid Kleckner <> 於 2020年3月11日 週三 上午3:33寫道: