LLVM is a start
LLVM is a start but cruft will still pile up in the LLVM environment. A system that can refactor and test itself would be larger than itself. The cheat to that paradox is massive social interaction where systems get feedback from other systems on whether or not they're doing better or worse. Being a cheat, you just have to hope that the feedback sends evolution in the right direction and us meat sacks aren't eradicated in the process.