Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] Support for naive cross translation unit analysis
The aim of this patch is to be minimal to enable incremental development of the feature on the top of the tree. This patch should be an NFC when the feature is turned off. It is turned off by default and still considered as experimental. Technical details are available in the EuroLLVM Talk: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#7 Note that the initial prototype was done by A. Sidorin et al.: http://lists.llvm.org/pipermail/cfe-dev/2015-October/045730.html Contributions to the measurements and the new version of the code: Peter Szecsi, Zoltan Gera, Daniel Krupp, Kareem Khazem. Differential Revision: https://reviews.llvm.org/D30691 llvm-svn: 326323
- Loading branch information
Showing
23 changed files
with
773 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
int h_chain(int x) { | ||
return x * 2; | ||
} | ||
|
||
namespace chns { | ||
int chf3(int x); | ||
|
||
int chf2(int x) { | ||
return chf3(x); | ||
} | ||
|
||
class chcls { | ||
public: | ||
int chf4(int x); | ||
}; | ||
|
||
int chcls::chf4(int x) { | ||
return x * 3; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
int callback_to_main(int x); | ||
int f(int x) { | ||
return x - 1; | ||
} | ||
|
||
int g(int x) { | ||
return callback_to_main(x) + 1; | ||
} | ||
|
||
int h_chain(int); | ||
|
||
int h(int x) { | ||
return 2 * h_chain(x); | ||
} | ||
|
||
namespace myns { | ||
int fns(int x) { | ||
return x + 7; | ||
} | ||
|
||
namespace embed_ns { | ||
int fens(int x) { | ||
return x - 3; | ||
} | ||
} | ||
|
||
class embed_cls { | ||
public: | ||
int fecl(int x) { | ||
return x - 7; | ||
} | ||
}; | ||
} | ||
|
||
class mycls { | ||
public: | ||
int fcl(int x) { | ||
return x + 5; | ||
} | ||
static int fscl(int x) { | ||
return x + 6; | ||
} | ||
|
||
class embed_cls2 { | ||
public: | ||
int fecl2(int x) { | ||
return x - 11; | ||
} | ||
}; | ||
}; | ||
|
||
namespace chns { | ||
int chf2(int x); | ||
|
||
class chcls { | ||
public: | ||
int chf4(int x); | ||
}; | ||
|
||
int chf3(int x) { | ||
return chcls().chf4(x); | ||
} | ||
|
||
int chf1(int x) { | ||
return chf2(x); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
c:@N@chns@F@chf1#I# ctu-other.cpp.ast | ||
c:@N@myns@N@embed_ns@F@fens#I# ctu-other.cpp.ast | ||
c:@F@g#I# ctu-other.cpp.ast | ||
c:@S@mycls@F@fscl#I#S ctu-other.cpp.ast | ||
c:@S@mycls@F@fcl#I# ctu-other.cpp.ast | ||
c:@N@myns@S@embed_cls@F@fecl#I# ctu-other.cpp.ast | ||
c:@S@mycls@S@embed_cls2@F@fecl2#I# ctu-other.cpp.ast | ||
c:@F@f#I# ctu-other.cpp.ast | ||
c:@N@myns@F@fns#I# ctu-other.cpp.ast | ||
c:@F@h#I# ctu-other.cpp.ast | ||
c:@F@h_chain#I# ctu-chain.cpp.ast | ||
c:@N@chns@S@chcls@F@chf4#I# ctu-chain.cpp.ast | ||
c:@N@chns@F@chf2#I# ctu-chain.cpp.ast |
Oops, something went wrong.