diff options
Diffstat (limited to 'lib')
68 files changed, 1892 insertions, 1878 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 8d4cbdb93d..d974729289 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -399,7 +399,7 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size, } if (V1Size != ~0U && V2Size != ~0U) - if (const User *GEP = isGEP(V1)) { + if (isGEP(V1)) { std::vector<Value*> GEPOperands; const Value *BasePtr = GetGEPOperands(V1, GEPOperands); diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 8acbe8e26b..169cd659e5 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -512,7 +512,6 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, // try merge with NewTy: struct {t1, t2, stuff...} if offset lands exactly on a field in Ty if (isa<StructType>(NewTy) && isa<StructType>(Ty)) { DEBUG(std::cerr << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); - unsigned O = 0; const StructType *STy = cast<StructType>(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -537,7 +536,6 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, //try merge with NewTy: struct : {t1, t2, T} if offset lands on a field in Ty if (isa<StructType>(Ty)) { DEBUG(std::cerr << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); - unsigned O = 0; const StructType *STy = cast<StructType>(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -1280,9 +1278,9 @@ DSNode *DSGraph::addObjectToGraph(Value *Ptr, bool UseDeclaredType) { if (GlobalValue *GV = dyn_cast<GlobalValue>(Ptr)) { N->addGlobal(GV); - } else if (MallocInst *MI = dyn_cast<MallocInst>(Ptr)) { + } else if (isa<MallocInst>(Ptr)) { N->setHeapNodeMarker(); - } else if (AllocaInst *AI = dyn_cast<AllocaInst>(Ptr)) { + } else if (isa<AllocaInst>(Ptr)) { N->setAllocaNodeMarker(); } else { assert(0 && "Illegal memory object input!"); @@ -1777,8 +1775,10 @@ static void removeIdenticalCalls(std::list<DSCallSite> &Calls) { // Scan the call list cleaning it up as necessary... DSNodeHandle LastCalleeNode; +#if 0 Function *LastCalleeFunc = 0; unsigned NumDuplicateCalls = 0; +#endif bool LastCalleeContainsExternalFunction = false; unsigned NumDeleted = 0; @@ -2187,7 +2187,6 @@ void DSGraph::removeDeadNodes(unsigned Flags) { } while (Iterate); // Move dead aux function calls to the end of the list - unsigned CurIdx = 0; for (std::list<DSCallSite>::iterator CI = AuxFunctionCalls.begin(), E = AuxFunctionCalls.end(); CI != E; ) if (AuxFCallsAlive.count(&*CI)) diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index 9126ef9814..e28f4210b0 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp @@ -256,8 +256,6 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { for (++SI; SI != FuncECs.member_end(); ++SI) { Function *F = *SI; - DSGraph *&FG = DSInfo[F]; - DSGraph &CBUGraph = CBU->getDSGraph(*F); if (GraphsMerged.insert(&CBUGraph).second) { // Record the "folded" graph for the function. diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index f0bb22c3bc..d9e171bea4 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -409,7 +409,7 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) { unsigned FieldNo = (unsigned)cast<ConstantInt>(I.getOperand())->getZExtValue(); Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo]; - } else if (const PointerType *PTy = dyn_cast<PointerType>(*I)) { + } else if (isa<PointerType>(*I)) { if (!isa<Constant>(I.getOperand()) || !cast<Constant>(I.getOperand())->isNullValue()) Value.getNode()->setArrayMarker(); diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index bb3f25427c..de6cb5a6b2 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -374,7 +374,6 @@ Andersens::getModRefInfo(CallSite CS, Value *P, unsigned Size) { if (Function *F = CS.getCalledFunction()) if (F->isExternal()) { Node *N1 = getNode(P); - bool PointsToUniversalSet = false; if (N1->begin() == N1->end()) return NoModRef; // P doesn't point to anything. diff --git a/lib/AsmParser/Lexer.cpp.cvs b/lib/AsmParser/Lexer.cpp.cvs index 5791e2b1ea..d11bfa03b3 100644 --- a/lib/AsmParser/Lexer.cpp.cvs +++ b/lib/AsmParser/Lexer.cpp.cvs @@ -17,7 +17,7 @@ #define yylineno llvmAsmlineno #line 20 "Lexer.cpp" -/* A lexical scanner generated by flex */ +/* A lexical scanner generated by flex*/ /* Scanner skeleton version: * $Header$ @@ -28,6 +28,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include <stdio.h> +#include <unistd.h> /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -41,7 +42,6 @@ #ifdef __cplusplus #include <stdlib.h> -#include <unistd.h> /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -153,6 +153,15 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, yytext_ptr ) +/* Some routines like yy_flex_realloc() are emitted as static but are + not called by all lexers. This generates warnings in some compilers, + notably GCC. Arrange to suppress these. */ +#ifdef __GNUC__ +#define YY_MAY_BE_UNUSED __attribute__((unused)) +#else +#define YY_MAY_BE_UNUSED +#endif + /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). @@ -259,7 +268,7 @@ YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer @@ -308,35 +317,35 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 114 -#define YY_END_OF_BUFFER 115 -static yyconst short int yy_acclist[192] = +#define YY_NUM_RULES 120 +#define YY_END_OF_BUFFER 121 +static yyconst short int yy_acclist[198] = { 0, - 115, 113, 114, 112, 113, 114, 112, 114, 113, 114, - 113, 114, 113, 114, 113, 114, 113, 114, 113, 114, - 105, 113, 114, 105, 113, 114, 1, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 104, 102, 101, 101, 108, 106, 110, 105, 1, - 87, 41, 69, 23, 104, 101, 101, 109, 110, 20, - 110, 111, 63, 68, 39, 34, 42, 66, 3, 54, - - 65, 25, 77, 67, 86, 81, 82, 64, 70, 103, - 110, 110, 49, 78, 79, 94, 95, 56, 22, 107, - 26, 4, 61, 55, 48, 11, 110, 36, 2, 5, - 58, 60, 50, 72, 76, 74, 75, 73, 71, 52, - 96, 51, 57, 21, 84, 93, 45, 59, 30, 24, - 44, 7, 89, 33, 92, 38, 62, 80, 88, 27, - 28, 90, 53, 85, 83, 43, 6, 29, 37, 8, - 17, 9, 10, 35, 12, 14, 13, 32, 40, 15, - 31, 91, 97, 99, 100, 16, 46, 98, 18, 47, - 19 + 121, 119, 120, 118, 119, 120, 118, 120, 119, 120, + 119, 120, 119, 120, 119, 120, 119, 120, 119, 120, + 111, 119, 120, 111, 119, 120, 1, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 110, 108, 107, 107, 114, 112, 116, 111, 1, + 93, 41, 75, 23, 110, 107, 107, 115, 116, 20, + 116, 117, 63, 74, 39, 34, 42, 66, 3, 54, + + 65, 25, 83, 70, 92, 87, 88, 64, 76, 109, + 116, 116, 49, 84, 85, 69, 100, 73, 101, 56, + 22, 113, 68, 72, 26, 4, 61, 67, 55, 71, + 48, 11, 116, 36, 2, 5, 58, 60, 50, 78, + 82, 80, 81, 79, 77, 52, 102, 51, 57, 21, + 90, 99, 45, 59, 30, 24, 44, 7, 95, 33, + 98, 38, 62, 86, 94, 27, 28, 96, 53, 91, + 89, 43, 6, 29, 37, 8, 17, 9, 10, 35, + 12, 14, 13, 32, 40, 15, 31, 97, 103, 105, + 106, 16, 46, 104, 18, 47, 19 } ; -static yyconst short int yy_accept[511] = +static yyconst short int yy_accept[527] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -346,54 +355,56 @@ static yyconst short int yy_accept[511] = 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, + 83, 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 86, 87, 89, 90, 91, 92, - 92, 93, 94, 94, 94, 95, 95, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, - 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 102, 103, 103, 103, 104, 104, 105, - 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, - 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, + 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, + 87, 89, 90, 91, 92, 92, 93, 94, 94, 94, + 95, 95, 96, 96, 97, 97, 97, 97, 98, 98, + 98, 98, 98, 98, 98, 99, 99, 99, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, + 103, 103, 103, 104, 104, 105, 106, 106, 106, 106, + 106, 106, 106, 107, 107, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, 111, 112, 112, 112, 112, 113, 113, 113, 113, 113, 114, 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 118, 119, 119, 119, 120, - 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 122, 122, 122, 123, 124, - 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 126, 126, 127, 127, 127, 128, 129, 129, 129, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - - 130, 130, 130, 130, 131, 131, 132, 132, 132, 132, - 132, 132, 132, 133, 133, 133, 133, 133, 133, 133, - 134, 134, 134, 135, 136, 137, 138, 139, 140, 141, - 141, 141, 142, 142, 142, 142, 143, 144, 145, 145, - 145, 145, 145, 145, 146, 146, 146, 146, 146, 146, - 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, - 149, 150, 151, 151, 151, 152, 152, 153, 153, 153, - 153, 154, 154, 155, 156, 157, 158, 158, 158, 159, - 159, 159, 160, 161, 162, 162, 162, 163, 164, 165, - 166, 166, 166, 166, 166, 166, 166, 167, 167, 168, - - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 171, 171, 171, 171, 171, 172, 172, 172, - 172, 172, 173, 174, 174, 174, 174, 174, 174, 175, - 175, 175, 175, 176, 176, 177, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, - 180, 180, 180, 180, 181, 181, 181, 181, 181, 182, - 182, 182, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 184, 184, 185, 186, - - 187, 187, 188, 188, 189, 190, 191, 191, 192, 192 + 116, 116, 116, 116, 117, 117, 118, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 120, 121, 121, + 121, 122, 122, 122, 123, 123, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 125, 125, 125, 126, + 126, 126, 127, 128, 128, 129, 130, 130, 130, 130, + 130, 130, 131, 131, 131, 131, 131, 132, 132, 133, + + 133, 133, 134, 135, 135, 135, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 137, 137, 138, 138, 138, 138, 138, 138, 138, 139, + 139, 139, 139, 139, 139, 139, 140, 140, 140, 141, + 142, 143, 144, 145, 146, 147, 147, 147, 148, 148, + 148, 148, 149, 150, 151, 151, 151, 151, 151, 151, + 152, 152, 152, 152, 152, 152, 153, 153, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 156, 157, 157, + 157, 158, 158, 159, 159, 159, 159, 160, 160, 161, + 162, 163, 164, 164, 164, 165, 165, 165, 166, 167, + + 168, 168, 168, 169, 170, 171, 172, 172, 172, 172, + 172, 172, 172, 173, 173, 174, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, + 177, 177, 177, 178, 178, 178, 178, 178, 179, 180, + 180, 180, 180, 180, 180, 181, 181, 181, 181, 182, + 182, 183, 184, 184, 184, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 185, 185, 185, 185, + 185, 185, 185, 185, 186, 186, 186, 186, 186, 186, + 187, 187, 187, 187, 187, 188, 188, 188, 189, 189, + + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 190, 190, 191, 192, 193, 193, 194, 194, + 195, 196, 197, 197, 198, 198 } ; static yyconst int yy_ec[256] = @@ -437,260 +448,265 @@ static yyconst int yy_meta[44] = 3, 3, 3 } ; -static yyconst short int yy_base[515] = +static yyconst short int yy_base[531] = { 0, - 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 36, 40, + 0, 0, 1140, 1141, 1141, 1141, 1135, 1124, 36, 40, 44, 50, 56, 62, 0, 63, 66, 81, 89, 47, - 90, 91, 76, 96, 108, 49, 97, 110, 68, 137, - 120, 168, 112, 115, 135, 127, 1101, 1109, 1090, 1109, - 0, 158, 173, 180, 196, 70, 201, 216, 221, 0, - 121, 152, 123, 139, 166, 140, 162, 184, 1089, 222, - 180, 31, 186, 119, 232, 208, 144, 225, 234, 236, - 235, 188, 238, 240, 246, 241, 245, 203, 248, 256, - 254, 258, 262, 252, 272, 274, 1088, 276, 278, 280, - 255, 253, 283, 284, 285, 286, 288, 297, 300, 1087, - - 301, 292, 295, 307, 309, 318, 316, 315, 322, 312, - 147, 329, 330, 1086, 0, 344, 349, 1085, 363, 380, - 0, 1084, 338, 336, 1083, 355, 1082, 356, 1081, 353, - 367, 334, 1080, 375, 365, 381, 384, 370, 371, 1079, - 388, 392, 391, 393, 394, 395, 396, 400, 399, 407, - 406, 409, 411, 413, 410, 414, 418, 421, 425, 426, - 427, 429, 1078, 1077, 430, 431, 1076, 435, 1075, 1074, - 458, 436, 439, 434, 469, 1073, 449, 1072, 438, 441, - 458, 1071, 471, 472, 474, 473, 481, 482, 475, 476, - 483, 488, 489, 493, 495, 496, 504, 501, 503, 505, - - 510, 507, 516, 1070, 511, 1109, 527, 541, 545, 549, - 554, 555, 440, 556, 557, 1069, 1068, 1067, 558, 559, - 560, 517, 528, 518, 561, 189, 562, 563, 566, 569, - 570, 567, 564, 578, 1066, 579, 581, 580, 584, 587, - 592, 595, 591, 596, 1065, 1064, 597, 598, 1063, 593, - 599, 0, 603, 607, 614, 604, 616, 618, 619, 600, - 626, 629, 631, 630, 1062, 633, 632, 1061, 1060, 634, - 1059, 635, 644, 645, 648, 649, 650, 651, 652, 655, - 1058, 656, 1057, 659, 657, 677, 1056, 660, 519, 1055, - 661, 662, 677, 678, 664, 680, 687, 688, 689, 691, - - 690, 692, 693, 1054, 694, 1053, 695, 696, 699, 697, - 702, 703, 1052, 705, 714, 710, 716, 718, 721, 1051, - 724, 726, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 728, - 729, 1043, 732, 731, 736, 1042, 1041, 1040, 733, 734, - 738, 735, 737, 1039, 740, 747, 750, 751, 752, 1038, - 753, 1037, 759, 757, 761, 762, 765, 767, 768, 1036, - 1035, 1034, 773, 770, 1033, 772, 1032, 775, 781, 791, - 1031, 792, 1030, 1029, 1028, 1027, 779, 780, 1026, 794, - 795, 1025, 1024, 1023, 798, 801, 1022, 1021, 1020, 1019, - 802, 782, 806, 807, 808, 809, 1018, 810, 1017, 1016, - - 812, 815, 816, 819, 818, 821, 822, 823, 826, 831, - 824, 1015, 829, 835, 843, 845, 847, 837, 851, 849, - 852, 1014, 853, 855, 857, 859, 1013, 861, 862, 864, - 865, 1012, 1011, 869, 866, 881, 870, 867, 1010, 883, - 884, 886, 1007, 871, 998, 997, 891, 892, 893, 895, - 897, 898, 902, 903, 904, 905, 906, 907, 910, 995, - 914, 908, 912, 918, 921, 923, 919, 994, 925, 929, - 933, 934, 935, 992, 936, 937, 939, 940, 990, 943, - 944, 989, 947, 951, 946, 955, 956, 963, 964, 965, - 966, 968, 969, 967, 970, 985, 971, 984, 983, 979, - - 973, 783, 982, 602, 477, 446, 978, 333, 1109, 1013, - 1015, 83, 1019, 80 + 100, 97, 76, 96, 111, 49, 113, 110, 68, 140, + 126, 171, 119, 118, 139, 133, 1133, 1141, 1122, 1141, + 0, 176, 184, 199, 204, 70, 209, 224, 229, 0, + 117, 130, 150, 72, 160, 151, 159, 123, 1121, 230, + 178, 31, 69, 168, 240, 95, 233, 165, 241, 243, + 242, 156, 244, 246, 187, 251, 253, 254, 211, 258, + 256, 263, 260, 265, 190, 267, 283, 1120, 271, 274, + 270, 285, 289, 290, 291, 292, 294, 295, 297, 299, + + 296, 308, 1 |