Returning an attacking creature equipped with Trepanation Blade
Yes, the ability will do as much as it can when it resolves


  609.3. If an effect attempts to do something impossible, it does only as much as possible.


Trepanation Blade triggers whenever the equipped creature attacks. The ability is now on the stack, no matter what happens to the creature afterwards. If the creature has left the battlefield by the time TP gets to resolve, boosting its power will be impossible, but TP will still do as much as possible, i.e. the defending player has to reveal cards and put them into his or her graveyard.