Yeah, if you reflect on your vertex shaders, you can discover which attributes it consumes, e.g. the asm dump from one of my shaders includes:
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
// NORMAL 0 xyz 2 NONE float xyz
// TANGENT 0 xyz 3 NONE float xyz
// POINTCLOUDINDEX 0 x 4 NONE uint x
As well as this though, you need to know the structure of how your vertices are stored in RAM. Once you have both bits of information, you can automatically match them to each other and generate an input layout.