[LLVMdev] Choosing Alias Analysis

David Greene dag at cray.com
Fri Aug 10 16:25:47 PDT 2007


On Friday 10 August 2007 18:15, David Greene wrote:

> template<const char *Args>
> class PassArgFilter {
> public:
>   bool operator()(const PassInfo &P) const {
>     return std::strstr(Args, P.getPassArgument()) != 0;
>   }
> };

Ah, Friday.

Before you C++ zealots :) point out that Args could contain strings that an 
unrelated Pass might match (for example, Args="not-so-bad-aa" matched against 
a pass "bad-aa"), let _this_ C++ zealot point out that the proper way to 
handle that is through typelists and metaprogramming and that the complexity 
of that is probably not going into llvm any time soon.

:)

Have a great weekend all!

                                           -Dave



More information about the llvm-dev mailing list