OLD | NEW |
1 //===- FunctionAttrs.cpp - Pass which marks functions attributes ----------===// | 1 //===- FunctionAttrs.cpp - Pass which marks functions attributes ----------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements a simple interprocedural pass which walks the | 10 // This file implements a simple interprocedural pass which walks the |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 setDoesNotThrow(F); | 1226 setDoesNotThrow(F); |
1227 setDoesNotAlias(F, 0); | 1227 setDoesNotAlias(F, 0); |
1228 setDoesNotCapture(F, 2); | 1228 setDoesNotCapture(F, 2); |
1229 setOnlyReadsMemory(F, 2); | 1229 setOnlyReadsMemory(F, 2); |
1230 break; | 1230 break; |
1231 case LibFunc::feof: | 1231 case LibFunc::feof: |
1232 case LibFunc::free: | 1232 case LibFunc::free: |
1233 case LibFunc::fseek: | 1233 case LibFunc::fseek: |
1234 case LibFunc::ftell: | 1234 case LibFunc::ftell: |
1235 case LibFunc::fgetc: | 1235 case LibFunc::fgetc: |
1236 case LibFunc::fseeko: | 1236 // @LOCALMOD-BEGIN: |
1237 case LibFunc::ftello: | 1237 // https://code.google.com/p/nativeclient/issues/detail?id=4089 |
| 1238 case LibFunc::Fseeko: |
| 1239 case LibFunc::Ftello: |
| 1240 // @LOCALMOD-END |
1238 case LibFunc::fileno: | 1241 case LibFunc::fileno: |
1239 case LibFunc::fflush: | 1242 case LibFunc::fflush: |
1240 case LibFunc::fclose: | 1243 case LibFunc::fclose: |
1241 case LibFunc::fsetpos: | 1244 case LibFunc::fsetpos: |
1242 case LibFunc::flockfile: | 1245 case LibFunc::flockfile: |
1243 case LibFunc::funlockfile: | 1246 case LibFunc::funlockfile: |
1244 case LibFunc::ftrylockfile: | 1247 case LibFunc::ftrylockfile: |
1245 if (FTy->getNumParams() == 0 || !FTy->getParamType(0)->isPointerTy()) | 1248 if (FTy->getNumParams() == 0 || !FTy->getParamType(0)->isPointerTy()) |
1246 return false; | 1249 return false; |
1247 setDoesNotThrow(F); | 1250 setDoesNotThrow(F); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 bool FunctionAttrs::runOnSCC(CallGraphSCC &SCC) { | 1706 bool FunctionAttrs::runOnSCC(CallGraphSCC &SCC) { |
1704 AA = &getAnalysis<AliasAnalysis>(); | 1707 AA = &getAnalysis<AliasAnalysis>(); |
1705 TLI = &getAnalysis<TargetLibraryInfo>(); | 1708 TLI = &getAnalysis<TargetLibraryInfo>(); |
1706 | 1709 |
1707 bool Changed = annotateLibraryCalls(SCC); | 1710 bool Changed = annotateLibraryCalls(SCC); |
1708 Changed |= AddReadAttrs(SCC); | 1711 Changed |= AddReadAttrs(SCC); |
1709 Changed |= AddArgumentAttrs(SCC); | 1712 Changed |= AddArgumentAttrs(SCC); |
1710 Changed |= AddNoAliasAttrs(SCC); | 1713 Changed |= AddNoAliasAttrs(SCC); |
1711 return Changed; | 1714 return Changed; |
1712 } | 1715 } |
OLD | NEW |