search for: getorcreateindirectuser

Displaying 1 result from an estimated 1 matches for "getorcreateindirectuser".

2015 Oct 10
2
[RFC] Clean up the way we store optional Function data
...to PR24755 [1]. It involves creating a new type of Constant. A sketch: struct llvm::IndirectUser : llvm::Constant { Constant *Data; // Operand 0 unsigned RefCount; // Metadata (not an operand) /// Get or create an IndirectUser for C. static IndirectUser *GetOrCreateIndirectUser(Constant *C); /// Drop a reference to C's IndirectUser. static void ReleaseIndirectUser(Constant *C); }; Here's how to attach prefix data to a Function: IU = IndirectUser::GetOrCreateIndirectUser(PrefixData); PrefixDataMap[F] = IU; Prologue data and p...