tmp is created and destroyed each time around the loop, and takes a copy of the string data in line. So you can get a cheap probable-improvement-and-can-hardly-be-any-worse like this:
if(a) s = "_a";
else if(b) s = "_b";
line += s;
mymap.insert(line, s);
I'd also give s the type const char*: there's not much point assigning a string once per loop that only ever contains a copy of a literal. But it does get converted to string by the call to insert, so there's not much in it either way.
A probable-improvement-and-can-hardly-be-any-worse isn't premature optimization, provided you don't damage your code's simplicity/readability/maintainability/design to achieve it. The larger the scope of line and s, the more risks there are in playing tricks with them (mutating the value and altering the type, respectively), since you could somehow mislead a reader/maintainer. Which is one of the reasons short functions are good.
In C++11 you could write mymap.insert(std::move(line), s); for another easy probable-improvement.
All that said: you might find that no matter how much unnecessary copying and allocation you do, the time taken by that is dwarfed by the time for the I/O in getline. In this case there are two very similar ways of writing the code and one of them "should" be more efficient. So you might as well use it, but don't over-value it by thinking it will necessarily make a difference.
tmpoutside thewhileloop? It will ensure just one copy of string is reutilized on every iteration.