Open woodruffw opened 2 years ago
Also: module-level VSTs are parsed separately, via LLVM's parseGlobalValueSymbolTable
. AFAICT, the only difference is that module-level VSTs can only contain VST_CODE_FNENTRY
and none of the other codes.
Edit: More accurately, module-level VSTs are only parsed separately if there's also a module-level symbol table. When that table is present, VST_CODE_FNENTRY
has the structure [valueid, offset]
instead of [valueid, offset, namechar x N]
. So these cases do probably need to be handled separately, at least at the parse level if not the model level.
Function mapping (#25) requires this, so I can't make meaningful progress on functions until this is done.
Just some notes to myself:
parseValueSymbolTable
in LLVM's bitcode readerMODULE_CODE_VSTOFFSET
tells LLVM's bitcode reader where the module-level VST is, but we don't need that in our case (since we do eager parsing); however, we should still validate that there's exactly oneMODULE_CODE_VSTOFFSET
VST_CODE_ENTRY
VST_CODE_FNENTRY
VST_CODE_BBENTRY