Commit Graph

128633 Commits

Author SHA1 Message Date
Anna Zaks a7dcc996a9 [analyzer] Fixit for r158136.
I falsely assumed that the memory spaces are equal when we reach this
point, they might not be when memory space of one or more is stack or
Unknown. We don't want a region from Heap space alias something with
another memory space.

llvm-svn: 158165
2012-06-07 20:18:08 +00:00
Andrew Trick a5d24ca453 Continue factoring computeOperandLatency. Use it for ARM hasHighOperandLatency.
llvm-svn: 158164
2012-06-07 19:42:04 +00:00
Andrew Trick 5b1cadf9f7 ARM getOperandLatency rewrite.
Match expectations of the new latency API. Cleanup and make the logic consistent.

llvm-svn: 158163
2012-06-07 19:42:00 +00:00
Andrew Trick 3564bdfa61 ARM getOperandLatency should return -1 for unknown, consistent with API
llvm-svn: 158162
2012-06-07 19:41:58 +00:00
Andrew Trick fb1a74c2b2 Fix ARM getInstrLatency logic to work with the current API.
llvm-svn: 158161
2012-06-07 19:41:55 +00:00
Manman Ren 746e4859d0 PR13046: we can't replace usage of SUB with CMP in the lowering phase.
It will cause assertion failure later on.

llvm-svn: 158160
2012-06-07 19:27:33 +00:00
Jim Ingham aebdf1bed2 Add API logging for SBDebugger::MemoryPressureDetected.
llvm-svn: 158159
2012-06-07 19:08:07 +00:00
Rafael Espindola 55d1145bd5 Use a base register instead of an index register with the local dynamic model.
Fixes pr13048.

llvm-svn: 158158
2012-06-07 18:39:19 +00:00
Fariborz Jahanian 5d53fcda7c User better API for vla in compund literals.
// rdar://11485774

llvm-svn: 158157
2012-06-07 18:15:55 +00:00
Douglas Gregor fed6699dd9 Add ext_vector type code for builtins, from John Garvin!
llvm-svn: 158156
2012-06-07 18:08:25 +00:00
Chandler Carruth 48687a5a00 Fix many doxygen formatting errors.
This patch affects docs only, and includes formatting changes only
(though those include some fixes for broken Doxygen markup that caused
some content to be missing from generated pages).  It avoids generating
many spurious pages such as
http://clang.llvm.org/doxygen/classRepresents.html, but likely not all
yet.

Patch by James Dennett.

llvm-svn: 158155
2012-06-07 17:55:42 +00:00
Pete Cooper cd72016cab Move terminator machine verification to check MachineBasicBlock::instr_iterator instead of MBB::iterator
llvm-svn: 158154
2012-06-07 17:41:39 +00:00
Fariborz Jahanian bbc5bbf4f1 When emitting compund literal of vla pointer elements, make
sure to emit vla size to prevent an irgen crash.
// rdar://11485774

llvm-svn: 158153
2012-06-07 17:07:15 +00:00
Benjamin Kramer 5d4cff72b4 Reuse APInt's getNumWords, which gets rounding right (my ad-hoc solution missed it).
llvm-svn: 158151
2012-06-07 15:54:03 +00:00
Benjamin Kramer 6003ad5848 Plug a long standing memory leak in TemplateArgument.
The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.

Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.

llvm-svn: 158150
2012-06-07 15:09:51 +00:00
NAKAMURA Takumi 29aaccda13 test/Frontend/rewrite-includes.c: Tweak for win32's pathsep.
llvm-svn: 158149
2012-06-07 14:21:02 +00:00
Alexey Samsonov 91e1a7eb17 [Sanitizer] move internal_strdup and internal_memcpy to common runtime. Make internal allocations from TSan runtime call InternalAlloc from common runtime
llvm-svn: 158148
2012-06-07 11:54:08 +00:00
Alexey Samsonov 8b9aea522f [Sanitizer] use unsigned int as a parameter for placement new on 32 bits
llvm-svn: 158147
2012-06-07 10:09:41 +00:00
Benjamin Kramer b696a3639d Move sideeffecting call out of assert().
llvm-svn: 158146
2012-06-07 09:57:21 +00:00
Alexey Samsonov 8bd9098b32 [Sanitizer] move placement_new definiton from TSan to common runtime
llvm-svn: 158145
2012-06-07 09:50:16 +00:00
Alexey Samsonov 94e2b7d040 [Sanitizer] include stdlib.h header to get malloc/free
llvm-svn: 158144
2012-06-07 09:26:13 +00:00
Kostya Serebryany 0b14fd855b [asan] slow 16-byte redzones (still experimental)
llvm-svn: 158143
2012-06-07 09:15:48 +00:00
Alexey Samsonov 3a6ddb86e8 [Sanitizer] Allocator for internal runtime purposes. Currently it calls libcmalloc, but we might have to make it more low-level in future
llvm-svn: 158142
2012-06-07 08:52:56 +00:00
Alexey Samsonov cf4d3a027d [Sanitizer] Fix mac build.
llvm-svn: 158141
2012-06-07 07:32:00 +00:00
Alexey Samsonov 4b1f1031e6 [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.
llvm-svn: 158140
2012-06-07 07:13:46 +00:00
Alexey Samsonov 28a9895ee0 [Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.
llvm-svn: 158139
2012-06-07 06:15:12 +00:00
Alexey Samsonov fe44fbd750 [Sanitizer] Move ReadFileToBuffer to sanitizer_common.
llvm-svn: 158138
2012-06-07 05:38:26 +00:00
Pete Cooper f8d60d36c2 Add internal read flags to MachineInstrBuilder and hook them into the MachineOperand flag of the same name
llvm-svn: 158137
2012-06-07 04:43:52 +00:00
Anna Zaks 3563fde6a0 [analyzer] Anti-aliasing: different heap allocations do not alias
Add a concept of symbolic memory region belonging to heap memory space.
When comparing symbolic regions allocated on the heap, assume that they
do not alias. 

Use symbolic heap region to suppress a common false positive pattern in
the malloc checker, in code that relies on malloc not returning the
memory aliased to other malloc allocations, stack.

llvm-svn: 158136
2012-06-07 03:57:32 +00:00
Nick Kledzik 5fb2e4dabe put the public function createReaderPECOFF() in the lld namespace and everything else in is own namespace
llvm-svn: 158135
2012-06-07 02:23:48 +00:00
Nick Kledzik 98211f6d19 fix warnings found after cranking up warnings
llvm-svn: 158134
2012-06-07 01:53:39 +00:00
Nick Kledzik 40b8655082 abstract load commands to that WriterMachO can write 64-bit and 32-bit mach-o files
llvm-svn: 158133
2012-06-07 01:45:39 +00:00
Jordan Rose aefcedae65 Attach fixits for CFBridgingRetain/Release outside any casts.
Before, the note showed the location where you could insert __bridge variants,
but the actual fixit edit came after the cast.

No functionality change.

llvm-svn: 158131
2012-06-07 01:10:35 +00:00
Jordan Rose 288c421b3d Insert a space if necessary when suggesting CFBridgingRetain/Release.
This was a problem for people who write 'return(result);'

Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.

<rdar://problem/11577346>

llvm-svn: 158130
2012-06-07 01:10:31 +00:00
Meador Inge 161d5bb6f7 Adding a missing -S to the opt invocation.
llvm-svn: 158128
2012-06-07 01:02:13 +00:00
Argyrios Kyrtzidis b03cc793a9 [arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a +0 method,
automatically insert a __bridge cast.

radar://11560638

llvm-svn: 158127
2012-06-07 00:44:06 +00:00
Manman Ren ae02c5a93e X86: replace SUB with CMP if possible
This patch will optimize the following
    movq    %rdi, %rax
    subq    %rsi, %rax
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax
to
    cmpq    %rsi, %rdi
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax

Perform this optimization if the actual result of SUB is not used.

rdar: 11540023
llvm-svn: 158126
2012-06-07 00:42:47 +00:00
Enrico Granata 79cc6f7a26 <rdar://problem/11538779> Fixing issues where Python scripts were not able to read user input and/or display output to the user in certain situations - This fix introduces a Python InputReader manager class that mimics the behavior of the interactive interpreter in terms of access to I/O and ensures access to the input and output flows
llvm-svn: 158124
2012-06-07 00:17:18 +00:00
Bill Wendling 3e8cf2be79 Spell optimization name correclty.
llvm-svn: 158123
2012-06-06 23:53:23 +00:00
Manman Ren 9c9641812c Revert r157755.
The commit is intended to fix rdar://11540023.
It is implemented as part of peephole optimization. We can actually implement
this in the SelectionDAG lowering phase.

llvm-svn: 158122
2012-06-06 23:53:03 +00:00
Bill Wendling 618547a9c6 Another testcase for r156548.
<rdar://problem/10889741>

llvm-svn: 158121
2012-06-06 23:36:22 +00:00
Michael J. Spencer 838e5add7e [llvm-nm] Update documentation to cover object file support and arguments.
llvm-svn: 158120
2012-06-06 23:34:10 +00:00
Fariborz Jahanian ff045dc040 reverse r158117.
llvm-svn: 158119
2012-06-06 23:21:58 +00:00
Fariborz Jahanian 67164852a7 When doing arithmatic on vla pointer, make sure
to emit vla size to prevent an irgen crash.
// rdar://11485774

llvm-svn: 158117
2012-06-06 22:58:50 +00:00
Jakob Stoklund Olesen 00e7dffefb Properly verify liveness with bundled machine instructions.
Bundles should be treated as one atomic transaction when checking
liveness. That is how the register allocator (and VLIW targets) treats
bundles.

llvm-svn: 158116
2012-06-06 22:34:30 +00:00
Argyrios Kyrtzidis 4e633b56c0 Fix test/SemaObjC/cocoa-api-usage.m that broke via r158114.
llvm-svn: 158115
2012-06-06 22:32:07 +00:00
Argyrios Kyrtzidis 63aebfb4ae [objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to literals,
since the change from +1 to +0 will be handled fine by ARC.

rdar://11606358

llvm-svn: 158114
2012-06-06 22:23:12 +00:00
Manuel Klimek 9cc3c0307d Puts the linktime dependencies into stupid-ld-required order, as proposed by Jordan Rose.
llvm-svn: 158113
2012-06-06 21:30:34 +00:00
Manuel Klimek 0a8b9cd1e7 Switches the RewriterTestContext away from PathV1.
Now the ToolingTests all work on Windows, and they also clean up their temporary directory if they don't crash.

llvm-svn: 158112
2012-06-06 21:28:13 +00:00
Douglas Gregor 91c25eadea Whenever we have a BalancedDelimiterTracker, we have a 'nested' scope
where '>' is going to behave as an operator (and not as a '>' closing
a template argument list).

llvm-svn: 158111
2012-06-06 21:18:07 +00:00