hanchenye-llvm-project/clang
James Molloy 90d6101410 Use store size instead of alloc size when coercing.
Previously, EnterStructPointerForCoercedAccess used Alloc size when determining how to convert. This was problematic, because there were situations were the alloc size was larger than the store size. For example, if the first element of a structure were i24 and the destination type were i32, the old code would generate a GEP and a load i24. The code should compare store sizes to ensure the whole object is loaded. I have attached a test case.

This patch modifies the output of arm64-be-bitfield.c test case, but the new IR seems to be equivalent, and after -O3, the compiler generates identical ARM assembly. (asr x0, x0, #54)

Patch by Thomas Jablin!

llvm-svn: 216722
2014-08-29 10:17:52 +00:00
..
INPUTS
bindings Expose the CUDA shared attribute to the C API. 2014-08-08 14:59:00 +00:00
docs clang-format: New option SpacesInSquareBrackets. 2014-08-26 11:41:14 +00:00
examples Go back to having a takeModule instead of a getModule. 2014-08-19 14:32:16 +00:00
include unique_ptrify SourceManager::createFileID 2014-08-29 07:59:55 +00:00
lib Use store size instead of alloc size when coercing. 2014-08-29 10:17:52 +00:00
runtime Unify the name of compiler-rt builtins library on Linux. 2014-05-22 21:13:30 +00:00
test Use store size instead of alloc size when coercing. 2014-08-29 10:17:52 +00:00
tools [C++11] Support for capturing of variable length arrays in lambda expression. 2014-08-28 04:28:19 +00:00
unittests unique_ptrify SourceManager::createFileID 2014-08-29 07:59:55 +00:00
utils Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +00:00
www [cxx_status] Minor wording tweaks. 2014-06-22 16:00:05 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
Makefile
ModuleInfo.txt
NOTES.txt Remove trailing spaces 2014-07-13 17:11:45 +00:00
README.txt Remove whitespace from test commit. 2014-07-16 19:10:36 +00:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:              http://clang.llvm.org/
Building and using Clang:          http://clang.llvm.org/get_started.html
Clang Static Analyzer:             http://clang-analyzer.llvm.org/
Information on the LLVM project:   http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/