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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -