Commit Graph

130446 Commits

Author SHA1 Message Date
Dmitry Vyukov 3abd096370 tsan: treat malloc() as memory access in Go
llvm-svn: 160289
2012-07-16 16:55:01 +00:00
Dmitry Vyukov 5bfac97ff9 tsan: use dynamic shadow stack for Go
llvm-svn: 160288
2012-07-16 16:44:47 +00:00
Fariborz Jahanian 6c7dbf5858 modern objective-c translator: conditionally include
<string.h>. // rdar://11847319

llvm-svn: 160287
2012-07-16 16:21:45 +00:00
Aaron Ballman ed9b0a9114 MSVC's implementation of isalnum will assert on characters > 255, so we need to use an unsigned char to ensure the integer promotion happens properly. This fixes an assert in debug builds with CodeGen\X86\utf8.ll
llvm-svn: 160286
2012-07-16 16:18:18 +00:00
Howard Hinnant 403845ba75 Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
llvm-svn: 160285
2012-07-16 16:17:34 +00:00
Kostya Serebryany 874dae6119 [asan] refactor instrumentation to allow merging the crash callbacks (not fully implemented yet, no functionality change except the BB order)
llvm-svn: 160284
2012-07-16 16:15:40 +00:00
Dmitry Vyukov dc36d69b6a tsan: increase number of dead threads for Go
llvm-svn: 160283
2012-07-16 16:03:16 +00:00
Dmitry Vyukov 9270eaf1f2 tsan: Go runtime: support goroutine end event
llvm-svn: 160282
2012-07-16 16:01:08 +00:00
Aaron Ballman 1206a91155 Fixing an MSVC warning -- the compiler did not like the cast added to work around a g++ bug (it would claim to possibly emit incorrect code).
llvm-svn: 160281
2012-07-16 15:45:33 +00:00
NAKAMURA Takumi 96cc5e5bf9 Target/AMDGPU: Fix includes, or msvc build failed.
llvm-svn: 160280
2012-07-16 15:43:50 +00:00
NAKAMURA Takumi dc4261794f Target/AMDGPU/AMDILIntrinsicInfo.cpp: Use llvm_unreachable() in nonreturn function, instead of assert(0).
llvm-svn: 160279
2012-07-16 15:43:09 +00:00
NAKAMURA Takumi 5f5fd8e545 Target/AMDGPU/R600KernelParameters.cpp: Don't use "and", "or" as conditional operator...
llvm-svn: 160278
2012-07-16 15:42:35 +00:00
Jack Carter f649043aa5 Doubleword Shift Left Logical Plus 32
Mips shift instructions DSLL, DSRL and DSRA are transformed into
DSLL32, DSRL32 and DSRA32 respectively if the shift amount is between
32 and 63

Here is a description of DSLL:

Purpose: Doubleword Shift Left Logical Plus 32
To execute a left-shift of a doubleword by a fixed amount--32 to 63 bits

Description: GPR[rd] <- GPR[rt] << (sa+32)

The 64-bit doubleword contents of GPR rt are shifted left, inserting
 zeros into the emptied bits; the result is placed in
GPR rd. The bit-shift amount in the range 0 to 31 is specified by sa.

This patch implements the direct object output of these instructions.

llvm-svn: 160277
2012-07-16 15:14:51 +00:00
NAKAMURA Takumi bb42a5e2cf Target/AMDGPU: [CMake] Fix dependencies. 1) Add intrinsics_gen. Add AMDGPUCommonTableGen.
llvm-svn: 160276
2012-07-16 15:09:11 +00:00
NAKAMURA Takumi 3128d26124 Target/AMDGPU/R600KernelParameters.cpp: Fix two includes, <llvm/IRBuilder.h> and <llvm/TypeBuilder.h>
llvm-svn: 160275
2012-07-16 15:08:47 +00:00
Alexey Samsonov 893d3d336a Fix tests that failed on i686-win32 after r160248:
1. FileCheck-ize epilogue.ll and allow another asm instruction to restore %rsp.
2. Remove check in widen_arith-3.ll that was hitting instruction in epilogue instead of
vector add.

llvm-svn: 160274
2012-07-16 14:33:36 +00:00
Tom Stellard 6693fbe3eb test/CodeGen/R600: Add some basic tests v6
llvm-svn: 160273
2012-07-16 14:17:19 +00:00
Tom Stellard 812e652b43 Build script changes for R600/SI Codegen v6
llvm-svn: 160272
2012-07-16 14:17:16 +00:00
Tom Stellard ee1812b94f include/llvm: Add R600 Intrinsics v6
llvm-svn: 160271
2012-07-16 14:17:14 +00:00
Tom Stellard bcce80fa95 AMDGPU: Add core backend files for R600/SI codegen v6
llvm-svn: 160270
2012-07-16 14:17:08 +00:00
Kostya Serebryany 4273bb05d1 [asan] initialize asan error callbacks in runOnModule instead of doing that on-demand
llvm-svn: 160269
2012-07-16 14:09:42 +00:00
Alexander Kornienko 277f6cf805 Fixing an obvious bug in a test.
llvm-svn: 160268
2012-07-16 13:31:37 +00:00
Dmitry Vyukov 5e5e36712b tsan: fix build
llvm-svn: 160267
2012-07-16 13:25:47 +00:00
Dmitry Vyukov c40c00767c tsan: port Go runtime to Darwin
llvm-svn: 160266
2012-07-16 13:02:40 +00:00
Alexander Kornienko f2f82550fd The new clang-ast-dump tool for selective AST dumping. Moved common command-line tool stuff to CommandLineClangTool
llvm-svn: 160265
2012-07-16 12:46:48 +00:00
Daniel Jasper b45e7e9191 Add two more missing parameters in diagnostics.
llvm-svn: 160264
2012-07-16 12:12:45 +00:00
Daniel Jasper 1c2f27c062 Fix diagnostic adding missing parameter.
llvm-svn: 160263
2012-07-16 11:51:49 +00:00
Alexey Samsonov d77fbba74a [Sanitizer] implement straightforward nlogn sorting, as qsort() may call malloc, which leads to deadlock in ASan allocator
llvm-svn: 160262
2012-07-16 11:27:17 +00:00
Tobias Grosser 25184fe925 Allow cast instructions within scops
Cast instruction do not have side effects and can consequently be part of a
scop. We special cased them earlier, as they may be problematic within array
subscripts or loop bounds. However, the scalar evolution validator already
checks for them such that there is no need to also check the instructions within
the basic blocks.  Checking them is actually overly conservative as the precence
of casts may invalidate a scop, even though scalar evolution is not influenced
by it.

llvm-svn: 160261
2012-07-16 10:57:32 +00:00
Nadav Rotem 4968e45b9f Fix a bug in the 3-address conversion of LEA when one of the operands is an
undef virtual register. The problem is that ProcessImplicitDefs removes the
definition of the register and marks all uses as undef. If we lose the undef
marker then we get a register which has no def, is not marked as undef. The
live interval analysis does not collect information for these virtual
registers and we crash in later passes.

Together with Michael Kuperstein <michael.m.kuperstein@intel.com>

llvm-svn: 160260
2012-07-16 10:52:25 +00:00
Dmitry Vyukov 263efd8f05 tsan: allow to pass CFLAGS to Go runtime build script
llvm-svn: 160259
2012-07-16 10:36:39 +00:00
Dmitry Vyukov 2dac24a42b tsan: add missing test for Go runtime
llvm-svn: 160258
2012-07-16 10:34:57 +00:00
Daniel Jasper 6b5a4fcc07 Prevent unused-variable warning in optimized builds.
llvm-svn: 160257
2012-07-16 10:25:15 +00:00
Chandler Carruth 8b540ab337 Revert r160254 temporarily.
It turns out that ASan relied on the at-the-end block insertion order to
(purely by happenstance) disable some LLVM optimizations, which in turn
start firing when the ordering is made more "normal". These
optimizations in turn merge many of the instrumentation reporting calls
which breaks the return address based error reporting in ASan.

We're looking at several different options for fixing this.

llvm-svn: 160256
2012-07-16 10:01:02 +00:00
Daniel Jasper 7e22282b68 Add refactoring callbacks to make common kinds of refactorings easy.
llvm-svn: 160255
2012-07-16 09:18:17 +00:00
Chandler Carruth 3dd6c81492 Teach AddressSanitizer to create basic blocks in a more natural order.
This is particularly useful to the backend code generators which try to
process things in the incoming function order.

Also, cleanup some uses of IRBuilder to be a bit simpler and more clear.

llvm-svn: 160254
2012-07-16 08:58:53 +00:00
Chandler Carruth 663943e23e Add a basic test for AddressSanitizer. This is just a bare-bones
functionality test.

In general, unless the functionality is substantially separated, we
should lump more basic testing into this file. The test running
infrastructure likes having a few test files with more comprehensive
testing within them.

llvm-svn: 160253
2012-07-16 08:56:46 +00:00
Daniel Jasper 3e1a9cf3b8 Add correct parenthesis range to CXXConstructExprs inside
CXXFunctionalCastExprs.

llvm-svn: 160252
2012-07-16 08:05:07 +00:00
Chandler Carruth f5fe556c70 Add support for attaching branch weight metadata directly from the IRBuilder.
Added a basic unit test for this with CreateCondBr. I didn't go all the
way and test the switch side as the boilerplate for setting up the
switch IRBuilder unit tests is a lot more. Fortunately, the two share
all the interesting code paths.

llvm-svn: 160251
2012-07-16 07:45:06 +00:00
Chandler Carruth b39c55f4be Add a boring bit of boilerplate to start testing IRBuilder::CreateCondBr.
This is in anticipation of changing CreateCondBr and wanting to test
those changes.

llvm-svn: 160250
2012-07-16 07:44:51 +00:00
Chandler Carruth ebabadf933 Move the IRBuilder unittest from Support to VMCore. This got missed in
the original move of IRBuilder.

llvm-svn: 160249
2012-07-16 07:44:45 +00:00
Alexey Samsonov dcc1291d17 This CL changes the function prologue and epilogue emitted on X86 when stack needs realignment.
It is intended to fix PR11468.

Old prologue and epilogue looked like this:
push %rbp
mov %rsp, %rbp
and $alignment, %rsp
push %r14
push %r15
...
pop %r15
pop %r14
mov %rbp, %rsp
pop %rbp

The problem was to reference the locations of callee-saved registers in exception handling:
locations of callee-saved had to be re-calculated regarding the stack alignment operation. It would
take some effort to implement this in LLVM, as currently MachineLocation can only have the form
"Register + Offset". Funciton prologue and epilogue are now changed to:

push %rbp
mov %rsp, %rbp
push %14
push %15
and $alignment, %rsp
...
lea -$size_of_saved_registers(%rbp), %rsp
pop %r15
pop %r14
pop %rbp

Reviewed by Chad Rosier.

llvm-svn: 160248
2012-07-16 06:54:09 +00:00
Ted Kremenek a8c2c10f16 Place checker build at alternate URL.
llvm-svn: 160247
2012-07-16 04:18:35 +00:00
Richard Smith 3beb930cfd More for PR11848: a pack expansion type isn't necessarily type-dependent (its
pattern might be an alias template which doesn't use its arguments). It's always
instantiation-dependent, though.

llvm-svn: 160246
2012-07-16 01:59:26 +00:00
Richard Smith 8093465a0b PR13365: Fix code which was trying to treat an array of DeducedTemplateArgument
as an array of its base class TemplateArgument. Switch the const
TemplateArgument* parameters of InstantiatingTemplate's constructors to
ArrayRef<TemplateArgument> to prevent this from happening again in the future.

llvm-svn: 160245
2012-07-16 01:09:10 +00:00
Richard Smith 68eea507fa Related to PR11848 and core-21989: switch ContainsUnexpandedParameterPack from
being a property of a canonical type to being a property of the fully-sugared
type. This should only make a difference in the case where an alias template
ignores one of its parameters, and that parameter is an unexpanded parameter
pack.

llvm-svn: 160244
2012-07-16 00:20:35 +00:00
Chandler Carruth 36e2ecf528 Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completes
the move of *Builder classes into the Core library.

No uses of this builder in Clang or DragonEgg I could find.

If there is a desire to have an IR-building-support library that
contains all of these builders, that can be easily added, but currently
it seems likely that these add no real overhead to VMCore.

llvm-svn: 160243
2012-07-15 23:45:24 +00:00
Chandler Carruth d9d363f8d7 Update the header guard I missed when moving the header.
llvm-svn: 160242
2012-07-15 23:45:20 +00:00
Richard Smith 9db53d7d68 Revert change accidentally committed in r160240.
llvm-svn: 160241
2012-07-15 23:30:50 +00:00
Richard Smith 7dfc0240ea PR13368: Halve the instantiation depth of this test again. Apparently, FreeBSD
has a much lower default stack limit than the systems I have access to.

llvm-svn: 160240
2012-07-15 23:29:50 +00:00