[LLVMdev] MachineInstr: external symbols problem

Andrew Lenharth alenhar2 at cs.uiuc.edu
Sat Apr 16 07:35:52 PDT 2005

On Fri, 2005-04-15 at 10:29 -0500, Chris Lattner wrote:
> On Fri, 15 Apr 2005, Vladimir Prus wrote:
> >> Another thing that might be interesting is the new llvm.pcmarker intrinsic
> >> that Andrew recently added.  I have no idea if it would be useful to you
> >> or not, but... it's documented here:
> >> http://llvm.cs.uiuc.edu/docs/LangRef.html#i_pcmarker
> >
> > In fact, I'm having problems exactly while lowering the pcmarker intrinsic ;-)
> > Need to get in to assembler somehow, and I already have a code that parses
> > assembler and recognised calls to functions with certain name patterns as
> > markers.
> It looks like the Alpha backend treats these as pseudo instructions:
> def PCLABEL : PseudoInstAlpha<(ops s64imm:$num), "PCMARKER_$num:\n">;
> maybe you could do something similar?  If not, I think the string table is 
> the way to go...

Note that due to the non-existance type checking in the asm-printer,
$num could just as well be a label added with .addGlobalSymbol(...) and
it would do the substitution with that.  The s64imm is just a hint
really (probably difference in the JIT, but if you are not worried about


More information about the llvm-dev mailing list