clang - LLVM: Disable some instructions while generating machine code -


i not want use particular machine instruction in generated assembly code llvm.

is there way disable same? i'm ok modifying llvm code also.

one solution specify llvm instruction cannot "lowered"... 2 things may happen:

  • the compiler can perform same operation combination of instructions... things okay
  • the compiler cannot without it, in case have modify target generator suggest workaround (not quite easy if you're not familiar llvm)

to search xxxiseldagtodag.cpp, xxx target machine , specify constructor like:

setoperationaction(isd::yyy, mvt::i8, expand); setoperationaction(isd::yyy, mvt::i16, expand); setoperationaction(isd::yyy, mvt::i32, expand); setoperationaction(isd::yyy, mvt::i64, expand); 

where isd::yyy instruction don't want use. quite easy locate when browsing source code.

roughly:

  • setoperationaction specifies want change default action given operation, along type (mvt::...)
  • expand means "try expand operation" (there other actions, such custom, libcall...)

playing around that, should able solve problem.

hoping help.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -