[LLVMdev] code-altering Passes for llc
Dan Gohman
gohman at apple.com
Thu Aug 6 11:19:52 PDT 2009
On Aug 6, 2009, at 5:45 AM, Artjom Kochtchi wrote:
> So I was searching for a possibility to include an additional
> (Machine)BasicBlock (or rather a MachineFunction?) somewhere in the
> program
> that contains the program termination and that I can jump to on check
> failure. Can't I do that during a Pass in llc?
If you just have a magic block of instructions you want to stick
somewhere, a module-level inline asm may be the easiest way. If
you have higher-level language code you want to stick somewhere,
you should probably create a new Function (and/or MachineFunction)
that can be "called", so that it plays nicely with the rest of
the compiler.
Dan
More information about the llvm-dev
mailing list