For a certain type of analysis I generate inline assembly which I insert into the LLVM IR code. This
inline assembly code contains labels that should not be duplicated. Problem is that the tail
duplication pass duplicates code. It checks isNotDuplicatable on a machine instruction however
there is no such a flag on an IR instruction that I could set. Is there a way to tell in an IR pass
that code should not be duplicated?
Thanks for the answer. Unfortunately it does not seem to work.
Putting the NoDuplicate on the CallInst of an inline assembly gives the message:
Attribute ‘noduplicate’ only applies to functions!
Putting the NoDuplicate on the function in which the inline assembly resides has not effect. Also adding
the MinSize or OptimizeForSize attribute does not stop tail duplication. Another suggestion?