[LLVMdev] code-altering Passes for llc

Artjom Kochtchi artjom.kochtchi at googlemail.com
Thu Aug 6 05:45:09 PDT 2009




Kenneth Uildriks wrote:
> 
> Does the error function *have* to be auto-generated in your pass?
> Perhaps the original code should use invokes, and your pass insert the
> error check with a jne to the "unwind" block.
> 

If I understand correctly, unwind is some kind of exception handling in LLVM
IR? I'm not sure if this is the right thing.

First, I include runtime checks inst programs that are already written
during their compilation (with my modified version of LLVM). Second, the
error handling is a (context independent) program termination, so it is of
no use to replicate it at every call.

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?

-Artjom
-- 
View this message in context: http://www.nabble.com/code-altering-Passes-for-llc-tp24778261p24845838.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list