File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,8 @@ static bool hasAArch64ExclusiveMemop(
109109 BinaryBasicBlock *BB = BBQueue.front ().first ;
110110 bool IsLoad = BBQueue.front ().second ;
111111 BBQueue.pop ();
112- if (Visited.find (BB) != Visited. end () )
112+ if (! Visited.insert (BB). second )
113113 continue ;
114- Visited.insert (BB);
115114
116115 for (const MCInst &Inst : *BB) {
117116 // Two loads one after another - skip whole function
@@ -126,8 +125,7 @@ static bool hasAArch64ExclusiveMemop(
126125 if (BC.MIB ->isAArch64ExclusiveLoad (Inst))
127126 IsLoad = true ;
128127
129- if (IsLoad && BBToSkip.find (BB) == BBToSkip.end ()) {
130- BBToSkip.insert (BB);
128+ if (IsLoad && BBToSkip.insert (BB).second ) {
131129 if (opts::Verbosity >= 2 ) {
132130 outs () << " BOLT-INSTRUMENTER: skip BB " << BB->getName ()
133131 << " due to exclusive instruction in function "
You can’t perform that action at this time.
0 commit comments