| #
2c5868c3 |
| 13-Feb-2013 |
Richard Smith <[email protected]> |
ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11, base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type.
llvm-svn: 17
ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11, base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type.
llvm-svn: 175078
show more ...
|
| #
d712d0db |
| 02-Feb-2013 |
Richard Smith <[email protected]> |
Don't forget to run destructors when we create an array temporary of class type.
llvm-svn: 174257
|
| #
8594fcbd |
| 31-Jan-2013 |
Bill Wendling <[email protected]> |
Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet
Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes.
llvm-svn: 174004
show more ...
|
| #
9feeef40 |
| 30-Jan-2013 |
Dmitri Gribenko <[email protected]> |
Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.
llvm-svn: 173924
|
| #
ae229d59 |
| 29-Jan-2013 |
Chad Rosier <[email protected]> |
[ubsan] Implement the -fcatch-undefined-behavior flag using a trapping implementation; this is much more inline with the original implementation (i.e., pre-ubsan) and does not require run-time librar
[ubsan] Implement the -fcatch-undefined-behavior flag using a trapping implementation; this is much more inline with the original implementation (i.e., pre-ubsan) and does not require run-time library support.
The trapping implementation can be invoked using either '-fcatch-undefined-behavior' or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed.
llvm-svn: 173848
show more ...
|
| #
1b4fb3e0 |
| 20-Jan-2013 |
Guy Benyei <[email protected]> |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
llvm-svn: 172973
|
| #
f54319c8 |
| 18-Jan-2013 |
Will Dietz <[email protected]> |
[ubsan] Add support for -fsanitize-blacklist
llvm-svn: 172808
|
| #
c5ff6242 |
| 15-Jan-2013 |
David Greene <[email protected]> |
Avoid unsigned Compare to int
Cast arithmetic results to avoid comparison of an unsigned to an int.
llvm-svn: 172570
|
| #
f857950d |
| 12-Jan-2013 |
Dmitri Gribenko <[email protected]> |
Remove useless 'llvm::' qualifier from names like StringRef and others that are brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
| #
230203c9 |
| 10-Jan-2013 |
Nick Lewycky <[email protected]> |
Don't assert in codegen on static data members which have NoLinkage. Fixes PR14825!
llvm-svn: 172031
|
| #
450f1a1f |
| 09-Jan-2013 |
Will Dietz <[email protected]> |
[ubsan] Make static check data non-const so it can be used for deduplication.
llvm-svn: 171947
|
| #
ffd5551b |
| 02-Jan-2013 |
Chandler Carruth <[email protected]> |
Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to reflect the migration in r171366.
Re-sort the #include lines to reflect the new paths.
llvm-svn: 171369
|
| #
2be6b72c |
| 21-Dec-2012 |
Rafael Espindola <[email protected]> |
Don't eagerly emit a global static merged with a local extern.
When we are visiting the extern declaration of 'i' in
static int i = 99; int foo() { extern int i; return i; }
We should not try
Don't eagerly emit a global static merged with a local extern.
When we are visiting the extern declaration of 'i' in
static int i = 99; int foo() { extern int i; return i; }
We should not try to handle it as if it was an function static. That is, we must consider the written storage class.
Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the if leading to its call are not completely accurate. They were passing before because the second decl was marked as having external storage. I changed them to check the linkage, which I find easier to understand.
Last but not least, there is something strange going on with cuda and opencl. My guess is that the linkage computation for these languages needs to be audited, but I didn't want to change that in this patch so I just updated the storage classes to keep the current behavior.
Thanks to Reed Kotler for reporting this.
llvm-svn: 170827
show more ...
|
|
Revision tags: llvmorg-3.2.0 |
|
| #
207f0536 |
| 20-Dec-2012 |
Bill Wendling <[email protected]> |
Rename llvm::Attributes to llvm::Attribute.
llvm-svn: 170722
|
| #
4442605f |
| 20-Dec-2012 |
Bill Wendling <[email protected]> |
Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.
llvm-svn: 170721
|
| #
7967fc14 |
| 19-Dec-2012 |
Bill Wendling <[email protected]> |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170500
|
| #
39b685e4 |
| 19-Dec-2012 |
Eli Friedman <[email protected]> |
Make sure CodeGen uses a value of the correct type as the result of of assignment to a bool bitfield. PR14638.
llvm-svn: 170480
|
| #
03b913d5 |
| 18-Dec-2012 |
Eli Bendersky <[email protected]> |
Similar to 170440 - fix build warning with gcc
llvm-svn: 170461
|
| #
8b731ea1 |
| 18-Dec-2012 |
Richard Smith <[email protected]> |
Fix typo (thanks to Jordan for spotting it!).
llvm-svn: 170403
|
| #
be024a81 |
| 18-Dec-2012 |
Richard Smith <[email protected]> |
Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a reference to an object outside its lifetime does not have undefined behavior.
llvm-svn: 170387
|
| #
ddd282ad |
| 15-Dec-2012 |
Will Dietz <[email protected]> |
[ubsan] Emit branch weight metadata to hint towards common case.
Results in better block placement that helps close the performance gap when making ubsan checks recoverable.
llvm-svn: 170263
|
| #
1629da95 |
| 13-Dec-2012 |
Richard Smith <[email protected]> |
ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of bit-patterns which are not valid values for enumerated or boolean types. These checks are the ubsan analogue of !range metadat
ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of bit-patterns which are not valid values for enumerated or boolean types. These checks are the ubsan analogue of !range metadata.
llvm-svn: 170108
show more ...
|
| #
f0480fc9 |
| 13-Dec-2012 |
Richard Smith <[email protected]> |
Simplify. No functionality change.
llvm-svn: 170100
|
| #
c818bbb8 |
| 07-Dec-2012 |
John McCall <[email protected]> |
Fix the required args count for variadic blocks.
We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes tha
Fix the required args count for variadic blocks.
We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation.
llvm-svn: 169588
show more ...
|
| #
ff0e3a1e |
| 06-Dec-2012 |
Chandler Carruth <[email protected]> |
Rework the bitfield access IR generation to address PR13619 and generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model.
The primar
Rework the bitfield access IR generation to address PR13619 and generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model.
The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field.
This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers.
I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed.
llvm-svn: 169489
show more ...
|