その日のエイリアス解析四〇から四LLVMのLLVMの話

免責事項:この記事はブロガーオリジナル記事ですが、許可ブロガーなく再生してはなりません。https://blog.csdn.net/snsn1984/article/details/89672023

エイリアス解析は、二つのポインタが同じメモリ技術のクラスを指しているかどうか、この種の技術は、多くの異なるアルゴリズムや方法があるかを決定しようとしています。したがって、エイリアス解析はまた、しばしばポインタ解析と呼ばれます。エイリアスは通常、おそらくエイリアスではなく、エイリアスやその他の状況を返すエイリアス解析です。

LLVMコアエイリアス解析エイリアス解析クラスです。このクラスは、ユーザーまたは必要な内部エイリアス解析LLVMを使用してシステムへのインタフェースを提供します。エイリアス解析クラスコードLLVM / libに/分析/ディレクトリでAliasAnalysis.cppを持っています。

非常に重要な列挙に使用されるエイリアス解析クラス(AliasAnalysis.hからコード):

   78 enum AliasResult : uint8_t {
   79   /// The two locations do not alias at all.
   80   ///
   81   /// This value is arranged to convert to false, while all other values
   82   /// convert to true. This allows a boolean context to convert the result to
   83   /// a binary flag indicating whether there is the possibility of aliasing.
   84   NoAlias = 0,
   85   /// The two locations may or may not alias. This is the least precise result.
   86   MayAlias,
   87   /// The two locations alias, but only due to a partial overlap.
   88   PartialAlias,
   89   /// The two locations precisely alias each other.
   90   MustAlias,
   91 };

結果エイリアス解析を決定するには。別名でもよく、それはエイリアスとエイリアスの一部である、ない別名:私たちは、実際には、コードから4つの可能な結果の合計を見ることができます。

エイリアス解析のLLVMの深さの理解はを参照できます。

1、ドキュメント:  http://llvm.org/docs/AliasAnalysis.html

2、AliasAnalysis.h:  http://llvm.org/doxygen/AliasAnalysis_8h_source.html

3 AliasAnalysis.cpp:  http://llvm.org/doxygen/AliasAnalysis_8cpp_source.html

おすすめ

転載: blog.csdn.net/snsn1984/article/details/89672023