Don't worry, it has zero effect on global warming. These are timescales so vast, humanity will have either wiped itself out or evolved into something unrecognisable long before the sun starts expanding.
Global warming is something that operates on the order of decades or centuries.
If we manage to stop global warming and maintain or better yet repair the state of our climate afterwards, it will take roughly a billion years for the sun to get 10% hotter and boil off our oceans regardless of what we do and longer yet for it to start its red giant phase.
To put that in perspective, a billion years ago life on Earth was all single celled.