You may want to look a the ELF passes in X86_64/Hexagon, what they do is add to a vector of all atoms that you want to add to the PassManager file and set Ordinals. By the way, where are ordinals set here ? http://llvm-reviews.chandlerc.com/D2069