[LLVMdev] What would cause instructions to NOT make it into the module?
Rick Mann
rmann at latencyzero.com
Wed Jan 23 23:21:15 PST 2013
On Jan 23, 2013, at 22:06 , "Caldarale, Charles R" <Chuck.Caldarale at unisys.com> wrote:
>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
>> On Behalf Of Sean Silva
>> Subject: Re: [LLVMdev] What would cause instructions to NOT make it into the module?
>
>> It is a pass that can be run like any other pass. See createVerifierPass().
>
> You can also just call verifyModule() with the appropriate parameters; it's defined in include/llvm/Analysis/Verifier.h.
Thank you. The modules verify fine, but at least one of my functions (I only tested one) does not, and generates this output:
Referencing function in another module!
%0 = call i8* @malloc(i64 72)
Referencing function in another module!
call void @decodeField(%struct.PDField* null, %struct.PDPacket* %3, void (%struct.PDField*, %struct.PDPacket*)* @packetMarker.completionProc, i8* null)
I have verified that I only ever call new llvm::Module() once, and I only use the globalLLVMContext, or that module's context. Is it possible some part of the API is creating a module for use internally?
When I dump my (only) module, it does show those two external functions declared:
declare i8* @malloc(i64)
declare void @decodeField(%struct.PDField*, %struct.PDPacket*, void (%struct.PDField*, %struct.PDPacket*)*, i8*)
But my module does NOT show the function I tried to verify (that generated the verification error above).
--
Rick
More information about the llvm-dev
mailing list