It is unknow whether it is based on a real historical person, but is there any question the oldest known version of the legend is Welsh?
But the further back you go, the less historical they become. And I don't mean in the sense of historical records being less reliable farther back in time; I mean that the characters in the oldest legends are clearly supernatural figures. There is no reason to postulate supernatural figures as having historical enemies. Why would they?
This makes zero sense.