Improve documentation and testing of APIntFromVal
authorTobias Grosser <tobias@grosser.es>
Fri, 26 Aug 2016 10:43:28 +0000 (10:43 +0000)
committerTobias Grosser <tobias@grosser.es>
Fri, 26 Aug 2016 10:43:28 +0000 (10:43 +0000)
commit76f8279e441144844f8c00d92e4a8bcec5814385
tree3127489f2f6de1ea9af14e831ce5e8c0563a992f
parent5e02fe627575f7804421e9994406d48b91fa311f
Improve documentation and testing of APIntFromVal

The recent unit tests we gained made clear that the semantics of APIntFromVal
are not clear, due to missing documentation. In this change we document both
the calling interface as well as the implementation of APIntFromVal. We also
make the implementation easier to read by removing the use of magic numbers.
Finally, we add tests to check the bitwidth of the created values as well as
the correct modeling of very large numbers.

Reviewed-by: Michael Kruse <llvm@meinersbur.de>
Differential Revision: https://reviews.llvm.org/D23910

llvm-svn: 279813
polly/include/polly/Support/GICHelper.h
polly/lib/Support/GICHelper.cpp
polly/unittests/Isl/IslTest.cpp